]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: move bind mounts assignment to a variable
authorJohn Mulligan <jmulligan@redhat.com>
Fri, 20 Oct 2023 17:49:50 +0000 (13:49 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Thu, 9 Nov 2023 19:50:46 +0000 (14:50 -0500)
Move the call to get_container_binds out of the function call.
This will aid with the next refactoring steps, so that the uses
of get_container_binds can be brought into the get_container call
directly.

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

index 7d6855778afae6939405a2fc71a86f25e9578b2d..d99af63ddefb5cd6bc187a01ce17560c1a972142 100755 (executable)
@@ -2876,6 +2876,7 @@ def get_container(
         d_args.extend(sg.get_daemon_args())
 
     _update_container_args_for_podman(ctx, ident, container_args)
+    binds = get_container_binds(ctx, ident)
     return CephContainer.for_daemon(
         ctx,
         ident=ident,
@@ -2883,7 +2884,7 @@ def get_container(
         args=ceph_args + d_args,
         container_args=container_args,
         volume_mounts=get_container_mounts(ctx, ident),
-        bind_mounts=get_container_binds(ctx, ident),
+        bind_mounts=binds,
         envs=envs,
         privileged=privileged,
         ptrace=ptrace,