]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: fix an error running iscsi services 52690/head
authorJohn Mulligan <jmulligan@redhat.com>
Wed, 13 Sep 2023 19:44:40 +0000 (15:44 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Wed, 13 Sep 2023 19:44:40 +0000 (15:44 -0400)
Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/cephadmlib/daemon_identity.py

index 3e79e8f9f6a2599ea13c62f44fc727ea6895def7..f7e958ebf748c300fe0968d02af40221c3429c91 100644 (file)
@@ -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(