mirror of
https://github.com/ceph/ceph
synced 2025-01-31 23:44:10 +00:00
mgr/cephadm: auto-enable mirroring module when deploying service
Automatically enable the mgr's mirroring module when creating
cephfs-mirror services. This will trigger a mgr respawn.
Fixes: https://tracker.ceph.com/issues/50593
Based roughly on 50dc1d0dec
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
parent
e11654d130
commit
e030130fd1
@ -986,6 +986,18 @@ class CrashService(CephService):
|
||||
class CephfsMirrorService(CephService):
|
||||
TYPE = 'cephfs-mirror'
|
||||
|
||||
def config(self, spec: ServiceSpec) -> None:
|
||||
# make sure mirroring module is enabled
|
||||
mgr_map = self.mgr.get('mgr_map')
|
||||
mod_name = 'mirroring'
|
||||
if mod_name not in mgr_map.get('services', {}):
|
||||
self.mgr.check_mon_command({
|
||||
'prefix': 'mgr module enable',
|
||||
'module': mod_name
|
||||
})
|
||||
# we shouldn't get here (mon will tell the mgr to respawn), but no
|
||||
# harm done if we do.
|
||||
|
||||
def prepare_create(self, daemon_spec: CephadmDaemonDeploySpec) -> CephadmDaemonDeploySpec:
|
||||
assert self.TYPE == daemon_spec.daemon_type
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user