Project

General

Profile

Actions

Bug #50062

closed

orch host add with multiple labels and no addr

Added by Daniel Pivonka about 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Category:
cephadm
Target version:
-
% Done:

0%

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

Description

Host add operation throws error saying connection issue as below, if add operation is executed with labels and skipped address with it.

No host address is provided, it takes 'mon' as the addr but the error doesnt really tell you thats the problem
-----------------------------
  1. ceph orch host add <host> [<labels>]

[ceph: root@vm-00 /]# ceph orch host add vm-01 mon osd
Error EINVAL: Failed to connect to vm-01 (mon).
Please make sure that the host is reachable and accepts connections using the cephadm SSH key

To add the cephadm SSH key to the host:

ceph cephadm get-pub-key > ~/ceph.pub
ssh-copy-id -f -i ~/ceph.pub root@vm-01

To check that the host is reachable:

ceph cephadm get-ssh-config > ssh_config
ceph config-key get mgr/cephadm/ssh_identity_key > ~/cephadm_private_key
ssh -F ssh_config -i ~/cephadm_private_key root@vm-01

Worked when address is provided:
--------------------------------

[ceph: root@vm-00 /]# ceph orch host add vm-01 192.168.0.123 mon osd
Added host 'vm-01'

Worked when empty address sting address is provided:
-----------------------------------------------------

[ceph: root@vm-00 /]# ceph orch host add vm-01 '' mon osd
Added host 'vm-01'

The node was reachable, which is proved when adding it to the cluster when addr positional argument is filled.
But Host add with label(s) and not having address positional argument fails by throwing ssh connection error message, here error message is misleading.

the orch host add command can not add a host with multiple labels and no addr without using a empty string in the addr positional argument
ceph host add vm-01 --labels=label1,label2 saves a single label "label1,label2"

Actions

Also available in: Atom PDF