Bug 796525

Summary: systemd can not start/stop some services after upgrade
Product: [openSUSE] openSUSE 12.2 Reporter: Bernhard Wiedemann <bwiedemann>
Component: BasesystemAssignee: Frederic Crozat <fcrozat>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: bbrunner
Version: Final   
Target Milestone: ---   
Hardware: All   
OS: openSUSE 12.2   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Bernhard Wiedemann 2013-01-03 08:24:51 UTC
Reproducible: Always
Steps to Reproduce:
1. have an 12.2 install with old systemd-44-10.1.1
2. have any daemon without service file - e.g. openvpn
zypper -n in openvpn
cat >>/etc/openvpn/test.conf <<EOF
dev tun
ifconfig 10.8.9.2 10.8.9.1
secret test.key
EOF
openvpn --genkey --secret /etc/openvpn/test.key
3. verify that rcopenvpn start does start/stop openvpn
4. zypper up systemd # to ver 44-10.4.1
5. rcopenvpn start ; rcopenvpn status

Actual Results:
systemd no more starts or stops such daemons.

redirecting to systemctl
openvpn.service - LSB: OpenVPN tunnel
       Loaded: loaded (/etc/init.d/openvpn)
       Active: active (exited) since Thu, 03 Jan 2013 03:07:39 -0500; 10ms ago
      Process: 13061 ExecStop=/etc/init.d/openvpn stop (code=killed, signal=PIPE)
      Process: 13087 ExecStart=/etc/init.d/openvpn start (code=killed, signal=PIPE)
       CGroup: name=systemd:/system/openvpn.service


Only after a reboot services can be started and stopped again.
If that is unavoidable, such a systemd update 
should be handled like kernel updates
and be marked as interactive/needsreboot
Comment 1 Frederic Crozat 2013-01-03 09:17:57 UTC
does it works if you replace rcopenvpn start in step 5 with systemctl start openvpn.service ?
Comment 2 Bernhard Wiedemann 2013-01-03 09:52:34 UTC
same problem with systemctl.
e.g. trying to stop the daemon that was running on update:

# systemctl status openvpn.service
openvpn.service - LSB: OpenVPN tunnel
       Loaded: loaded (/etc/init.d/openvpn)
       Active: active (running) since Thu, 03 Jan 2013 04:48:49 -0500; 35s ago
       CGroup: name=systemd:/system/openvpn.service
          └ 4742 /usr/sbin/openvpn --daemon --writepid /var/run/openvpn/test.pid --config /etc...

Jan 03 04:48:49 bmwiedemann-temp-bnc796525 openvpn[4729]: Starting OpenVPN [test]
# systemctl stop openvpn.service
# systemctl status openvpn.service
openvpn.service - LSB: OpenVPN tunnel
       Loaded: loaded (/etc/init.d/openvpn)
       Active: inactive (dead) since Thu, 03 Jan 2013 04:49:31 -0500; 1s ago
      Process: 5026 ExecStop=/etc/init.d/openvpn stop (code=killed, signal=PIPE)
       CGroup: name=systemd:/system/openvpn.service
          └ 4742 /usr/sbin/openvpn --daemon --writepid /var/run/openvpn/test.pid --config /etc...

Jan 03 04:48:49 bmwiedemann-temp-bnc796525 openvpn[4729]: Starting OpenVPN [test]
Comment 3 Frederic Crozat 2013-01-03 18:01:58 UTC
the patch for bnc#783317 changed socket protocol between systemd and systemd-journald and when upgrading systemd, we don't restart systemd-journald (and apparently, we shouldn't do it by default, otherwise it would break logging of programs which are outputting on stdout).

I've added a restart of systemd-journald in a trigger when we upgrade from systemd shipping with the "old" version of the socket protocol.

Please check package at http://download.opensuse.org/repositories/home:/fcrozat:/branches:/openSUSE:/12.2:/Update/openSUSE_12.2_Update/  (it works fine for me but I prefer double check ;)
Comment 4 Bernhard Wiedemann 2013-01-04 09:10:58 UTC
looks good.
I tested on a fresh VM with old systemd
that openvpn can be started+stopped
and that systemd-journald keeps its pid 
when upgrading from systemd-44-10.4.1
Comment 5 Frederic Crozat 2013-01-04 10:49:11 UTC
requesting maintenance update.

pushed as mr #146970
Comment 6 Bernhard Wiedemann 2013-01-04 11:00:30 UTC
This is an autogenerated message for OBS integration:
This bug (796525) was mentioned in
https://build.opensuse.org/request/show/146970 Maintenance /
Comment 7 Benjamin Brunner 2013-01-04 11:48:31 UTC
Thanks for the submission. I accepted it and started an update, see openSUSE:Maintenance:1198.
Comment 8 Benjamin Brunner 2013-01-09 16:16:42 UTC
Update released for openSUSE 12.2. Resolved fixed. Thanks for you effort.