vnstat may not start when other vnstat instance is running in LXC container(s)

Bug #1557637 reported by suawekk
6
This bug affects 1 person
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/vnstat.pid`

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/vnstat.pid --chuid vnstat --exec /usr/sbin/vnstatd -- -d --pidfile /run/vnstat/vnstat.pid`

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
ProcVersionSignature: Ubuntu 3.16.0-46.62~14.04.1-generic 3.16.7-ckt15
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-256color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: vnstat
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
suawekk (suawekk) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.