Bug 761316

Summary: system hangs during reboot/shutdown when use systemd with openvpn
Product: [openSUSE] openSUSE 12.1 Reporter: Forgotten User U3w37yBkwc <forgotten_U3w37yBkwc>
Component: BasesystemAssignee: Frederic Crozat <fcrozat>
Status: RESOLVED UPSTREAM QA Contact: E-mail List <qa-bugs>
Severity: Critical    
Priority: P5 - None CC: forgotten_U3w37yBkwc, pth
Version: Final   
Target Milestone: ---   
Hardware: 64bit   
OS: openSUSE 12.1   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Forgotten User U3w37yBkwc 2012-05-09 07:57:27 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.17) Gecko/20110420 SUSE/3.6.17-0.2.1 Firefox/3.6.17

if openvpn is enabled in runlevel then system hangs on reboot/shutdown

systemd kill networkdevices before openvpn shut's down so tun/tap devices fail on delete and system hangs only hardware reset is possible

temp. solution: use sysvinit

Reproducible: Always

Steps to Reproduce:
1.install minimal OS 
2.install openvpn & configure
3.activate runlevel 3 (5) 
4.reboot
Actual Results:  
system hangs

Expected Results:  
system reboot
Comment 1 Frederic Crozat 2012-06-01 14:37:41 UTC
shutdown ordering is supposed to be the inverse of startup ordering.

I've just tested here and openvpn was correctly started after network (at startup) and shutdown before network.

could you try to boot with:
systemd.log_level=debug systemd.log_target=syslog

do a startup/shutdown cycle
and attach /var/log/messages for this cycle ?
Comment 2 Forgotten User U3w37yBkwc 2012-06-06 08:41:38 UTC
(In reply to comment #1)
> shutdown ordering is supposed to be the inverse of startup ordering.
> 
> I've just tested here and openvpn was correctly started after network (at
> startup) and shutdown before network.
> 
> could you try to boot with:
> systemd.log_level=debug systemd.log_target=syslog
> 
> do a startup/shutdown cycle
> and attach /var/log/messages for this cycle ?

I've installed the last update for systemd from repo and the problem seems to be solved.

I'll try a more complex config with other system services and post a feedback here

regards max
Comment 3 Frederic Crozat 2013-03-11 16:21:03 UTC
We found a similar bug with our own vpn, due to a script run when openvpn is shutdown which run "rcfoobar restart" instead of "rcfoobar try-restart", causing the service to be always started and blocking the shutdown process.

This will fixed for good with in Factory in the future, systemd upstream has added a special mode for shutdown to prevent this (but we can't backport it to released systemd, unfortunately).

closing as upstream