]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: switch iscsi class to use daemon_to_container function
authorJohn Mulligan <jmulligan@redhat.com>
Sun, 5 Nov 2023 20:17:33 +0000 (15:17 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Fri, 17 Nov 2023 13:10:11 +0000 (08:10 -0500)
Switch the iscsi daemon type class to call daemon_to_container instead of
get_container in the class's container method. This breaks a dependency loop
between the class and the get_container function hopefully enabling future
clean ups and code moves.

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

index fd213ffd6c852c1e863aeb06bf13925be03b2829..7d91d90dccbdf3d0b0a68530ab3ba52f9fc91238 100755 (executable)
@@ -1355,7 +1355,9 @@ done
         return tcmu_container
 
     def container(self, ctx: CephadmContext) -> CephContainer:
-        ctr = get_container(ctx, self.identity)
+        # So the container can modprobe iscsi_target_mod and have write perms
+        # to configfs we need to make this a privileged container.
+        ctr = daemon_to_container(ctx, self, privileged=True)
         return to_deployment_container(ctx, ctr)
 
     def config_and_keyring(