I followed the following steps from https://docs.ceph.com/en/latest/cephadm/install/ to setup a ceph cluster on Centos 8.1
curl --silent --remote-name --location https://github.com/ceph/ceph/raw/octopus/src/cephadm/cephadm
chmod +x cephadm
./cephadm add-repo --release octopus
./cephadm install
After the above command I found out that ceph requires either docker or podman to run. So I installed the community version of docker from https://docs.docker.com/engine/install/centos/ and continued the steps below.
./cephadm install
mkdir -p /etc/ceph
cephadm bootstrap --mon-ip *ip_of_the_current_machine (host1)*
cephadm install ceph-common
ssh-copy-id -f -i /etc/ceph/ceph.pub root@host2*
ceph orch host add host2
The above command fails with the error
[root@host1 home]# ceph orch host add host2
INFO:cephadm:Inferring fsid 12345678-2345-6789-1011-000129110013
INFO:cephadm:Inferring config /var/lib/ceph/12345678-2345-6789-1011-000129110013/mon.host1/config
INFO:cephadm:Using recent ceph image ceph/ceph:v15
Error EINVAL: Failed to connect to host2 (host2).
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@host2
I am able to login to host2 using the above steps.
Could someone please tell if I am doing something wrong. How do I solve this problem.
3
Answers
So after days of debugging I figured out that python3 was missing on the node I wanted to add. All I had to do was check the last few logs using the command.
This gave the following log messages.
Next to add the node I ran.
I’ve faced with the same issue but my top error message was
and workaround helps me as well
I faced the same issue as Oleg using cephadm on debian 10.
The workaround was to add the IP address.