]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: switch ceph class to use daemon_to_container function
authorJohn Mulligan <jmulligan@redhat.com>
Sun, 5 Nov 2023 18:41:29 +0000 (13:41 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Fri, 17 Nov 2023 13:10:11 +0000 (08:10 -0500)
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 <jmulligan@redhat.com>
src/cephadm/cephadm.py

index b4d60dde8441550026ad8d9d31d55ee66eff9d62..fb39a9eb03aa09d39825e7ecd33df4902ff2659c 100755 (executable)
@@ -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: