Your message dated Mon, 09 Sep 2013 18:18:45 +0000
with message-id <[email protected]>
and subject line Bug#716794: fixed in openvpn 2.3.2-5
has caused the Debian Bug report #716794,
regarding OpenVPN stop race causing restart issues
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
716794: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=716794
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Package: openvpn
Version: 2.3.2-4
Hi Alberto,
Original bug description at: https://bugs.launchpad.net/bugs/1200519
Restarting a VPN connection sometimes fails due to a race between the
connection tear down and the re-execution. Here is a log extract
generated by a restart (triggered at 16:15:30):
Jul 12 16:15:28 simon ovpn-test[497]: Initialization Sequence Completed
Jul 12 16:15:30 simon ovpn-test[497]: event_wait : Interrupted system
call (code=4)
Jul 12 16:15:30 simon ovpn-test[497]: SIGTERM received, sending exit
notification to peer
Jul 12 16:15:31 simon ovpn-test[554]: OpenVPN 2.2.1 x86_64-linux-gnu
[SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload
20110424-2 (2.2RC2)] built on Feb 27 2013
...
Jul 12 16:15:31 simon ovpn-test[554]: TCP/UDP: Socket bind failed on
local address [undef]: Address already in use
Jul 12 16:15:31 simon ovpn-test[554]: Exiting
Jul 12 16:15:32 simon ovpn-test[497]: TCP/UDP: Closing socket
Jul 12 16:15:32 simon ovpn-test[497]: ERROR: Linux route delete command
failed: could not execute external program
Jul 12 16:15:32 ovpn-test[497]: last message repeated 2 times
Jul 12 16:15:32 simon ovpn-test[497]: Closing TUN/TAP interface
Jul 12 16:15:32 simon ovpn-test[497]: /sbin/ifconfig tun-avpn 0.0.0.0
Jul 12 16:15:32 simon ovpn-test[497]: Linux ip addr del failed: could
not execute external program
Jul 12 16:15:32 simon ovpn-test[497]:
SIGTERM[soft,exit-with-notification] received, process exiting
This race occurs because the tear down takes longer than the 1 second
pause between "stop" and "start" actions.
Please find a patch attached that replaces the kill command by
start-stop-daemon with the --retry option. The patched was tested by an
Ubuntu user and myself (both on Ubuntu).
Please let me know what you think about the patch. I've also examine the
delta in the initscript from Debian and Ubuntu and don't see any reason
why they couldn't be unified. If that is also something you could
consider, I'd be please to provide you more patches.
Thanks for the excellent maintainer job you are doing!
Best regards,
Simon Deziel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQJ8BAEBCgBmBQJR4GoLXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2QkU4QTNGQThFMjY4Q0JDRjVEOUY3MDlB
QzQwNDU0RTQ4MUFCODUxAAoJEKxARU5IGrhRb9MQAMSwh3bMI3/EwWRwqtIzPjRq
4qYYcSOfAURVJJ+BIeonNiFHey91ce54hvQgyZm5Ib68RUw09ICQng0cUs8mWt0E
HAx2fhGtk4Scicwqbh0wxLDbgzbkkIa5kAwY5EymmPzHGiOQpXF0JL4Mvk+2pV9P
jzAEtyI3i/8TmrgjE/qxu8Py7+p+O7OmS3aA8pXUMp4o5MRpnCBZLT4UEbW2sSQ7
f6gNBPBFwUQfU65tIXwnJ6bi9Ss0ni1t2Y/lfwTwNOcWJAk12iFsCcV6q/4TlkbG
PcB6ZWHLyP12m2bZR+neq4r4gPdaO4TQ7fcrUGYAlEF2coKqgOhEtxoM/oc+VRsx
LMph0p+rcq1ETaX8LPJUVcKI9SCRGOJkDKpc0oLv+caj/5Niary+B3uhV8pisnDg
4pKwXGg/BeLOReY40Vb0bXDgAhmGyOgmgngd/awK7Gle76GoYqDfFMzgz/cR14Fq
0tnd9v+e+DYgH7dYClkp744dtqkhdy9bgbDZGQHOZbeiPD5rxtEoEydsZ+PLXZe9
shn8B9LBX0Q9EYWZXLUPcN4+Jq9YbaVgbgvmhrzjrmWnW7If2gXhXxO5tFTi0df3
6xyxcOEhmrDi9u7nWrJ4R0YKZjmx8hf6iwm6GabeX3L8UIbmZ5KfVXz87f+qjmoA
MyhxGbiF6SKvh5J1jT7x
=EoQ3
-----END PGP SIGNATURE-----
--- openvpn-debian.orig 2013-07-12 14:58:29.018020350 -0400
+++ openvpn-debian 2013-07-12 15:01:45.142243855 -0400
@@ -95,10 +95,13 @@
fi
}
stop_vpn () {
- kill `cat $PIDFILE` || true
- rm -f $PIDFILE
- [ "$OMIT_SENDSIGS" -ne 1 ] || rm -f /run/sendsigs.omit.d/openvpn.$NAME.pid
- rm -f /var/run/openvpn.$NAME.status 2> /dev/null
+ start-stop-daemon --stop --quiet --oknodo \
+ --pidfile $PIDFILE --exec $DAEMON --retry 5
+ if [ "$?" -eq 0 ]; then
+ rm -f $PIDFILE
+ [ "$OMIT_SENDSIGS" -ne 1 ] || rm -f /run/sendsigs.omit.d/openvpn.$NAME.pid
+ rm -f /var/run/openvpn.$NAME.status 2> /dev/null
+ fi
}
case "$1" in
@@ -180,7 +183,6 @@
# If openvpn if running under a different user than root we'll need to restart
if egrep '^[[:blank:]]*user[[:blank:]]' $CONFIG_DIR/$NAME.conf > /dev/null 2>&1 ; then
stop_vpn
- sleep 1
start_vpn
log_progress_msg "(restarted)"
else
@@ -206,7 +208,6 @@
restart)
shift
$0 stop ${@}
- sleep 1
$0 start ${@}
;;
cond-restart)
@@ -215,7 +216,6 @@
NAME=`echo $PIDFILE | cut -c18-`
NAME=${NAME%%.pid}
stop_vpn
- sleep 1
start_vpn
done
log_end_msg 0
openvpn-fix-stop-race-debian.patch.sig
Description: Binary data
--- End Message ---
--- Begin Message ---
Source: openvpn
Source-Version: 2.3.2-5
We believe that the bug you reported is fixed in the latest version of
openvpn, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Alberto Gonzalez Iniesta <[email protected]> (supplier of updated openvpn
package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Mon, 15 Jul 2013 16:10:59 +0200
Source: openvpn
Binary: openvpn
Architecture: source amd64
Version: 2.3.2-5
Distribution: unstable
Urgency: low
Maintainer: Alberto Gonzalez Iniesta <[email protected]>
Changed-By: Alberto Gonzalez Iniesta <[email protected]>
Description:
openvpn - virtual private network daemon
Closes: 716794 721082
Changes:
openvpn (2.3.2-5) unstable; urgency=low
.
* Patch init script to fix race conditions on restarts.
(Closes: #716794). Thanks Simon Deziel for the patch.
* Improve update-resolv-conf script. Thanks Thomas Hood
for the patch. (Closes: #721082)
Checksums-Sha1:
b086ab1200e16b0fa6e947fa014b4d772b62cb02 1863 openvpn_2.3.2-5.dsc
265421c443b0c98308c5fae5ac08196bec13aa30 124505 openvpn_2.3.2-5.debian.tar.gz
ec70efd5efb8f62c4f7f9cb33868e60a44236d1f 450770 openvpn_2.3.2-5_amd64.deb
Checksums-Sha256:
768929bce0c0d12145c46b64ebd948f108c7e30376bb7d99d19a233a33159f52 1863
openvpn_2.3.2-5.dsc
04f3d8ab29e386a4ffb20a524685971d18f45a15c180b9a03a754d115b959c20 124505
openvpn_2.3.2-5.debian.tar.gz
3bb010b68c9784e78823d18c0ab8e97cb977701f3506a42b6a96560d80092b2a 450770
openvpn_2.3.2-5_amd64.deb
Files:
b22089b58424b1a0a3018492929b1e6c 1863 net optional openvpn_2.3.2-5.dsc
f54d761e01d8b9eb33f54041ee817a2d 124505 net optional
openvpn_2.3.2-5.debian.tar.gz
59d572d7fd546d437def483cb85cd4e8 450770 net optional openvpn_2.3.2-5_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
iQIcBAEBCAAGBQJSLg13AAoJEACbM3VrmqpVG4oP/22m6g9KYsVmANV/0ROWmlWF
98vjVjuWrYwWUbXc1pAOxYiKRaKEUV0x12pmmxmL9T4ugmQlRgwAPtL/0g6ZvHvX
DnemFDTaM3KK+fC5Me0ZkRun7GXoTm9nVwN36vZ4Xva5nrwjHFFtAJ+Qkf17Ky66
db3R9p3vJFPPAZbYMj2v26w8d0ZqRmmmo/0B5IM18a2mfPDijeihJWQIPgtigfBy
DtVMNyUfd28aFd84RI88G2wGThHViyt9LIEuMtPChQAU/FmlbhUSQqoAP/+LTpg4
0+UkXCjkIGtBkuEA78K3zEUhKnJPjvef+1RQ64RwKRSSbZbWJLYMTswXoY9Apq1j
NF360IWAChqHEmQ8E75SbAA4j/+wYIZvlJ4dIn9i3HmKtwpcTrXVPKd7e93dtose
SsjHf+9kNwnjvqZP6EqRmpniHD5eqpRVb1ZaxjmgeHfhqVLvXo7EHrow6D0SLHaW
Khs6kmOz5/B9JPgfYSAi775yh9Z66ZdPETbk5edmK/LIx35UPPrA+YKScLUfeng3
76SrMyA3EG8wPsR9yBHy4xwU3ARQm3OKYWRk762DM7dntuqBNK3o6MsBHuToiUoE
zSyLiJj6BW7+Tjr98yB9uq2UR7OAHW+hFQIRhveGkOmAJjXIixabmP+JWMa0H0pR
Q7nOTgkdSksjZoTnVGQO
=r/gR
-----END PGP SIGNATURE-----
--- End Message ---