Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemctl show -pUnkown exits with a failed status now #5118

Closed
fbuihuu opened this issue Jan 20, 2017 · 1 comment
Closed

systemctl show -pUnkown exits with a failed status now #5118

fbuihuu opened this issue Jan 20, 2017 · 1 comment
Labels
regression ⚠️ A bug in something that used to work correctly and broke through some recent commit systemctl
Milestone

Comments

@fbuihuu
Copy link
Contributor

fbuihuu commented Jan 20, 2017

Hi,

Issue #3856 is quite similar but this one is about the exit status that "systemctl show -pUnknown" which has also changed.

Not sure what is the best behavior in this case but since we used to return success in this case (prior to commit 3dced37, i.e. versions < v232) and systemctl show is supposed to be scriptable, this behavior change looks incorrect.

This was detected due to some scripts starting to break with v232 at Suse.

Thanks for the feedback.

@fbuihuu fbuihuu added systemctl regression ⚠️ A bug in something that used to work correctly and broke through some recent commit labels Jan 20, 2017
fbuihuu added a commit to openSUSE/systemd that referenced this issue Jan 25, 2017
…roperty does not exist [SUSE]

"systemctl show -pUnknown <service>" used to exit with '0' even if the property
passed by '-p' doesn't exist.

But since commit 3dced37 (v231+), it exits with a failure
status.

"systemctl show" is supposed to be scriptable and therefore its behavior is
supposed to be stable.

This patch restores the old behavior on which a couple of scripts already rely
now.

An issue has been opened upstream:
systemd/systemd#5118 but it's not been answered yet.

In order to not delay the release of v232 anymore, this patch has been
temporarly added until the behavior is clarified by upstream.

[fbui: fixes bsc#1021062]
@poettering
Copy link
Member

Yeah, this looks like a bug.

@poettering poettering added this to the v233 milestone Feb 1, 2017
fbuihuu added a commit to fbuihuu/systemd that referenced this issue Feb 1, 2017
…roperty does not exist

"systemctl show -pUnknown <service>" used to exit with '0' even if the property
passed by '-p' doesn't exist.

But since commit 3dced37 (v231+), it exits with a failure
status.

"systemctl show" is supposed to be scriptable and therefore its behavior is
supposed to be stable.

This patch restores the old behavior on which a couple of scripts already rely
now.

Fixes: systemd#5118
@keszybz keszybz added the has-pr label Feb 2, 2017
fbuihuu added a commit to fbuihuu/systemd that referenced this issue Feb 2, 2017
…roperty does not exist

"systemctl show -pUnknown <service>" used to exit with '0' even if the property
passed by '-p' doesn't exist.

But since commit 3dced37 (v231+), it exits with a failure
status.

"systemctl show" is supposed to be scriptable and therefore its behavior is
supposed to be stable.

This patch restores the old behavior on which a couple of scripts already rely
now.

Also when the requested property doesn't exist, it always logs it at the debug
level since this part of the code is only used by the show command.

Fixes: systemd#5118
keszybz pushed a commit that referenced this issue Feb 2, 2017
…roperty does not exist (#5201)

"systemctl show -pUnknown <service>" used to exit with '0' even if the property
passed by '-p' doesn't exist. But since commit 3dced37 (v231+),
it exits with a failure status.

"systemctl show" is supposed to be scriptable and therefore its behavior is
supposed to be stable.

This patch restores the old behavior on which a couple of scripts already rely
now.

Also when the requested property doesn't exist, it always logs it at the debug
level since this part of the code is only used by the show command.

Fixes: #5118
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression ⚠️ A bug in something that used to work correctly and broke through some recent commit systemctl
Development

No branches or pull requests

3 participants