在ceph quincy版本,即ceph 17版本执行ceph orch host add ceph2添加时,报以下初始化错误
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
Error EINVAL: Traceback (most recent call last): File "/usr/share/ceph/mgr/mgr_module.py", line 1756, in _handle_command return self.handle_command(inbuf, cmd) File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 171, in handle_command return dispatch[cmd['prefix']].call(self, cmd, inbuf) File "/usr/share/ceph/mgr/mgr_module.py", line 462, in call return self.func(mgr, **kwargs) File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 107, in <lambda> wrapper_copy = lambda *l_args, **l_kwargs: wrapper(*l_args, **l_kwargs) # noqa: E731 File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 96, in wrapper return func(*args, **kwargs) File "/usr/share/ceph/mgr/orchestrator/module.py", line 356, in _add_host return self._apply_misc([s], False, Format.plain) File "/usr/share/ceph/mgr/orchestrator/module.py", line 1092, in _apply_misc raise_if_exception(completion) File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 225, in raise_if_exception e = pickle.loads(c.serialized_exception) TypeError: __init__() missing 2 required positional arguments: 'hostname' and 'addr' |
我这里的ceph2在hosts已添加配置,但是在初始化时找不到ceph2地址,官方文档建议最好明确提供主机的IP地址,否则可能会出现失败问题。官方文档地址:https://docs.ceph.com/en/quincy/cephadm/host-management/#cephadm-adding-hosts
所以在添加时,指定节点IP,即
1 |
ceph orch host add ceph2 10.10.0.102 |
另外还需要注意密钥是否已经拷贝成功,即
1 |
ssh-copy-id -f -i /etc/ceph/ceph.pub root@ceph2 |
如果密钥没有成功拷贝,同样也会出现这个错误
原文链接:ceph orch host add添加主机时报错__init__() missing 2,转载请注明来源!