From: Adam King Date: Thu, 3 Sep 2020 16:30:33 +0000 (-0400) Subject: cephadm: fix iSCSI unit.run file X-Git-Tag: v15.2.9~122^2~44^2~43 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=38818e53791b5866e46e724e4a38ce0523907394;p=ceph.git cephadm: fix iSCSI unit.run file 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 (cherry picked from commit 0d993640af3f3ff9572e62af9811d94a992df0dd) --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 9a42fd9da37b1..f4723ba9a26c9 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -512,6 +512,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 ################################## @@ -1805,8 +1808,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