]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: Give better access to the /dev in the iscsi container 36841/head
authorMatthew Oliver <moliver@suse.com>
Thu, 27 Aug 2020 02:44:40 +0000 (12:44 +1000)
committerMatthew Oliver <moliver@suse.com>
Thu, 27 Aug 2020 02:44:40 +0000 (12:44 +1000)
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 <moliver@suse.com>
src/cephadm/cephadm

index 031376b9787f1bd22666cc7bc337474d80bc3494..5afff57ccc7a7c44fe98fc305374e7c82ae0a3d5 100755 (executable)
@@ -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