ceph - ceph orch host 添加主机问题 (env: centos8, ceph:12.2.5)
问题描述
信息:主机名:cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 172.16.49.41 ceph-gw-one 172.16.49.42 ceph-gw-two
shell: ceph orch host add 172.16.49.42
错误 EINVAL: 新主机 172.16.49.42 (172.16.49.42) 检查失败: ['INFO:cephadm:podman|docker (/bin/docker) is present', 'INFO:cephadm:systemctl is present', 'INFO:cephadm: lvcreate is present', 'INFO:cephadm:Unit chronyd.service is enabled and running', 'INFO:cephadm:Hostname "172.16.49.42" 与预期匹配。', 'ERROR: hostname "ceph-gw-two" 确实不匹配预期的主机名“172.16.49.42”']
shell: orch 主机添加 ceph-gw-two
错误 EINVAL:无法连接到 ceph-gw-two (ceph-gw-two)。检查主机是否可达并接受使用 cephadm SSH 密钥的连接
你可能想运行:
ceph cephadm get-ssh-config > ssh_config ceph config-key get mgr/cephadm/ssh_identity_key > key ssh -F ssh_config -i key root@ceph-gw-two
我已经通过 ip 或主机名检查了 ssh 登录是否成功;
解决方案
我看了adm源码脚本:</p>
out, err, code = self._run_cephadm(spec.hostname, cephadmNoImage, 'check-host',
['--expect-hostname', spec.hostname],
addr=spec.addr,
error_ok=True, no_fsid=True)
if code:
raise OrchestratorError('New host %s (%s) failed check: %s' % (
spec.hostname, spec.addr, err))
所以,我将 cmd 更改为:
ceph orch 主机添加 ceph-gw-two 172.16.49.42;
完成,效果很好;
推荐阅读
- node.js - 如何阻止 github 操作需要旧的 nodejs 构建?
- reactjs - React 状态钩子,传入方法和参数 onClick
- python - 使用 IF 将 pdf 文件附加到 Outlook 的更好方法是什么?
- python - Matplotlib imshow:更改颜色条的中心值时,NaN 的颜色会发生变化
- javascript - html div在切换时接受焦点,但在通过javascript设置时不接受
- react-native - 在 React Native 中按下按钮后如何显示图像
- javascript - JavaScript - 基于url参数的h1替换javascript,如何在url和页面中添加多个单词?
- javascript - 设置大小框裁剪 (Cropper Js)
- python - 如何向后解析文件并打印所有行,直到找到包含某个字符串的行?
- php - Slim 4 抛出 Slim\Exception\HttpNotFoundException