From de9e84a02632bf0844af917f6367a907ba65e61f Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 12 Dec 2019 16:43:02 +0000 Subject: [PATCH] orchestra: ceph-daemon -> cephadm Signed-off-by: Sage Weil --- .../daemon/{cephdaemonunit.py => cephadmunit.py} | 8 ++++---- teuthology/orchestra/daemon/group.py | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) rename teuthology/orchestra/daemon/{cephdaemonunit.py => cephadmunit.py} (95%) diff --git a/teuthology/orchestra/daemon/cephdaemonunit.py b/teuthology/orchestra/daemon/cephadmunit.py similarity index 95% rename from teuthology/orchestra/daemon/cephdaemonunit.py rename to teuthology/orchestra/daemon/cephadmunit.py index e92a423c7..3436c863e 100644 --- a/teuthology/orchestra/daemon/cephdaemonunit.py +++ b/teuthology/orchestra/daemon/cephadmunit.py @@ -4,14 +4,14 @@ from teuthology.orchestra.daemon.state import DaemonState log = logging.getLogger(__name__) -class CephDaemonUnit(DaemonState): +class CephadmUnit(DaemonState): def __init__(self, remote, role, id_, *command_args, **command_kwargs): - super(CephDaemonUnit, self).__init__( + super(CephadmUnit, self).__init__( remote, role, id_, *command_args, **command_kwargs) self._set_commands() self.log = command_kwargs.get('logger', log) - self.use_ceph_daemon = command_kwargs.get('use_ceph_daemon') + self.use_cephadm = command_kwargs.get('use_cephadm') self.is_started = command_kwargs.get('started', False) if self.is_started: self._start_logger() @@ -36,7 +36,7 @@ class CephDaemonUnit(DaemonState): def _start_logger(self): name = '%s.%s' % (self.type_, self.id_) self.remote_logger = self.remote.run( - args=['sudo', self.use_ceph_daemon, 'logs', + args=['sudo', self.use_cephadm, 'logs', '-f', '--fsid', self.fsid, '--name', name], diff --git a/teuthology/orchestra/daemon/group.py b/teuthology/orchestra/daemon/group.py index 1ff295533..656f5a0ba 100644 --- a/teuthology/orchestra/daemon/group.py +++ b/teuthology/orchestra/daemon/group.py @@ -1,14 +1,14 @@ from teuthology import misc from teuthology.orchestra.daemon.state import DaemonState from teuthology.orchestra.daemon.systemd import SystemDState -from teuthology.orchestra.daemon.cephdaemonunit import CephDaemonUnit +from teuthology.orchestra.daemon.cephadmunit import CephadmUnit class DaemonGroup(object): """ Collection of daemon state instances """ - def __init__(self, use_systemd=False, use_ceph_daemon=None): + def __init__(self, use_systemd=False, use_cephadm=None): """ self.daemons is a dictionary indexed by role. Each entry is a dictionary of DaemonState values indexed by an id parameter. @@ -19,7 +19,7 @@ class DaemonGroup(object): """ self.daemons = {} self.use_systemd = use_systemd - self.use_ceph_daemon = use_ceph_daemon + self.use_cephadm = use_cephadm def add_daemon(self, remote, type_, id_, *args, **kwargs): """ @@ -61,9 +61,9 @@ class DaemonGroup(object): self.daemons[role][id_] = None klass = DaemonState - if self.use_ceph_daemon: - klass = CephDaemonUnit - kwargs['use_ceph_daemon'] = self.use_ceph_daemon + if self.use_cephadm: + klass = CephadmUnit + kwargs['use_cephadm'] = self.use_cephadm elif self.use_systemd and \ not any(i == 'valgrind' for i in args) and \ remote.init_system == 'systemd': -- 2.47.3