From b811205048fca45fd55e783de51755afb6c535cf Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Wed, 13 Sep 2023 15:44:40 -0400 Subject: [PATCH] cephadm: fix an error running iscsi services Signed-off-by: John Mulligan --- src/cephadm/cephadmlib/daemon_identity.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/cephadm/cephadmlib/daemon_identity.py b/src/cephadm/cephadmlib/daemon_identity.py index 3e79e8f9f6a25..f7e958ebf748c 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( -- 2.39.5