]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: move volume mounts assignment to a variable
authorJohn Mulligan <jmulligan@redhat.com>
Sat, 4 Nov 2023 22:39:07 +0000 (18:39 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Sat, 11 Nov 2023 13:10:48 +0000 (08:10 -0500)
Move the call to get_container_mounts out of the function call block.
This will aid with the next refactoring steps, so that the uses
of get_container_mounts can be brought into the get_container call
directly.

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

index 9a1989a3c956e7c1d68d23aefbe778a3cf16236f..79e718afefda80e5f869d36a03728c7aaef01846 100755 (executable)
@@ -2872,13 +2872,14 @@ def get_container(
         d_args.extend(sg.get_daemon_args())
 
     _update_container_args_for_podman(ctx, ident, container_args)
+    mounts = get_container_mounts(ctx, ident)
     return CephContainer.for_daemon(
         ctx,
         ident=ident,
         entrypoint=entrypoint,
         args=ceph_args + d_args,
         container_args=container_args,
-        volume_mounts=get_container_mounts(ctx, ident),
+        volume_mounts=mounts,
         bind_mounts=binds,
         envs=envs,
         privileged=privileged,