Actions
Bug #36329
closedformat=json reports a different exit code than plain format
Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
% Done:
0%
Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
It is tremendously confusing to see that plain and json output report a different return code, see the following example:
[root@osd0 ~]# ceph-volume lvm list /dev/sdb ; echo $? No valid Ceph devices found 1 [root@osd0 ~]# ceph-volume lvm list /dev/sdb --format=json ; echo $? {} 0
Updated by Alfredo Deza over 5 years ago
This is on purpose, to aid tooling like ceph-ansible, so that non-zero exit statuses don't need to be ignored.
I agree that this might be confusing for a user, but this is purposely set this way to avoid ignore_errors: True
Updated by Sébastien Han over 5 years ago
Fair enough. Thanks, we can close this.
Actions