[Bug 1448254] Re: openvswitch systemd unit file ordering wrong
Elias Abacioglu
1448254 at bugs.launchpad.net
Fri Sep 15 13:14:33 UTC 2017
I might as well just add some facts and my logs.
First of all, I have one Xenial node where open vswitch worked, guessing that that time open vswitch daemon started before trying to setup network.
And then on other machines it doesn't work cause the daemon isn't started before trying to setup networking.
Here are the logs from a broken system.
```
Sep 12 16:11:07 vm10 systemd[1]: Reached target Network.
Sep 12 16:11:07 vm10 systemd[1]: networking.service: Failed with result 'exit-code'.
Sep 12 16:11:07 vm10 systemd[1]: networking.service: Unit entered failed state.
Sep 12 16:11:07 vm10 systemd[1]: Failed to start Raise network interfaces.
Sep 12 16:11:07 vm10 systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Sep 12 16:11:07 vm10 ntpdate[3027]: no servers can be used, exiting
Sep 12 16:11:07 vm10 ifup[2858]: Failed to bring up br0.
Sep 12 16:11:07 vm10 ifup[2858]: Cannot find device "br0"
Sep 12 16:11:07 vm10 ifup[2858]: Failed to bring up mgm.
Sep 12 16:11:07 vm10 ifup[2858]: Cannot find device "mgm"
Sep 12 16:11:07 vm10 ifup[2858]: mgm: ERROR while getting interface flags: No such device
Sep 12 16:11:07 vm10 ifup[2858]: ovs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
Sep 12 16:11:07 vm10 ovs-vsctl[2991]: ovs|00002|db_ctl_base|ERR|unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
Sep 12 16:11:07 vm10 ovs-vsctl[2991]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --timeout=5 -- --may-exist add-port br0 mgm vlan_mode=access -- set Interface mgm type=internal -- set interface mgm external-ids:iface-id=vm10-mgm-vif
Sep 12 16:11:07 vm10 ifup[2858]: Failed to bring up bond0.
Sep 12 16:11:07 vm10 ifup[2858]: Cannot find device "bond0"
Sep 12 16:11:07 vm10 kernel: bnx2x 0000:01:00.1 em2: NIC Link is Up, 10000 Mbps full duplex, Flow control: none
Sep 12 16:11:06 vm10 kernel: bnx2x 0000:01:00.1 em2: using MSI-X IRQs: sp 50 fp[0] 52 ... fp[7] 59
Sep 12 16:11:06 vm10 kernel: bnx2x 0000:01:00.0 em1: NIC Link is Up, 10000 Mbps full duplex, Flow control: none
Sep 12 16:11:06 vm10 kernel: bnx2x 0000:01:00.0 em1: using MSI-X IRQs: sp 39 fp[0] 41 ... fp[7] 48
Sep 12 16:11:05 vm10 ifup[2858]: bond0: ERROR while getting interface flags: No such device
Sep 12 16:11:05 vm10 ifup[2858]: ovs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
Sep 12 16:11:05 vm10 ovs-vsctl[2922]: ovs|00002|db_ctl_base|ERR|unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
Sep 12 16:11:05 vm10 ovs-vsctl[2922]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --timeout=5 -- --fake-iface add-bond br0 bond0 em1 em2 vlan_mode=native-untagged bond_mode=balance-tcp lacp=active other_config:lacp-time=fast --
Sep 12 16:11:05 vm10 ifup[2858]: ovs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
Sep 12 16:11:05 vm10 ovs-vsctl[2908]: ovs|00002|db_ctl_base|ERR|unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
Sep 12 16:11:05 vm10 ovs-vsctl[2908]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --timeout=5 -- --may-exist add-br br0 --
Sep 12 16:11:05 vm10 systemd[1]: Starting Raise network interfaces...
```
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to openvswitch in Ubuntu.
https://bugs.launchpad.net/bugs/1448254
Title:
openvswitch systemd unit file ordering wrong
Status in One Hundred Papercuts:
Triaged
Status in openvswitch package in Ubuntu:
Fix Released
Status in openvswitch source package in Xenial:
Triaged
Status in openvswitch source package in Yakkety:
Triaged
Status in openvswitch source package in Zesty:
Fix Released
Bug description:
[Impact]
systems with openvswitch management primary network devices take a long time to boot.
[Test Case]
Configure primary network interface for server using openvswitch eni syntax; reboot server (will take 4 minutes to boot).
[Regression Potential]
Medium risk - this is a change to the behaviour of the systemd units, but it does appear to have been validated by the wider community.
[Original Bug Report]
After upgrade to vivid, my system takes nearly 4 minutes to boot. This appears to be related to the new systemd unit ordering.
[Unit]
Description=Open vSwitch
After=network.target openvswitch-nonetwork.service
...
root at mystic:/lib/systemd/system# systemd-analyze blame | head
2min 233ms ifup-wait-all-auto.service
...
Open vSwitch is being started after the network, but the network needs
Open vSwitch to start since my host traffic is flowing through the
bridge:
root at mystic:/lib/systemd/system# ovs-vsctl show
838a8aa4-4811-447d-8dcc-dbb675b78968
Bridge "br0"
Port "br0"
tag: 1
Interface "br0"
type: internal
Port "vlan121"
tag: 121
Interface "vlan121"
type: internal
Port "eth0"
tag: 1
Interface "eth0"
ovs_version: "2.3.1"
The interfaces do eventually start correctly, but only after the long
timeout above.
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: openvswitch-switch 2.3.1-0ubuntu1
ProcVersionSignature: Ubuntu 3.19.0-15.15-generic 3.19.3
Uname: Linux 3.19.0-15-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.17.2-0ubuntu1
Architecture: amd64
Date: Fri Apr 24 14:10:19 2015
EcryptfsInUse: Yes
ProcEnviron:
TERM=screen
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: openvswitch
UpgradeStatus: Upgraded to vivid on 2015-04-24 (0 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/hundredpapercuts/+bug/1448254/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list