Table of contents
问题一、RuntimeError: bootstrap-osd keyring not found; run ‘gatherkeys’
When executing the ceph-deploy command, it is prompted that the keyring file cannot be found.
Solution: First go to the deployment folder /etc/ceph-cluster/ and check whether the key file exists. If it does not exist, execute the gatherkeys command to collect it.
ceph-deploy gatherkeys <部署节点hostname>
#例
ceph-deploy gatherkeys node49
The correct output after execution is as follows
[ceph_deploy.conf][DEBUG ] found configuration file at: /root/.cephdeploy.conf
[ceph_deploy.cli][INFO ] Invoked (2.0.1): /usr/bin/ceph-deploy gatherkeys node49
[ceph_deploy.cli][INFO ] ceph-deploy options:
[ceph_deploy.cli][INFO ] username : None
[ceph_deploy.cli][INFO ] verbose : False
[ceph_deploy.cli][INFO ] overwrite_conf : False
[ceph_deploy.cli][INFO ] quiet : False
[ceph_deploy.cli][INFO ] cd_conf : <ceph_deploy.conf.cephdeploy.Conf instance at 0x7f4436b7d488>
[ceph_deploy.cli][INFO ] cluster : ceph
[ceph_deploy.cli][INFO ] mon : ['node49']
[ceph_deploy.cli][INFO ] func : <function gatherkeys at 0x7f4436dc49b0>
[ceph_deploy.cli][INFO ] ceph_conf : None
[ceph_deploy.cli][INFO ] default_release : False
[ceph_deploy.gatherkeys][INFO ] Storing keys in temp directory /tmp/tmpwck71_
[node49][DEBUG ] connected to host: node49
[node49][DEBUG ] detect platform information from remote host
[node49][DEBUG ] detect machine type
[node49][DEBUG ] get remote short hostname
[node49][DEBUG ] fetch remote file
[node49][INFO ] Running command: /usr/bin/ceph --connect-timeout=25 --cluster=ceph --admin-daemon=/var/run/ceph/ceph-mon.node49.asok mon_status
[node49][INFO ] Running command: /usr/bin/ceph --connect-timeout=25 --cluster=ceph --name mon. --keyring=/var/lib/ceph/mon/ceph-node49/keyring auth get client.admin
[node49][INFO ] Running command: /usr/bin/ceph --connect-timeout=25 --cluster=ceph --name mon. --keyring=/var/lib/ceph/mon/ceph-node49/keyring auth get client.bootstrap-mds
[node49][INFO ] Running command: /usr/bin/ceph --connect-timeout=25 --cluster=ceph --name mon. --keyring=/var/lib/ceph/mon/ceph-node49/keyring auth get client.bootstrap-mgr
[node49][INFO ] Running command: /usr/bin/ceph --connect-timeout=25 --cluster=ceph --name mon. --keyring=/var/lib/ceph/mon/ceph-node49/keyring auth get client.bootstrap-osd
[node49][INFO ] Running command: /usr/bin/ceph --connect-timeout=25 --cluster=ceph --name mon. --keyring=/var/lib/ceph/mon/ceph-node49/keyring auth get client.bootstrap-rgw
[ceph_deploy.gatherkeys][INFO ] keyring 'ceph.client.admin.keyring' already exists
[ceph_deploy.gatherkeys][INFO ] Storing ceph.bootstrap-mds.keyring
[ceph_deploy.gatherkeys][INFO ] Storing ceph.bootstrap-mgr.keyring
[ceph_deploy.gatherkeys][INFO ] Storing ceph.mon.keyring
[ceph_deploy.gatherkeys][INFO ] Storing ceph.bootstrap-osd.keyring
[ceph_deploy.gatherkeys][INFO ] Storing ceph.bootstrap-rgw.keyring
[ceph_deploy.gatherkeys][INFO ] Destroy temp directory /tmp/tmpwck71_
[root@node49 ceph-cluster]# ll
总用量 56
-rw------- 1 root root 113 12月 13 11:25 ceph.bootstrap-mds.keyring
-rw------- 1 root root 113 12月 13 11:25 ceph.bootstrap-mgr.keyring
-rw------- 1 root root 113 12月 13 11:25 ceph.bootstrap-osd.keyring
-rw------- 1 root root 113 12月 13 11:25 ceph.bootstrap-rgw.keyring
-rw------- 1 root root 63 12月 13 10:36 ceph.client.admin.keyring
-rw-r--r-- 1 root root 346 12月 13 10:34 ceph.conf
-rw-r--r-- 1 root root 24602 12月 13 11:25 ceph-deploy-ceph.log
-rw------- 1 root root 77 12月 13 11:25 ceph.mon.keyring
问题二、 stderr: Error EEXIST: entity osd.0 exists but key does not match
When adding osd, it prompts that the key information of osd exists.
Solution: Directly delete the missing osd key information
ceph auth del osd.{
osd-id}
#例
ceph auth del osd.0
Question 3: RuntimeError: command returned non-zero exit status: 1
Prompt when adding a data disk originally used as an osd storage medium to a cluster as a new osd
Solution: Format the disk and perform the add operation again.
sgdisk -Z /dev/sd<x>
#例
sgdisk -Z /dev/sdb