ceph-deploy moncreate-initialエラーの処理

Ceph初期モニターのエラー解決

执行ceph-deploymon create-initial

エラーレポートの内容は次のとおりです。

[ceph2][ERROR ] admin_socket: exception getting command descriptions: [Errno 2] No such file or directory
[ceph2][WARNIN] monitor: mon.ceph2, might not be running yet
[ceph2][INFO ] Running command: sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.ceph2.asok mon_status
[ceph2][ERROR ] admin_socket: exception getting command descriptions: [Errno 2] No such file or directory
[ceph2][WARNIN] monitor ceph2 does not exist in monmap
[ceph2][WARNIN] neither `public_addr` nor `public_network` keys are defined for monitors
[ceph2][WARNIN] monitors may not be able to form quorum

エラーレポートのpublic_networkに注意してください。これは、ceph.confで構成されていないためです。

解決:

ceph.conf構成ファイルを変更し(このIPセグメントは個人的な状況に応じて設定されます)、public_network = 192.168.1.0/24を追加します


変更後も引き続きceph-deploymon create-initialを実行すると、エラーが報告されたままであることが報告されます。エラーの内容は以下のとおりです。

[ceph3][WARNIN] provided hostname must match remote hostname
[ceph3][WARNIN] provided hostname: ceph3
[ceph3][WARNIN] remote hostname: localhost
[ceph3][WARNIN] monitors may not reach quorum and create-keys will not complete
[ceph3][WARNIN] ********************************************************************************
[ceph3][DEBUG ] deploying mon to ceph3
[ceph3][DEBUG ] get remote short hostname
[ceph3][DEBUG ] remote hostname: localhost
[ceph3][DEBUG ] write cluster configuration to /etc/ceph/{
    
    cluster}.conf
[ceph_deploy.mon][ERROR ] RuntimeError: config file /etc/ceph/ceph.conf exists with different content; use --overwrite-conf to overwrite
[ceph_deploy][ERROR ] GenericError: Failed to create 3 monitors

这里看到错误提示/etc/ceph/ceph.conf内容不同,使用--overwrite-conf来覆盖

命令如下:

ceph-deploy --overwrite-conf config push ceph1 ceph2 ceph3

変更後、引き続きceph-deploy mon create-initialを実行すると、エラーがまだ存在していることがわかります。エラーレポートの内容は次のとおりです。

[ceph3][INFO ] Running command: sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.ceph3.asok mon_status
[ceph3][ERROR ] admin_socket: exception getting command descriptions: [Errno 2] No such file or directory
[ceph_deploy.mon][WARNIN] mon.ceph3 monitor is not yet in quorum, tries left: 1
[ceph_deploy.mon][WARNIN] waiting 20 seconds before retrying
[ceph_deploy.mon][ERROR ] Some monitors have still not reached quorum:
[ceph_deploy.mon][ERROR ] ceph1
[ceph_deploy.mon][ERROR ] ceph3
[ceph_deploy.mon][ERROR ] ceph2

調査の結果、ノードのホスト名が/ etc / hostsと一致しないことが判明しました

解決策:/ etc / hostsと一致するようにノードのホスト名を変更します

ノード1の実行:hostnamectl set-hostname ceph1
ノード2の実行:hostnamectl set-hostname ceph2
ノード3の実行:hostnamectl set-hostname ceph3


変更後も引き続きceph-deploymon create-initialを実行すると、mmpからエラーが報告され、エラーの内容が異なります。エラーの内容の中央部分は次のとおりです。

[ceph2][ERROR ] no valid command found; 10 closest matches:
[ceph2][ERROR ] perf dump {
    
    <logger>} {
    
    <counter>}
[ceph2][ERROR ] log reopen
[ceph2][ERROR ] help
[ceph2][ERROR ] git_version
[ceph2][ERROR ] log flush
[ceph2][ERROR ] log dump
[ceph2][ERROR ] config unset <var>
[ceph2][ERROR ] config show
[ceph2][ERROR ] get_command_descriptions
[ceph2][ERROR ] dump_mempools
[ceph2][ERROR ] admin_socket: invalid command
[ceph_deploy.mon][WARNIN] mon.ceph2 monitor is not yet in quorum, tries left: 5
[ceph_deploy.mon][WARNIN] waiting 5 seconds before retrying
[ceph2][INFO ] Running command: sudo ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.ceph2.asok mon_status
[ceph2][ERROR ] admin_socket: exception getting command descriptions: [Errno 2] No such file or directory

解決策:各ノードでsudo pkill cephを実行してから、デプロイノードでceph-deploy moncreate-initialを実行します。

次に、ERRORレポートが消え、初期モニターを構成し、すべてのキーを収集したことがわかりました。現在のディレクトリで次のキーリングを確認できます。

ceph.bootstrap-mds.keyring
ceph.bootstrap-mgr.keyring
ceph.bootstrap-osd.keyring
ceph.bootstrap-rgw.keyring
ceph.client.admin.keyring

おすすめ

転載: blog.csdn.net/weixin_43357497/article/details/113763295