搜索

13.7. 手动运行容器

download PDF

Cephadm 编写运行容器的小型打包程序。请参阅 /var/lib/ceph/CLUSTER_FSID/SERVICE_NAME/unit 来运行容器执行命令。

SSH 错误

如果遇到以下错误:

示例

execnet.gateway_bootstrap.HostNotFound: -F /tmp/cephadm-conf-73z09u6g -i /tmp/cephadm-identity-ky7ahp_5 root@10.10.1.2
...
raise OrchestratorError(msg) from e
orchestrator._interface.OrchestratorError: Failed to connect to 10.10.1.2 (10.10.1.2).
Please make sure that the host is reachable and accepts connections using the cephadm SSH key

尝试排除这个问题的选项:

  • 为确保 Cephadm 具有 SSH 身份密钥,请运行以下命令:

    示例

    [ceph: root@host01 /]# ceph config-key get mgr/cephadm/ssh_identity_key > ~/cephadm_private_key
    INFO:cephadm:Inferring fsid f8edc08a-7f17-11ea-8707-000c2915dd98
    INFO:cephadm:Using recent ceph image docker.io/ceph/ceph:v15 obtained 'mgr/cephadm/ssh_identity_key'
    [root@mon1 ~] # chmod 0600 ~/cephadm_private_key

    如果上述命令失败,Cephadm 没有密钥。要生成 SSH 密钥,请运行以下命令:

    示例

    [ceph: root@host01 /]# chmod 0600 ~/cephadm_private_key

    或者

    示例

    [ceph: root@host01 /]# cat ~/cephadm_private_key | ceph cephadm set-ssk-key -i-

  • 要确保 SSH 配置正确,请运行以下命令:

    示例

    [ceph: root@host01 /]# ceph cephadm get-ssh-config

  • 要验证与主机的连接,请运行以下命令:

    示例

    [ceph: root@host01 /]# ssh -F config -i ~/cephadm_private_key root@host01

验证公钥是否在 authorized_keys 中。

要验证公钥是否在 authorized_keys 文件中,请运行以下命令:

示例

[ceph: root@host01 /]# ceph cephadm get-pub-key
[ceph: root@host01 /]# grep "`cat ~/ceph.pub`" /root/.ssh/authorized_keys

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.