]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm: call container daemon form prepare_data_dir
authorJohn Mulligan <jmulligan@redhat.com>
Fri, 24 Nov 2023 19:45:34 +0000 (14:45 -0500)
committerAdam King <adking@redhat.com>
Wed, 27 Mar 2024 20:11:43 +0000 (16:11 -0400)
Instead of always climbing through an "if ladder" based on daemon type
variables we will have the option of using the common method provided
by container daemon form classes. This will initially be used by the
smb daemon. I don't have the energy to refactor all the existing stuff
at the moment.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit 0f6a18a09cba35515e100f457e224537ad1e5608)
(cherry picked from commit bf7e40b4d1fee439a4a7f48cf033d4a0885890d0)

src/cephadm/cephadm.py

index 606993c8018c4ea6badb4cb33aaaa6be2050b42e..890b447e93c9f71e842737ec96f144eeb774eded 100755 (executable)
@@ -807,6 +807,11 @@ def create_daemon_dirs(
         node_proxy = NodeProxy.init(ctx, fsid, ident.daemon_id)
         node_proxy.create_daemon_dirs(data_dir, uid, gid)
 
+    else:
+        daemon = daemon_form_create(ctx, ident)
+        if isinstance(daemon, ContainerDaemonForm):
+            daemon.prepare_data_dir(data_dir, uid, gid)
+
     _write_custom_conf_files(ctx, ident, uid, gid)