From: John Mulligan Date: Sun, 5 Nov 2023 16:12:54 +0000 (-0500) Subject: cephadm: add methods to ceph daemon type class X-Git-Tag: v19.0.0~79^2~3 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=882073bc46c888289ae76fdc817995ced6169e02;p=ceph-ci.git cephadm: add methods to ceph daemon type class Add unused methods to the ceph class in order to prepare for moving the logic for setting up the various ceph deaemon types to be handled by the class. Signed-off-by: John Mulligan --- diff --git a/src/cephadm/cephadm.py b/src/cephadm/cephadm.py index b704e50c9c4..3ea41e47c9d 100755 --- a/src/cephadm/cephadm.py +++ b/src/cephadm/cephadm.py @@ -351,6 +351,34 @@ class Ceph(ContainerDaemonForm): ) mounts.update(cm) + def customize_process_args( + self, ctx: CephadmContext, args: List[str] + ) -> None: + ident = self.identity + if ident.daemon_type == 'rgw': + name = 'client.rgw.%s' % ident.daemon_id + elif ident.daemon_type == 'rbd-mirror': + name = 'client.rbd-mirror.%s' % ident.daemon_id + elif ident.daemon_type == 'cephfs-mirror': + name = 'client.cephfs-mirror.%s' % ident.daemon_id + elif ident.daemon_type == 'crash': + name = 'client.crash.%s' % ident.daemon_id + elif ident.daemon_type in ['mon', 'mgr', 'mds', 'osd']: + name = ident.daemon_name + else: + raise ValueError(ident) + args.extend(['-n', name, '-f']) + args.extend(self.get_daemon_args()) + + def default_entrypoint(self) -> str: + ep = { + 'rgw': '/usr/bin/radosgw', + 'rbd-mirror': '/usr/bin/rbd-mirror', + 'cephfs-mirror': '/usr/bin/cephfs-mirror', + } + daemon_type = self.identity.daemon_type + return ep.get(daemon_type) or f'/usr/bin/ceph-{daemon_type}' + ##################################