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>
(cherry picked from commit
40c0d6821252e8112b655dee67d9d3eb5b7ffbff)
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
# 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