Project

General

Profile

Tasks #46551

cephadm: Add better a better hint how to add a host

Added by Stephan Müller over 3 years ago. Updated about 3 years ago.

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

0%

Tags:
low-hanging-fruit
Reviewed:
Affected Versions:
Pull request ID:

Description

Currently:

master:~ # ceph orch host add mgr0 192.168.121.230                                                                                                              
Error ENOENT: Failed to connect to mgr0 (192.168.121.230).
Check that the host is reachable and accepts connections using the cephadm SSH key

you may want to run:
> ceph cephadm get-ssh-config > ssh_config
> ceph config-key get mgr/cephadm/ssh_identity_key > key
> ssh -F ssh_config -i key root@mgr0

What actually needs to be done:

master:~ # ceph config-key get mgr/cephadm/ssh_identity_pub > key.pub
master:~ # ssh-copy-id -i "key.pub" root@mgr0

What the message should look like in the end:

master:~ # ceph orch host add mgr0 192.168.121.230                                                                                                              
Error ENOENT: Failed to connect to mgr0 (192.168.121.230).
Check that the host is reachable and accepts connections using the cephadm SSH key

you may want to add the SSH key to the host:
> ceph config-key get mgr/cephadm/ssh_identity_pub > ~/cephadm_ssh_key.pub
> ssh-copy-id -i ~/cephadm_ssh_key.pub root@mgr0

you may want to check that everything works, before rerunning the command:
> ceph cephadm get-ssh-config > ssh_config
> ceph config-key get mgr/cephadm/ssh_identity_key > ~/cephadm_ssh_key
> ssh -F ssh_config -i ~/cephadm_ssh_key root@mgr0


Related issues

Related to Orchestrator - Bug #46098: Exception adding host using cephadm Resolved

History

#1 Updated by Stephan Müller over 3 years ago

  • Related to Bug #46098: Exception adding host using cephadm added

#2 Updated by Stephan Müller over 3 years ago

  • Status changed from New to In Progress

#3 Updated by Mario Ohnewald over 3 years ago

This will give you that warning:

root@ceph01:~# ssh -F ssh_config -i key root@ceph05
Warning: Permanently added 'ceph05,10.10.1.5' (ECDSA) to the list of known hosts.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for 'key' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "key": bad permissions

I think we need to add chmod, too:

ceph cephadm get-ssh-config > ssh_config
ceph config-key get mgr/cephadm/ssh_identity_key > ~/cephadm_ssh_key
chmod 0600 key
ssh -F ssh_config -i ~/cephadm_ssh_key root@mgr0

#4 Updated by Sebastian Wagner about 3 years ago

  • Status changed from In Progress to New

#5 Updated by Sebastian Wagner about 3 years ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 39259

#6 Updated by Sebastian Wagner about 3 years ago

  • Status changed from Fix Under Review to Resolved

Also available in: Atom PDF