From: John Mulligan Date: Sun, 5 Nov 2023 12:45:26 +0000 (-0500) Subject: cephadm: add more ContainerDeamonForm methods to the nvmeof class X-Git-Tag: v19.0.0~79^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5bc8b8d80be94e319c70cbb64b2dce9d1f8a660e;p=ceph.git cephadm: add more ContainerDeamonForm methods to the nvmeof class Add method customize_container_args to the nvmeof daemon type class. Use that method in the get_container function. Signed-off-by: John Mulligan --- diff --git a/src/cephadm/cephadm.py b/src/cephadm/cephadm.py index 6e34834535df..ba2dc68bdd0b 100755 --- a/src/cephadm/cephadm.py +++ b/src/cephadm/cephadm.py @@ -1433,6 +1433,13 @@ class CephNvmeof(ContainerDaemonForm): ) -> Tuple[Optional[str], Optional[str]]: return get_config_and_keyring(ctx) + def customize_container_args( + self, ctx: CephadmContext, args: List[str] + ) -> None: + args.extend(['--ulimit', 'memlock=-1:-1']) + args.extend(['--ulimit', 'nofile=10240']) + args.extend(['--cap-add=SYS_ADMIN', '--cap-add=CAP_SYS_NICE']) + ################################## @@ -2903,10 +2910,8 @@ def get_container( container_args.extend(['--cap-add=NET_ADMIN', '--cap-add=NET_RAW']) mounts = get_container_mounts(ctx, ident) elif daemon_type == CephNvmeof.daemon_type: - name = ident.daemon_name - container_args.extend(['--ulimit', 'memlock=-1:-1']) - container_args.extend(['--ulimit', 'nofile=10240']) - container_args.extend(['--cap-add=SYS_ADMIN', '--cap-add=CAP_SYS_NICE']) + nvmeof = CephNvmeof.create(ctx, ident) + nvmeof.customize_container_args(ctx, container_args) binds = get_container_binds(ctx, ident) mounts = get_container_mounts(ctx, ident) elif daemon_type == CephIscsi.daemon_type: