[Bug 901796] New: systemctl status returns zero exit code even if service is not running or in failed state
http://bugzilla.opensuse.org/show_bug.cgi?id=901796 Bug ID: 901796 Summary: systemctl status returns zero exit code even if service is not running or in failed state Classification: openSUSE Product: openSUSE Factory Version: NO 13.2 BUGS!! Hardware: All OS: Linux Status: NEW Severity: Major Priority: P5 - None Component: Basesystem Assignee: bnc-team-screening@forge.provo.novell.com Reporter: rakshika.gupta@hp.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36 Build Identifier: SLES12 GMC2 I am working on SLES12 GMC2 installed system. We use some scripts which relies on return code of "systemctl status <service name>" to proceed further. But even if service is not running or in failed state, "#systemctl status <service>" returns 0 exit code Reproducible: Always Steps to Reproduce: 1.stop a service/make service to fail 2.run #systemctl status <service-name> 3.check exit code #echo $? it returns 0 Actual Results: # systemctl status smb smb.service - Samba SMB Daemon Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled) Active: inactive (dead) since Fri 2014-10-17 14:17:25 IST; 6h ago Process: 1618 ExecStartPre=/usr/share/samba/update-apparmor-samba-profile (code=exited, status=0/SUCCESS) Main PID: 1631 Status: "smbd: ready to serve connections..." # echo $? 0 Expected Results: # systemctl status smb smb.service - Samba SMB Daemon Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled) Active: inactive (dead) since Fri 2014-10-17 14:17:25 IST; 6h ago Process: 1618 ExecStartPre=/usr/share/samba/update-apparmor-samba-profile (code=exited, status=0/SUCCESS) Main PID: 1631 Status: "smbd: ready to serve connections..." # echo $? <non-zero value> -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=901796
Rakshika Gupta
http://bugzilla.opensuse.org/show_bug.cgi?id=901796
Bernhard Wiedemann
http://bugzilla.opensuse.org/show_bug.cgi?id=901796
Rakshika Gupta
http://bugzilla.opensuse.org/show_bug.cgi?id=901796
Rakshika Gupta
http://bugzilla.opensuse.org/show_bug.cgi?id=901796
--- Comment #4 from Bernhard Wiedemann
http://bugzilla.opensuse.org/show_bug.cgi?id=901796
Bernhard Wiedemann
http://bugzilla.opensuse.org/show_bug.cgi?id=901796
Lars Müller
http://bugzilla.opensuse.org/show_bug.cgi?id=901796
Johannes Meixner
http://bugzilla.opensuse.org/show_bug.cgi?id=901796
--- Comment #10 from Johannes Meixner
participants (1)
-
bugzilla_noreply@novell.com