From: Matthew Oliver Date: Thu, 27 Aug 2020 02:44:40 +0000 (+1000) Subject: cephadm: Give better access to the /dev in the iscsi container X-Git-Tag: v15.2.9~122^2~117^2~20 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=edd82d8aa0dfe4f362e8740b94a82468386496cd;p=ceph.git cephadm: Give better access to the /dev in the iscsi container In testing it seems the main iscsi container's /dev related volume mount to just /dev/log is too narrow. And in certain circumstances it needs to access to see /dev/rbd* devices. Like if using krdb. This patch volume mounts /dev rather then /dev/log in the main container, but since this aligns with what we need in the tcmu-runner container it actaully ends up simplifying the code as well. Signed-off-by: Matthew Oliver (cherry picked from commit 40c0d6821252e8112b655dee67d9d3eb5b7ffbff) --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 4795ba4a9a926..c93f8e48c61f7 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -385,7 +385,7 @@ class CephIscsi(object): mounts[os.path.join(data_dir, 'iscsi-gateway.cfg')] = '/etc/ceph/iscsi-gateway.cfg:z' mounts[os.path.join(data_dir, 'configfs')] = '/sys/kernel/config:z' mounts[log_dir] = '/var/log/rbd-target-api:z' - mounts['/dev/log'] = '/dev/log:z' + mounts['/dev'] = '/dev:z' return mounts @staticmethod @@ -480,8 +480,6 @@ class CephIscsi(object): # type: () -> CephContainer tcmu_container = get_container(self.fsid, self.daemon_type, self.daemon_id) tcmu_container.entrypoint = "/usr/bin/tcmu-runner" - tcmu_container.volume_mounts.pop("/dev/log") - tcmu_container.volume_mounts["/dev"] = "/dev:z" tcmu_container.cname = self.get_container_name(desc='tcmu') return tcmu_container