]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: add a prepare_data_dir method to container daemon form
authorJohn Mulligan <jmulligan@redhat.com>
Fri, 24 Nov 2023 19:45:15 +0000 (14:45 -0500)
committerAdam King <adking@redhat.com>
Wed, 27 Mar 2024 20:11:42 +0000 (16:11 -0400)
The prepare_data_dir method is a general way for classes to prepare the
data dir (e.g. `/var/lib/ceph/$FSID/$DAEMON_TYPE.$DAEMON_ID`) before
containers will use it.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit 044e4d64790d3c06cbf67a6c783c19edcfcf2d51)
(cherry picked from commit f73c0665f2be46b6aef535a988e5550a92669cc1)

src/cephadm/cephadmlib/container_daemon_form.py

index f99c69f9b6a0e4f5d8d16595318b626f7fcd0314..8696c9cbd66fd0182c2106fa010f6fb06dd9a5d0 100644 (file)
@@ -120,6 +120,9 @@ class ContainerDaemonForm(DaemonForm):
         """
         return ''
 
+    def prepare_data_dir(self, data_dir: str, uid: int, gid: int) -> None:
+        pass
+
 
 def daemon_to_container(
     ctx: CephadmContext,