Bug #44302

cehpadm: apply_mon: NotImplementedError

Added by Sebastian Wagner 11 months ago. Updated 11 months ago.

Target version:
% Done:


3 - minor
Affected Versions:
Pull request ID:
Crash signature:


2020-02-25T17:09:39.919 7f48cec61700  1 -- --> v2: -- mgr_command(tid 0: {"prefix": "orch apply mon", "num": 2, "hosts": ["smithi202:[v2:,v1:]=c"], "target": ["mon-mgr", ""]}) v1 -- 0x7f48c8072980 con 0x7f48ac020d20
2020-02-25T17:09:39.921 7f48be7fc700  1 -- <== mgr.14130 v2: 1 ==== mgr_command_reply(tid 0: -22 Traceback (most recent call last):
2020-02-25T17:09:39.921  File "/usr/share/ceph/mgr/", line 1070, in _handle_command
2020-02-25T17:09:39.921    return self.handle_command(inbuf, cmd)
2020-02-25T17:09:39.922  File "/usr/share/ceph/mgr/orchestrator/", line 191, in handle_command
2020-02-25T17:09:39.922    return dispatch[cmd['prefix']].call(self, cmd, inbuf)
2020-02-25T17:09:39.922  File "/usr/share/ceph/mgr/", line 309, in call
2020-02-25T17:09:39.922    return self.func(mgr, **kwargs)
2020-02-25T17:09:39.922  File "/usr/share/ceph/mgr/orchestrator/", line 153, in <lambda>
2020-02-25T17:09:39.922    wrapper_copy = lambda *l_args, **l_kwargs: wrapper(*l_args, **l_kwargs)
2020-02-25T17:09:39.922  File "/usr/share/ceph/mgr/orchestrator/", line 144, in wrapper
2020-02-25T17:09:39.922    return func(*args, **kwargs)
2020-02-25T17:09:39.923  File "/usr/share/ceph/mgr/orchestrator/", line 688, in _apply_mon
2020-02-25T17:09:39.923    completion = self.apply_mon(spec)
2020-02-25T17:09:39.923  File "/usr/share/ceph/mgr/orchestrator/", line 1718, in inner
2020-02-25T17:09:39.923    completion = self._oremote(method_name, args, kwargs)
2020-02-25T17:09:39.923  File "/usr/share/ceph/mgr/orchestrator/", line 1788, in _oremote
2020-02-25T17:09:39.923    return mgr.remote(o, meth, *args, **kwargs)
2020-02-25T17:09:39.923  File "/usr/share/ceph/mgr/", line 1432, in remote
2020-02-25T17:09:39.924    args, kwargs)
2020-02-25T17:09:39.924 Remote method threw exception: Traceback (most recent call last):
2020-02-25T17:09:39.924  File "/usr/share/ceph/mgr/orchestrator/", line 1002, in apply_mon
2020-02-25T17:09:39.924    raise NotImplementedError()

Related issues

Related to Orchestrator - Feature #44305: mgr/cephadm: Add support for removing MONs Resolved


#1 Updated by Sebastian Wagner 11 months ago

  • Related to Feature #44305: mgr/cephadm: Add support for removing MONs added

#2 Updated by Sebastian Wagner 11 months ago

  • Pull request ID set to 33548

#3 Updated by Sebastian Wagner 11 months ago

  • Status changed from New to Fix Under Review

#4 Updated by Sage Weil 11 months ago

  • Priority changed from Immediate to Urgent

#5 Updated by Sage Weil 11 months ago

  • Status changed from Fix Under Review to In Progress
  • Assignee set to Sage Weil


I removed apply_mon because simply reusing _apply_service wasn't sufficient. IMO this needs to do a few more things:

- before removing a mon, verify that stopping+removing it won't break quorum, or else error out
- before removing each mon, 'ceph mon rm $monid' to remove it from the map.

both of those should probably go in the remove_daemon code so that the same checks apply to 'ceph orch daemon rm'?

- maybe: pause between adding and removing to make sure the new mons have come up. this may take some time, though, so perhaps it should just wait the remove step if it breaks quorum, and try again later (this may be blocked by the persistent apply specs?)
- on the removal step, should it pass --force to delete the data? this makes me nervous.
- allow 'apply mon' to do something reasonable even if no network spec is passed, so that it will work with a simple 'ceph orch apply mon 5'. we can probably (1) check for a public_network setting, and if so use that, else (2) assume that the main IP for the host is okay (DNS resolve/use the HostSpec addr). until we get this final item we don't actually have parity with rook...

#6 Updated by Sage Weil 11 months ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID changed from 33548 to 33792

#7 Updated by Sage Weil 11 months ago

  • Status changed from Fix Under Review to Resolved

Also available in: Atom PDF