]> 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>
Tue, 20 Feb 2024 14:04:02 +0000 (09:04 -0500)
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)

src/cephadm/cephadm.py

index 5a7ed9e766569e0d7446fe9041eee51667d337f3..4cdd52972faf747e59feae0f87eef382596a90d4 100755 (executable)
@@ -805,6 +805,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)