From: John Mulligan Date: Sun, 5 Nov 2023 18:41:29 +0000 (-0500) Subject: cephadm: switch ceph class to use daemon_to_container function X-Git-Tag: v19.0.0~24^2~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=32cfb80d81e092a845d1baab0ad39299738a47cb;p=ceph.git cephadm: switch ceph class to use daemon_to_container function Switch the ceph daemon type class to call daemon_to_container instead of get_container in the class's container method. This breaks a dependency loop between the class and the get_container function hopefully enabling future clean ups and code moves. Signed-off-by: John Mulligan --- diff --git a/src/cephadm/cephadm.py b/src/cephadm/cephadm.py index b4d60dde8441..fb39a9eb03aa 100755 --- a/src/cephadm/cephadm.py +++ b/src/cephadm/cephadm.py @@ -169,7 +169,10 @@ from cephadmlib.daemon_form import ( register as register_daemon_form, ) from cephadmlib.deploy import DeploymentType -from cephadmlib.container_daemon_form import ContainerDaemonForm +from cephadmlib.container_daemon_form import ( + ContainerDaemonForm, + daemon_to_container, +) from cephadmlib.sysctl import install_sysctl, migrate_sysctl_dir from cephadmlib.firewalld import Firewalld, update_firewalld from cephadmlib import templating @@ -246,7 +249,9 @@ class Ceph(ContainerDaemonForm): uid, gid = self.uid_gid(ctx) make_var_run(ctx, ctx.fsid, uid, gid) - ctr = get_container(ctx, self.identity) + # mon and osd need privileged in order for libudev to query devices + privileged = self.identity.daemon_type in ['mon', 'osd'] + ctr = daemon_to_container(ctx, self, privileged=privileged) ctr = to_deployment_container(ctx, ctr) config_json = fetch_configs(ctx) if self.identity.daemon_type == 'mon' and config_json is not None: