Project

General

Profile

Actions

Bug #46098

closed

Exception adding host using cephadm

Added by Mark Kirkwood almost 4 years ago. Updated almost 4 years ago.

Status:
Resolved
Priority:
Normal
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

cephadm.patch (296 Bytes) cephadm.patch Add global for container_path Mark Kirkwood, 06/19/2020 03:17 AM

Related issues 3 (0 open3 closed)

Related to Orchestrator - Support #46547: cephadm: Exception adding host via FQDN if host was already addedResolved

Actions
Related to Orchestrator - Tasks #46551: cephadm: Add better a better hint how to add a hostResolved

Actions
Has duplicate Orchestrator - Bug #46132: cephadm: Failed to add host in cephadm through command 'ceph orch host add node1'Duplicate

Actions
Actions

Also available in: Atom PDF