From: John Mulligan Date: Sun, 5 Nov 2023 13:09:10 +0000 (-0500) Subject: cephadm: add more ContainerDeamonForm methods to the nfs class X-Git-Tag: v19.0.0~79^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9ffe0771f7c719a6a6e8a564adfa573a4fce4d28;p=ceph-ci.git cephadm: add more ContainerDeamonForm methods to the nfs class Add methods customize_{container_envs,process_args} & default_entrypoint to the nfs daemon type class. Use those methods in the get_container function. Signed-off-by: John Mulligan --- diff --git a/src/cephadm/cephadm.py b/src/cephadm/cephadm.py index 7e9065ac29f..171d2a1c928 100755 --- a/src/cephadm/cephadm.py +++ b/src/cephadm/cephadm.py @@ -1051,6 +1051,19 @@ class NFSGanesha(ContainerDaemonForm): ) -> Tuple[Optional[str], Optional[str]]: return get_config_and_keyring(ctx) + def customize_container_envs( + self, ctx: CephadmContext, envs: List[str] + ) -> None: + envs.extend(self.get_container_envs()) + + def customize_process_args( + self, ctx: CephadmContext, args: List[str] + ) -> None: + args.extend(self.get_daemon_args()) + + def default_entrypoint(self) -> str: + return self.entrypoint + ################################## @@ -2919,11 +2932,10 @@ def get_container( tracing = Tracing.create(ctx, ident) d_args.extend(tracing.get_daemon_args()) elif daemon_type == NFSGanesha.daemon_type: - entrypoint = NFSGanesha.entrypoint - name = ident.daemon_name - envs.extend(NFSGanesha.get_container_envs()) - nfs_ganesha = NFSGanesha.init(ctx, ident.fsid, ident.daemon_id) - d_args.extend(nfs_ganesha.get_daemon_args()) + nfs_ganesha = NFSGanesha.create(ctx, ident) + entrypoint = nfs_ganesha.default_entrypoint() + nfs_ganesha.customize_container_envs(ctx, envs) + nfs_ganesha.customize_process_args(ctx, d_args) mounts = get_container_mounts(ctx, ident) elif daemon_type == CephExporter.daemon_type: ceph_exporter = CephExporter.create(ctx, ident)