Bug 1083317 - networkmanager crashes on openvpn restart
Summary: networkmanager crashes on openvpn restart
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager-openvpn
Version: 19
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Thomas Haller
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-01 23:13 UTC by Brad
Modified: 2015-02-18 11:02 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-18 11:02:44 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch for NM-openvpn dist-git for f20 (22.76 KB, patch)
2014-04-23 12:45 UTC, Thomas Haller
thaller: review-
Details | Diff
Patch for NM-openvpn dist-git for f19 (16.50 KB, patch)
2014-04-23 13:23 UTC, Thomas Haller
thaller: review-
Details | Diff


Links
System ID Private Priority Status Summary Last Updated
GNOME Bugzilla 556134 0 None None None Never
Launchpad 280160 0 None None None Never
Red Hat Bugzilla 766340 0 unspecified CLOSED nm-openvpn-service-openvpn-helper forgetting ifconfig_local and ifconfig_remote on restart 2021-02-22 00:41:40 UTC

Description Brad 2014-04-01 23:13:29 UTC
Description of problem:
When openvpn is running under NetworkManager, and openvpn initiates a restart sequence (when the remote server goes down and later comes up), nm-openvpn-service-openvpn-helper generates an error, and the local openvpn and nm-openvpn-service processes die.

Apr  1 14:31:32 kolab nm-openvpn[7571]: /usr/libexec/nm-openvpn-service-openvpn-helper tun0 1500 1542 10.8.0.10 10.8.0.9 restart
Apr  1 14:31:32 kolab nm-openvpn[7571]: WARNING: Failed running command (--up/--down): external program exited with error status: 1
Apr  1 14:31:32 kolab nm-openvpn[7571]: Exiting due to fatal error

Version-Release number of selected component (if applicable):
NetworkManager-openvpn-0.9.8.2-4.fc19.x86_64

Notes:
nm-openvpn-service-helper is expecting the value of ifconfig_local and ifconfig_remote in the environment, but openvpn is setting them in the up-script command line (and not in the environment).  

Requested fix:
nm-openvpn-service-helper should take ifconfig_local and ifconfig_remote from the command-line (in preference to the environment) in the "restart" case.

There is a ticket in openvpn to add those elements to the environment:
https://community.openvpn.net/openvpn/ticket/93

Workaround:
# cd /usr/libexec
# mv nm-openvpn-service-openvpn-helper nm-openvpn-service-openvpn-helper.dist
# cat > nm-openvpn-service-openvpn-helper << __EOF__
#!/bin/bash
# patch, per https://bugs.launchpad.net/ubuntu/+source/network-manager-openvpn/+bug/280160
[ -z "$ifconfig_local" ] && export ifconfig_local=$4
[ -z "$ifconfig_remote" ] && export ifconfig_remote=$5
exec /usr/libexec/nm-openvpn-service-openvpn-helper.dist $*
__EOF__
# chmod +x nm-openvpn-service-openvpn-helper

Comment 1 Thomas Haller 2014-04-23 12:45:31 UTC
Created attachment 888896 [details]
Patch for NM-openvpn dist-git for f20

I closed the upstream bug https://bugzilla.gnome.org/show_bug.cgi?id=556134 after merging https://git.gnome.org/browse/network-manager-openvpn/commit/?id=cefb89ccfb1732391e30512ed524a398320d3d56


The attached patch applies to dist-git repository of NetworkManager-openvpn (commit 23cd5af1e81664dd3f296a5b4091881f5d06dc3f).

You can find a scratch build with this fix at:
http://koji.fedoraproject.org/koji/taskinfo?taskID=6769235


Does it fix the issue and work as expected?

Comment 2 Thomas Haller 2014-04-23 12:53:54 UTC
(In reply to Thomas Haller from comment #1)

ah sorry, the attached scratchbuild is for F20, not F19...

Comment 3 Thomas Haller 2014-04-23 13:23:10 UTC
Created attachment 888908 [details]
Patch for NM-openvpn dist-git for f19

The attached patch applies to dist-git for f19 (commit e743915ae1010f2edf411b4fc00c23e177e258e4).

And a scratch build for f19:

http://koji.fedoraproject.org/koji/taskinfo?taskID=6769412

Comment 4 Fedora End Of Life 2015-01-09 22:24:39 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Fedora End Of Life 2015-02-18 11:02:44 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.