[Bug 1585201] Re: improve systemd management of openvswitch daemons
James Page
james.page at ubuntu.com
Fri Jan 6 11:23:11 UTC 2017
https://github.com/openvswitch/ovs/tree/master/rhel contains an improved
model for management of all daemons.
--
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/1585201
Title:
improve systemd management of openvswitch daemons
Status in openvswitch package in Ubuntu:
Triaged
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/run/openvswitch/db.sock -vconsole:emer -vsyslog:err -vfile:info --mlockall --no-chdir --log-file=/var/log/openvswitch/ovs-vswitchd.log --pidfile=/var/run/openvswitch/ovs-vswitchd.pid --detach --monitor
root 19084 0.0 0.0 20324 3468 ? S 13:11 0:00 \_ ovsdb-server /etc/openvswitch/conf.db -vconsole:emer -vsyslog:err -vfile:info --remote=punix:/var/run/openvswitch/db.sock --private-key=db:Open_vSwitch,SSL,private_key --certificate=db:Open_vSwitch,SSL,certificate --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert --no-chdir --log-file=/var/log/openvswitch/ovsdb-server.log --pidfile=/var/run/openvswitch/ovsdb-server.pid --detach --monitor
# service openvswitch-nonetwork status
● openvswitch-nonetwork.service - Open vSwitch Internal Unit
Loaded: loaded (/lib/systemd/system/openvswitch-nonetwork.service; static; vendor preset: enabled)
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.slice/openvswitch-nonetwork.service
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|vsctl|INFO|Called as ovs-vsctl --no-wait -- init -- set Open_vSwitch . db-version=7.12.1
May 24 10:26:36 de-xenial ovs-vsctl[14887]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --no-wait set Open_vSwitch . ovs-version=2.5.0 "external-ids:system-id=\"681d704d-78ec-4f0e-947d-8caac9ac0e6e\"" "system-type=\"Ubuntu\"" "system-version=
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-switch.service - Open vSwitch
Loaded: loaded (/lib/systemd/system/openvswitch-switch.service; enabled; vendor preset: enabled)
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-switch.service - Open vSwitch
Loaded: loaded (/lib/systemd/system/openvswitch-switch.service; enabled; vendor preset: enabled)
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-nonetwork status
● openvswitch-nonetwork.service - Open vSwitch Internal Unit
Loaded: loaded (/lib/systemd/system/openvswitch-nonetwork.service; static; vendor preset: enabled)
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.slice/openvswitch-nonetwork.service
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|vsctl|INFO|Called as ovs-vsctl --no-wait -- init -- set Open_vSwitch . db-version=7.12.1
May 24 10:26:36 de-xenial ovs-vsctl[14887]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --no-wait set Open_vSwitch . ovs-version=2.5.0 "external-ids:system-id=\"681d704d-78ec-4f0e-947d-8caac9ac0e6e\"" "system-type=\"Ubuntu\"" "system-version=
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://nova.clouds.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
100 /var/lib/dpkg/status
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/1585201/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list