group.of.nepali.translators team mailing list archive
-
group.of.nepali.translators team
-
Mailing list archive
-
Message #22060
[Bug 1720109] Re: snmpd stop on host stops snmpd on LXD containers
This bug was fixed in the package net-snmp - 5.7.3+dfsg-1ubuntu4.1
---------------
net-snmp (5.7.3+dfsg-1ubuntu4.1) xenial; urgency=medium
* d/snmpd.init: also match start-stop-daemon against pidfile to avoid
killing extra snmpd processes for example in container (LP: #1720109)
-- Christian Ehrhardt <christian.ehrhardt@xxxxxxxxxxxxx> Tue, 20 Feb
2018 14:53:51 +0100
** Changed in: net-snmp (Ubuntu Xenial)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1720109
Title:
snmpd stop on host stops snmpd on LXD containers
Status in net-snmp package in Ubuntu:
Fix Released
Status in net-snmp source package in Xenial:
Fix Released
Bug description:
[Impact]
* Stopping snmpd in Xenial can stop container processes of the same
binary
* Fix by matching to the PIDFILE that is already tracked by snmpd
[Test Case]
* Set up a host (e.g. a VM being Xenial)
* Set up at least one (or more) containers in it
* Install and start snmpd in the Host
* Install and start snmpd in the containers
* you'll now see like:
root@ubuntu-vm:/var/log# ps fxaw|grep snmp
29382 ? S 0:00 \_ /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -g snmp
29308 ? S 0:00 /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -g snmp
# One of these is from the container
* now on the host stop your service, chances are you stop your guests instead
root@ubuntu-vm:/var/log# service snmpd stop
root@ubuntu-vm:/var/log# ps fxaw|grep snmp
29426 pts/0 S+ 0:00 \_ grep --color=auto snmp
# 29382 was from a lxd container in this case
[Regression Potential]
* In case the pidfile stored by the snmpd daemon would be incorrect then
the stop/restart actions would not match the process and fail to
stop/restart. We didn't see that in our tests, but that is the
regression I could think of.
[Other Info]
* n/a
----
If you have ubuntu 16.04 containers running snmpd and you stop the snmpd on the LXD host system, it will also shut down all the snmpd instances on the containers (but will not restart them if you restart them on the LXD host) .. in fact, you even need to go back into the container, stop the snmpd before you can start it again.
See log below, viepovzat17 is the LXD host, viezmaaat10 is the ubuntu
container:
driver: lxc
driver_version: 2.0.8
kernel: Linux
kernel_architecture: x86_64
kernel_version: 4.4.0-87-generic
server: lxd
server_pid: 4426
server_version: "2.16"
storage: zfs
storage_version: 0.6.5.6-0ubuntu16
root@viezmaaat10:~# /etc/init.d/snmpd start
[ ok ] Starting snmpd (via systemctl): snmpd.service.
root@viezmaaat10:~# ps -eaf | grep snmp
snmp 1271 1 0 10:50 ? 00:00:00 /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -g snmp -I -smux mteTrigger mteTriggerConf -p /run/snmpd.pid
root 1291 757 0 10:50 ? 00:00:00 grep --color=auto snmp
root@viezmaaat10:~#
root@viezmaaat10:~# ps -eaf | grep snmp
snmp 1271 1 0 10:50 ? 00:00:00 /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -g snmp -I -smux mteTrigger mteTriggerConf -p /run/snmpd.pid
root 1293 757 0 10:50 ? 00:00:00 grep --color=auto snmp
root@viezmaaat10:~# exit
root@viepovzat17:~# ps -eaf | grep snmp
snmp 22757 1 0 10:45 ? 00:00:00 /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -g snmp -I -smux mteTrigger mteTriggerConf -p /run/snmpd.pid
100116 24118 5222 0 10:50 ? 00:00:00 /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -g snmp -I -smux mteTrigger mteTriggerConf -p /run/snmpd.pid
root 24153 21842 0 10:50 pts/1 00:00:00 grep --color=auto snmp
root@viepovzat17:~# /etc/init.d/snmpd stop
[ ok ] Stopping snmpd (via systemctl): snmpd.service.
root@viepovzat17:~# ps -eaf | grep snmp
root 24286 21842 0 10:50 pts/1 00:00:00 grep --color=auto snmp
root@viepovzat17:~#
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1720109/+subscriptions