Skip to content

Commit b811205

Browse files
cephadm: fix an error running iscsi services
Signed-off-by: John Mulligan <jmulligan@redhat.com>
1 parent d22a9d7 commit b811205

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/cephadm/cephadmlib/daemon_identity.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,14 @@ def container_name(self) -> str:
8888
name = f'ceph-{self.fsid}-{self.daemon_type}-{self.daemon_id}-{self.subcomponent}'
8989
return name.replace('.', '-')
9090

91+
@property
92+
def unit_name(self) -> str:
93+
# NB: This is a minor hack because a subcomponent may be running as part
94+
# of the same unit as the primary. However, to fix a bug with iscsi
95+
# this is a quick and dirty workaround for distinguishing the two types
96+
# when generating --cidfile and --conmon-pidfile values.
97+
return f'ceph-{self.fsid}@{self.daemon_type}.{self.daemon_id}.{self.subcomponent}'
98+
9199
@property
92100
def legacy_container_name(self) -> str:
93101
raise ValueError(

0 commit comments

Comments
 (0)