Stopping openvpn is unreliable (Ubuntu specific behaviour)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openvpn (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
In certain conditions, stopping OpenVPN doesn't work and the pid removed while the process is left behind. I noticed this when trying to stop a newly started connection that fails to establish and keeps dialling.
This problem is Ubuntu specific as in Ubuntu, the init script does this:
stop_vpn () {
kill `cat $PIDFILE` || true
rm -f $PIDFILE
[ "$OMIT_SENDSIGS" -ne 1 ] || rm -f /run/sendsigs.
rm -f /var/run/
log_end_msg 0
}
While in Debian it uses start-stop-daemon that eventually sends a KILL signal to the unresponsive openvpn pid:
stop_vpn () {
start-
--pidfile $PIDFILE --exec $DAEMON --retry 5
if [ "$?" -eq 0 ]; then
rm -f $PIDFILE
[ "$OMIT_SENDSIGS" -ne 1 ] || rm -f /run/sendsigs.
rm -f /run/openvpn/
fi
}
Relevant version information:
$ lsb_release -rd
Description: Ubuntu Trusty Tahr (development branch)
$ apt-cache policy openvpn
openvpn:
Installed: 2.3.2-7ubuntu2
Candidate: 2.3.2-7ubuntu2
Version table:
*** 2.3.2-7ubuntu2 0
500 http://
100 /var/lib/
Release: 14.04
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: openvpn 2.3.2-7ubuntu2
ProcVersionSign
Uname: Linux 3.13.0-5-generic x86_64
ApportVersion: 2.13.2-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Jan 29 14:01:05 2014
InstallationDate: Installed on 2014-01-26 (2 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Alpha amd64 (20140124)
SourcePackage: openvpn
UpgradeStatus: No upgrade log present (probably fresh install)
modified.
modified.
mtime.conffile.
mtime.conffile.
I just noticed but the Ubuntu init script also introduced another Ubuntu specific bug (LP: #1261088).