Project

General

Profile

Bug #46237

cephadm: Inconsistent exit code

Added by Ricardo Marques 3 months ago. Updated 2 months ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
cephadm
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

Description

If SSH keys are not available, then `ceph orch status` return code is zero:

master:~ # ceph orch status
Backend: cephadm
Available: False (SSH keys not set. Use `ceph cephadm set-priv-key` and `ceph cephadm set-pub-key` or `ceph cephadm generate-key`)
master:~ # echo $?
0

but if no backend is specified, then the exit code is non zero:

master:~ # ceph orch set backend ''
master:~ # ceph orch status
Error ENOENT: No orchestrator configured (try `ceph orch set backend`)
master:~ # echo $?
2

Shouldn't the exit codes be more consistent here?


Related issues

Related to Orchestrator - Bug #46233: cephadm: Add "--format" option to "ceph orch status" Resolved

History

#1 Updated by Ricardo Marques 3 months ago

  • Copied from Bug #46233: cephadm: Add "--format" option to "ceph orch status" added

#2 Updated by Ricardo Marques 3 months ago

  • Copied from deleted (Bug #46233: cephadm: Add "--format" option to "ceph orch status")

#3 Updated by Ricardo Marques 3 months ago

  • Related to Bug #46233: cephadm: Add "--format" option to "ceph orch status" added

#4 Updated by Ricardo Marques 3 months ago

  • Status changed from New to In Progress
  • Assignee set to Ricardo Marques

#5 Updated by Ricardo Marques 3 months ago

  • Status changed from In Progress to New
  • Assignee deleted (Ricardo Marques)

#6 Updated by Sebastian Wagner 2 months ago

  • Priority changed from Normal to Low

Also available in: Atom PDF