From: John Mulligan Date: Wed, 13 Sep 2023 19:44:40 +0000 (-0400) Subject: cephadm: fix an error running iscsi services X-Git-Tag: v19.0.0~479^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F52690%2Fhead;p=ceph.git cephadm: fix an error running iscsi services Signed-off-by: John Mulligan --- diff --git a/src/cephadm/cephadmlib/daemon_identity.py b/src/cephadm/cephadmlib/daemon_identity.py index 3e79e8f9f6a2..f7e958ebf748 100644 --- a/src/cephadm/cephadmlib/daemon_identity.py +++ b/src/cephadm/cephadmlib/daemon_identity.py @@ -88,6 +88,14 @@ class DaemonSubIdentity(DaemonIdentity): name = f'ceph-{self.fsid}-{self.daemon_type}-{self.daemon_id}-{self.subcomponent}' return name.replace('.', '-') + @property + def unit_name(self) -> str: + # NB: This is a minor hack because a subcomponent may be running as part + # of the same unit as the primary. However, to fix a bug with iscsi + # this is a quick and dirty workaround for distinguishing the two types + # when generating --cidfile and --conmon-pidfile values. + return f'ceph-{self.fsid}@{self.daemon_type}.{self.daemon_id}.{self.subcomponent}' + @property def legacy_container_name(self) -> str: raise ValueError(