[ovs-discuss] systemd ovs-vswitchd starts too early

Mark Mielke mark.mielke at gmail.com
Mon Feb 29 00:36:12 UTC 2016


On Fri, Feb 5, 2016 at 7:48 AM, Flavio Leitner <fbl at redhat.com> wrote:

> On Fri, 5 Feb 2016 02:20:06 -0500
> Mark Mielke <mark.mielke at gmail.com> wrote:
> > Problem #1, that openvswitch-nonetwork.service starts too early if
> > openvswitch.service is on, actually causes a real problem, with
> > evidence in the logs.
> >
> > Problem #2, only happens for me if openvswitch-nonetwork.service
> > starts too early. If I turn openvswitch.service off *with or without*
> > your proposed alteration to After= to include network.service, then I
> > don't experience Problem #2.
> >
> > So, from my perspective...
> >
> > Problem #1 is a bug in how openvswitch.service is defined. There is a
> > misunderstanding here around how systemd operates, and there is no
> > correct patch on the table at the moment. The only fix here is to
> > disable openvswitch.service.
> Correct.  Now that I see the real issue I can look more into it.
>
> > Problem #2 is mostly a work-around for Problem #1 in my case. However,
> > I can see how in *other* cases than mine, it could be a valuable
> > solution. For example, let us say that the physical interfaces for the
> > OVSBond changed. In this case, ifup-ovs should correctly reset the
> > bond to have the new configuration.
> Yes, the idea is to enforce the ifcfgs on every boot to make sure it
> is in a known and update state.
>

Hi Flavio:

I tried with OVS 2.5.0 now that it is out, as it contains one the patches
that makes this issue less severe. The current behaviour is acceptable in
my use case, but could still be a problem in somebody else's use case. In
particular, I think if the bond were to be re-configured, it may fail to
properly take as a result of this remaining problem? Is this something you
are still looking at? If you have a patch, I would be happy to try it?

Just to remind readers, this is a scenario that involves ovsbr0 for the
bridge, ovsbond0 for the bond, and ens2f0 and ens2f1 as internal ports.
During "network.service" startup, it fails to replace the internal ports
(when processing the OVSIntPort configuration file), because they are a
part of a bond (declared in a OVSBond configuration file). However, as my
configuration is still correct before and after, it isn't a problem for me
any more. It is just a confusing error message now.

With "openvswitch.service" enabled, my symptoms are now limited to the
following (2 x "cannot create a port named ens2fX because an interface
named ens2fX already exists on bridge ovsbr0):

Feb 28 19:12:54 onxstack006 ovs-ctl: Starting ovs-vswitchd [  OK  ]
Feb 28 19:12:54 onxstack006 ovs-ctl: Enabling remote OVSDB managers [  OK  ]
Feb 28 19:12:54 onxstack006 systemd: Started Open vSwitch Internal Unit.
...
Feb 28 19:12:56 onxstack006 kernel: ixgbe 0000:04:00.0 ens2f0: renamed from
eth2
Feb 28 19:12:56 onxstack006 kernel: ixgbe 0000:04:00.1 ens2f1: renamed from
eth3
Feb 28 19:12:56 onxstack006 kernel: device ens2f0 entered promiscuous mode
Feb 28 19:12:56 onxstack006 kernel: device ens2f1 entered promiscuous mode
...
Feb 28 19:12:59 onxstack006 kernel: ixgbe 0000:04:00.0 ens2f0: changing MTU
from 1500 to 9000
Feb 28 19:12:59 onxstack006 kernel: ixgbe 0000:04:00.0: registered PHC
device on ens2f0
Feb 28 19:12:59 onxstack006 kernel: IPv6: ADDRCONF(NETDEV_UP): ens2f0: link
is not ready
Feb 28 19:12:59 onxstack006 kernel: ixgbe 0000:04:00.0 ens2f0: detected
SFP+: 5
Feb 28 19:13:00 onxstack006 kernel: ixgbe 0000:04:00.0 ens2f0: NIC Link is
Up 10 Gbps, Flow Control: RX/TX
Feb 28 19:13:00 onxstack006 kernel: IPv6: ADDRCONF(NETDEV_CHANGE): ens2f0:
link becomes ready
Feb 28 19:13:00 onxstack006 ovs-vsctl: ovs|00001|vsctl|INFO|Called as
ovs-vsctl -t 10 -- --if-exists del-port ovsbr0 ens2f0 -- add-port ovsbr0
ens2f0
Feb 28 19:13:00 onxstack006 ovs-vsctl: ovs|00002|db_ctl_base|ERR|cannot
create a port named ens2f0 because an interface named ens2f0 already exists
on bridge ovsbr0
Feb 28 19:13:00 onxstack006 network: Bringing up interface ens2f0:
 ovs-vsctl: cannot create a port named ens2f0 because an interface named
ens2f0 already exists on bridge ovsbr0
Feb 28 19:13:00 onxstack006 ovs-vsctl: ovs|00001|vsctl|INFO|Called as
ovs-vsctl -t 10 -- --may-exist add-br ovsbr0
Feb 28 19:13:00 onxstack006 network: [  OK  ]
...
Feb 28 19:13:00 onxstack006 kernel: ixgbe 0000:04:00.1 ens2f1: changing MTU
from 1500 to 9000
Feb 28 19:13:01 onxstack006 kernel: ixgbe 0000:04:00.1: registered PHC
device on ens2f1
Feb 28 19:13:01 onxstack006 kernel: IPv6: ADDRCONF(NETDEV_UP): ens2f1: link
is not ready
Feb 28 19:13:01 onxstack006 kernel: ixgbe 0000:04:00.1 ens2f1: detected
SFP+: 6
Feb 28 19:13:01 onxstack006 kernel: ixgbe 0000:04:00.1 ens2f1: NIC Link is
Up 10 Gbps, Flow Control: RX/TX
Feb 28 19:13:01 onxstack006 kernel: IPv6: ADDRCONF(NETDEV_CHANGE): ens2f1:
link becomes ready
Feb 28 19:13:02 onxstack006 ovs-vsctl: ovs|00001|vsctl|INFO|Called as
ovs-vsctl -t 10 -- --if-exists del-port ovsbr0 ens2f1 -- add-port ovsbr0
ens2f1
Feb 28 19:13:02 onxstack006 ovs-vsctl: ovs|00002|db_ctl_base|ERR|cannot
create a port named ens2f1 because an interface named ens2f1 already exists
on bridge ovsbr0
Feb 28 19:13:02 onxstack006 network: Bringing up interface ens2f1:
 ovs-vsctl: cannot create a port named ens2f1 because an interface named
ens2f1 already exists on bridge ovsbr0
Feb 28 19:13:02 onxstack006 ovs-vsctl: ovs|00001|vsctl|INFO|Called as
ovs-vsctl -t 10 -- --may-exist add-br ovsbr0
Feb 28 19:13:02 onxstack006 network: [  OK  ]
Feb 28 19:13:02 onxstack006 network: Bringing up interface ovsbond0:
 RTNETLINK answers: File exists
Feb 28 19:13:03 onxstack006 ovs-vsctl: ovs|00001|vsctl|INFO|Called as
ovs-vsctl -t 10 -- --if-exists del-port ovsbr0 ens2f0 -- add-port ovsbr0
ens2f0
Feb 28 19:13:03 onxstack006 ovs-vsctl: ovs|00002|db_ctl_base|ERR|cannot
create a port named ens2f0 because an interface named ens2f0 already exists
on bridge ovsbr0
Feb 28 19:13:03 onxstack006 network: ovs-vsctl: cannot create a port named
ens2f0 because an interface named ens2f0 already exists on bridge ovsbr0
Feb 28 19:13:03 onxstack006 ovs-vsctl: ovs|00001|vsctl|INFO|Called as
ovs-vsctl -t 10 -- --may-exist add-br ovsbr0
Feb 28 19:13:03 onxstack006 network: RTNETLINK answers: File exists
Feb 28 19:13:04 onxstack006 ovs-vsctl: ovs|00001|vsctl|INFO|Called as
ovs-vsctl -t 10 -- --if-exists del-port ovsbr0 ens2f1 -- add-port ovsbr0
ens2f1
Feb 28 19:13:04 onxstack006 ovs-vsctl: ovs|00002|db_ctl_base|ERR|cannot
create a port named ens2f1 because an interface named ens2f1 already exists
on bridge ovsbr0
Feb 28 19:13:04 onxstack006 network: ovs-vsctl: cannot create a port named
ens2f1 because an interface named ens2f1 already exists on bridge ovsbr0
...



-- 
Mark Mielke <mark.mielke at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20160228/d9705014/attachment-0002.html>


More information about the discuss mailing list