From: Sebastian Wagner Date: Fri, 19 Jun 2020 11:21:13 +0000 (+0200) Subject: Merge pull request #35141 from matthewoliver/cephadm_iscsi_lib_module_mount X-Git-Tag: v16.1.0~2011 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=505b62f630466d2c82a99c23dc802a68fe19a8da;p=ceph.git Merge pull request #35141 from matthewoliver/cephadm_iscsi_lib_module_mount cephadm: Give iscsci a RO /lib/modules bind mounted Reviewed-by: Michael Fritch Reviewed-by: Sebastian Wagner --- 505b62f630466d2c82a99c23dc802a68fe19a8da diff --cc src/cephadm/cephadm index 0cf359f58e4,4b2c8b3a476..7ff30248e9a --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@@ -384,9 -378,20 +384,20 @@@ class CephIscsi(object) mounts['/dev/log'] = '/dev/log:z' return mounts + @staticmethod + def get_container_binds(): + # type: () -> List[List[str]] + binds = [] + lib_modules = ['type=bind', + 'source=/lib/modules', + 'destination=/lib/modules', + 'ro=true'] + binds.append(lib_modules) + return binds + @staticmethod def get_version(container_id): - # type(str) -> Optional[str] + # type: (str) -> Optional[str] version = None out, err, code = call( [container_path, 'exec', container_id,