Bug 655116

Summary: systemctl condrestart SERVICENAME.service fails if SERVICENAME is not currently running
Product: [Fedora] Fedora Reporter: John Reiser <jreiser>
Component: systemdAssignee: Lennart Poettering <lpoetter>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: rawhideCC: antillon.maurizio, jhrozek, k.georgiou, lpoetter, mcepl, mcepl, metherid, mschmidt, notting, plautrba, sbose, sgallagh, ssorce, theinric
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-29 11:09:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description John Reiser 2010-11-19 16:31:41 UTC
Description of problem: "yum update" to sssd-1.4.1-3.fc15.x86_64 gives warning messages on terminal.


Version-Release number of selected component (if applicable):
sssd-1.4.1-3.fc15.x86_64


How reproducible: haven't tried


Steps to Reproduce:
1. yum update
2.
3.
  
Actual results:
Non-fatal POSTIN scriptlet failure in rpm package sssd-1.4.1-3.fc15.x86_64
Job failed. See system logs and 'systemctl status' for details.
warning: %post(sssd-1.4.1-3.fc15.x86_64) scriptlet failed, exit status 1


Expected results: No complaints.


Additional info:
#  systemctl status
Too few arguments.
# systemctl status sssd
Failed to issue method call: Unit name sssd is not valid.
# 
-----snippet from /var/log/messages  [nothing unusual that I can see]
Nov 19 08:21:26 f15r64 yum[1978]: Updated: sssd-client-1.4.1-3.fc15.x86_64
Nov 19 08:21:27 f15r64 yum[1978]: Updated: mesa-libGL-7.10-0.11.fc15.x86_64
Nov 19 08:21:28 f15r64 yum[1978]: Updated: mesa-libGLU-7.10-0.11.fc15.x86_64
Nov 19 08:21:29 f15r64 yum[1978]: Updated: sssd-1.4.1-3.fc15.x86_64
Nov 19 08:21:29 f15r64 kernel: [  224.307151] dbus[1042]: [system] Reloaded configuration
Nov 19 08:21:29 f15r64 kernel: [  224.311935] dbus[1042]: [system] Reloaded configuration
Nov 19 08:21:30 f15r64 kernel: [  224.334553] dbus[1042]: [system] Reloaded configuration
Nov 19 08:21:31 f15r64 yum[1978]: Updated: setroubleshoot-3.0.9-1.fc15.x86_64
-----

Comment 1 Stephen Gallagher 2010-11-22 14:37:45 UTC
'service SERVICENAME condrestart' is a common command put in the %post section of spec files to ensure that services are restarted after update if they were previously running.

If the service was not running, it should take no action. However, 'systemctl condrestart SERVICENAME.service' throws the error:
"Job failed. See system logs and 'systemctl status' for details"

There is no indication of which logs to check (and I could not find any that provided any information) and the error message should be more clear that the status command should be 'systemctl status SERVICENAME.service'.

Comment 2 Matěj Cepl 2010-12-29 10:15:37 UTC
As per http://fedoraproject.org/wiki/Packaging:SysVInitScript#condrestart_and_try-restart condrestart shouldn't fail. There is a patch in http://article.gmane.org/gmane.comp.sysutils.systemd.devel/679.

Bumping severity to high, because it breaks other systems and may lead to unnecessary workarounds in spec files.

Comment 3 Matěj Cepl 2010-12-29 10:27:57 UTC
(In reply to comment #2)
> There is a patch in http://article.gmane.org/gmane.comp.sysutils.systemd.devel/679.

Sorry, there is not patch there.

Comment 4 Matěj Cepl 2010-12-29 11:09:06 UTC

*** This bug has been marked as a duplicate of bug 635780 ***

Comment 5 Stephen Gallagher 2011-01-28 21:02:13 UTC
*** Bug 673597 has been marked as a duplicate of this bug. ***