]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: fix iSCSI unit.run file 36980/head
authorAdam King <adking@redhat.com>
Thu, 3 Sep 2020 16:30:33 +0000 (12:30 -0400)
committerAdam King <adking@redhat.com>
Thu, 3 Sep 2020 17:53:50 +0000 (13:53 -0400)
Current unit.run file generated for iSCSI when using podman
tries to have two containers use the same conmon pidfile and
cidfile for both containers which is invalid
Fixes: https://tracker.ceph.com/issues/47291
Signed-off-by: Adam King <adking@redhat.com>
src/cephadm/cephadm

index 9d2f7020280f0b4cebd453f2ee3fae6deee5d634..80fa58645edca74d0b4b4ecb6b42beb7dfbe82dc 100755 (executable)
@@ -481,6 +481,9 @@ class CephIscsi(object):
         tcmu_container = get_container(self.fsid, self.daemon_type, self.daemon_id)
         tcmu_container.entrypoint = "/usr/bin/tcmu-runner"
         tcmu_container.cname = self.get_container_name(desc='tcmu')
+        # remove extra container args for tcmu container.
+        # extra args could cause issue with forking service type
+        tcmu_container.container_args = []
         return tcmu_container
 
 ##################################
@@ -1773,8 +1776,10 @@ def get_container_mounts(fsid, daemon_type, daemon_id,
 def get_container(fsid, daemon_type, daemon_id,
                   privileged=False,
                   ptrace=False,
-                  container_args=[]):
-    # type: (str, str, Union[int, str], bool, bool, List[str]) -> CephContainer
+                  container_args=None):
+    # type: (str, str, Union[int, str], bool, bool, Optional[List[str]]) -> CephContainer
+    if container_args is None:
+        container_args = []
     if daemon_type in ['mon', 'osd']:
         # mon and osd need privileged in order for libudev to query devices
         privileged = True