From 40c0d6821252e8112b655dee67d9d3eb5b7ffbff Mon Sep 17 00:00:00 2001 From: Matthew Oliver Date: Thu, 27 Aug 2020 12:44:40 +1000 Subject: [PATCH] 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 --- src/cephadm/cephadm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 031376b9787..5afff57ccc7 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 -- 2.39.5