]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: handle the case where ctx may not have a config attribute
authorJohn Mulligan <jmulligan@redhat.com>
Sun, 5 Nov 2023 18:20:26 +0000 (13:20 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Fri, 17 Nov 2023 13:10:11 +0000 (08:10 -0500)
This prevents a test failure in future refactoring changes.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/cephadm.py

index 5238e33e9c50065fd0dfaa7dba8e0afff8ebe170..ad3a46faad9b5bc00be9525f27292ed392b6d4bc 100755 (executable)
@@ -344,10 +344,13 @@ class Ceph(ContainerDaemonForm):
     def customize_container_mounts(
         self, ctx: CephadmContext, mounts: Dict[str, str]
     ) -> None:
+        no_config = bool(
+            getattr(ctx, 'config', None) and self.user_supplied_config
+        )
         cm = self.get_ceph_mounts(
             ctx,
             self.identity,
-            no_config=self.ctx.config and self.user_supplied_config,
+            no_config=no_config,
         )
         mounts.update(cm)