Actions
Bug #46098
closedException adding host using cephadm
Status:
Resolved
Priority:
Normal
Assignee:
Category:
cephadm (binary)
Target version:
% Done:
0%
Source:
Tags:
low-hanging-fruit
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
After bootstrapping 1st host using cephadm, attempting to add another host fails with an exception (variable referencing error).
Environment:
Ceph version: 15.2.2 (node 1 installed with cephadm)
OS Version: Ubuntu 18.04
Docker Version: 19.03.6-0ubuntu1~18.04.1
Step(s) to reproduce:
ceph0 $ ceph orch host add ceph1 # observe with `ceph -W cephadm` 020-06-19T13:44:42.435058+1200 mgr.ceph0.ufqhzn [ERR] _Promise failed Traceback (most recent call last): File "/usr/share/ceph/mgr/cephadm/module.py", line 457, in do_work res = self._on_complete_(*args, **kwargs) File "/usr/share/ceph/mgr/cephadm/module.py", line 525, in <lambda> return cls(on_complete=lambda x: f(*x), value=args, name=name, **c_kwargs) File "/usr/share/ceph/mgr/cephadm/module.py", line 1685, in add_host if code: orchestrator._interface.OrchestratorError: New host ceph1 (ceph1) failed check: ['Traceback (most recent call last):', ' File "<stdin>", line 4580, in <module>', ' File "<stdin>", line 3592, in command_check_host', "UnboundLocalError: local variable 'container_path' referenced before assignment"]
It looks like the variable 'container_path' needs to be indicated as 'global' in command_check_host (see patch). Making this change in the mgr container (and restarting) gets a successful host add.
Files
Actions