improve systemd management of openvswitch daemons
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openvswitch (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
Command 'service openvswitch-switch status' gives wrong status report, when process is already running and when it is not running:
# ps auxf | grep openvswitch
root 19115 0.0 0.0 12948 1088 pts/1 S+ 13:17 0:00 \_ grep --color=auto openvswitch
root 17623 0.1 0.6 394040 50476 ? SLl 11:22 0:07 \_ ovs-vswitchd unix:/var/
root 19084 0.0 0.0 20324 3468 ? S 13:11 0:00 \_ ovsdb-server /etc/openvswitc
# service openvswitch-
● openvswitch-
Loaded: loaded (/lib/systemd/
Active: active (exited) since Tue 2016-05-24 10:26:36 UTC; 2h 45min ago
Main PID: 14855 (code=exited, status=0/SUCCESS)
CGroup: /system.
May 24 10:26:36 de-xenial ovs-ctl[14855]: * Starting ovsdb-server
May 24 10:26:36 de-xenial ovs-vsctl[14882]: ovs|00001|
May 24 10:26:36 de-xenial ovs-vsctl[14887]: ovs|00001|
May 24 10:26:36 de-xenial ovs-ctl[14855]: * Configuring Open vSwitch system IDs
May 24 10:26:36 de-xenial ovs-ctl[14855]: * Inserting openvswitch module
May 24 10:26:36 de-xenial ovs-ctl[14855]: * Starting ovs-vswitchd
May 24 10:26:36 de-xenial ovs-ctl[14855]: * Enabling remote OVSDB managers
May 24 10:26:36 de-xenial systemd[1]: Started Open vSwitch Internal Unit.
May 24 10:49:02 de-xenial systemd[1]: Started Open vSwitch Internal Unit.
May 24 10:50:08 de-xenial systemd[1]: Started Open vSwitch Internal Unit.
# service openvswitch-switch status
● openvswitch-
Loaded: loaded (/lib/systemd/
Active: active (exited) since Tue 2016-05-24 10:26:36 UTC; 2h 45min ago
Main PID: 14900 (code=exited, status=0/SUCCESS)
May 24 10:26:36 de-xenial systemd[1]: Starting Open vSwitch...
May 24 10:26:36 de-xenial systemd[1]: Started Open vSwitch.
May 24 10:26:38 de-xenial systemd[1]: Started Open vSwitch.
May 24 10:28:56 de-xenial systemd[1]: Started Open vSwitch.
May 24 10:29:18 de-xenial systemd[1]: Started Open vSwitch.
May 24 10:38:03 de-xenial systemd[1]: Started Open vSwitch.
May 24 10:45:17 de-xenial systemd[1]: Started Open vSwitch.
May 24 10:49:07 de-xenial systemd[1]: Started Open vSwitch.
May 24 10:49:57 de-xenial systemd[1]: Started Open vSwitch.
May 24 10:50:10 de-xenial systemd[1]: Started Open vSwitch.
Then if process will be killed or stopped (for example, kill -9):
# kill -9 17623
# kill -9 19084
#
# ps auxf | grep openvswitch
root 19129 0.0 0.0 12948 1004 pts/1 S+ 13:19 0:00 \_ grep --color=auto openvswitch
We still have same status report:
# service openvswitch-switch status
● openvswitch-
Loaded: loaded (/lib/systemd/
Active: active (exited) since Tue 2016-05-24 10:26:36 UTC; 2h 53min ago
Main PID: 14900 (code=exited, status=0/SUCCESS)
May 24 10:26:36 de-xenial systemd[1]: Starting Open vSwitch...
May 24 10:26:36 de-xenial systemd[1]: Started Open vSwitch.
May 24 10:26:38 de-xenial systemd[1]: Started Open vSwitch.
May 24 10:28:56 de-xenial systemd[1]: Started Open vSwitch.
May 24 10:29:18 de-xenial systemd[1]: Started Open vSwitch.
May 24 10:38:03 de-xenial systemd[1]: Started Open vSwitch.
May 24 10:45:17 de-xenial systemd[1]: Started Open vSwitch.
May 24 10:49:07 de-xenial systemd[1]: Started Open vSwitch.
May 24 10:49:57 de-xenial systemd[1]: Started Open vSwitch.
May 24 10:50:10 de-xenial systemd[1]: Started Open vSwitch.
# service openvswitch-
● openvswitch-
Loaded: loaded (/lib/systemd/
Active: active (exited) since Tue 2016-05-24 10:26:36 UTC; 2h 53min ago
Main PID: 14855 (code=exited, status=0/SUCCESS)
CGroup: /system.
May 24 10:26:36 de-xenial ovs-ctl[14855]: * Starting ovsdb-server
May 24 10:26:36 de-xenial ovs-vsctl[14882]: ovs|00001|
May 24 10:26:36 de-xenial ovs-vsctl[14887]: ovs|00001|
May 24 10:26:36 de-xenial ovs-ctl[14855]: * Configuring Open vSwitch system IDs
May 24 10:26:36 de-xenial ovs-ctl[14855]: * Inserting openvswitch module
May 24 10:26:36 de-xenial ovs-ctl[14855]: * Starting ovs-vswitchd
May 24 10:26:36 de-xenial ovs-ctl[14855]: * Enabling remote OVSDB managers
May 24 10:26:36 de-xenial systemd[1]: Started Open vSwitch Internal Unit.
May 24 10:49:02 de-xenial systemd[1]: Started Open vSwitch Internal Unit.
May 24 10:50:08 de-xenial systemd[1]: Started Open vSwitch Internal Unit.
System release:
# lsb_release -rd
Description: Ubuntu 16.04 LTS
Release: 16.04
Package info:
# apt-cache policy openvswitch-switch
openvswitch-switch:
Installed: 2.5.0-0ubuntu1
Candidate: 2.5.0-0ubuntu1
Version table:
*** 2.5.0-0ubuntu1 500
500 http://
100 /var/lib/
description: | updated |
This is due to the slight nasty way that ovs was originally integrated with systemd; I think there is a nicer approach using systemd to manage the individual daemons so we should look to see if we can switch to that model.