Bug #81492
closedorch host add: usage message does not show how to specify more than one label
0%
Description
The usage line the ceph CLI builds for orch host add is
orch host add <hostname> [<addr>] [<labels>...] [--maintenance] : Add a host
Nothing in it says how to specify more than one label. Two forms work: --labels with a comma-separated list, which the #50062 fix added, or labels listed after <addr> separated by spaces:
ceph orch host add host1 --labels mylabel1,mylabel2 ceph orch host add host1 10.0.0.1 mylabel1 mylabel2
The positional form needs <addr>. Without it, ceph orch host add host1 mylabel takes mylabel as the address and then fails to connect to it; that is the #50062 trap. doc/cephadm/host-management.rst gives the synopsis as ceph orch host add <newhost> [<ip>] [<label1> ...], which doesn't show the --labels form either.
https://github.com/ceph/ceph/pull/67071 keeps the command's signature, so every form that works today keeps working. It puts the multi-label syntax in the command's description, which the CLI prints after the usage line, and shows the --labels form with a multi-label example in the docs. I was not able to get the syntax of the code change right at first: an unused usage variable tripped flake8 F841, and then a docstring was at the wrong indentation. The current revision is a correctly indented docstring only.
AD Updated by Anthony D'Atri about 2 months ago
- Subject changed from orch host add: usage implies labels can be given without an address to orch host add: usage message does not show how to specify more than one label
- Description updated (diff)
AD Updated by Anthony D'Atri about 2 months ago
- Related to Bug #68748: [RFE] Support adding multiple labels to a ceph host in one command added
AD Updated by Anthony D'Atri about 2 months ago
- Related to Bug #50062: orch host add with multiple labels and no addr added
UB Updated by Upkeep Bot about 2 months ago
- Copied to Backport #81508: umbrella: orch host add: usage message does not show how to specify more than one label added
UB Updated by Upkeep Bot about 2 months ago
- Copied to Backport #81509: tentacle: orch host add: usage message does not show how to specify more than one label added
UB Updated by Upkeep Bot about 2 months ago
- Status changed from Fix Under Review to Backporting
- Merge Commit set to cd3b4f097a00b0103ff1d8a88e52efbc5bf304ea
- Fixed In set to v21.3.0-4070-gcd3b4f097a
- Upkeep Timestamp set to 2026-10-07T07:36:16+00:00