vnstat may not start when other vnstat instance is running in LXC container(s)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
vnstat (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I noticed that vnstat may not start on LXC host when it is enabled on host and at least one container.
Init script in /etc/init.d/vnstat will run something like:
`start-stop-daemon --start --verbose ---chuid vnstat --exec /usr/sbin/vnstatd -- -d --pidfile /run/vnstat/
if vnstat is already running on LXC container start-stop-daemon won't start it because it will see process running.
If start-stop-daemon is called with ` --pidfile` option for vnstat it will ignore other vnstat instances in containers (because it will know PID file location and it will check it) - and it will work as expected. Example:
` start-stop-daemon --start --verbose --pidfile /run/vnstat/
This problem can be difficult to reproduce because container has to start vnstat first and it happened with ~50% probability for me.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: vnstat 1.11-2
ProcVersionSign
Uname: Linux 3.16.0-46-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.19
Architecture: amd64
Date: Tue Mar 15 16:40:51 2016
ProcEnviron:
TERM=screen-
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: vnstat
UpgradeStatus: No upgrade log present (probably fresh install)