]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: ceph-iscsi remove pool from cap
authorMatthew Oliver <moliver@suse.com>
Fri, 26 Jun 2020 00:15:12 +0000 (00:15 +0000)
committerSebastian Wagner <sebastian.wagner@suse.com>
Tue, 14 Jul 2020 09:39:06 +0000 (11:39 +0200)
When we create a ceph-iscsi daemon/continer in cephadm we create a user
and set some caps. Turns out we were a little too restrictive.

We were locking down to only access the pool that was given in the spec,
which happens to be the pool the iscsi config is stored. But in reality
we need to be able  to attach any rbd images which could exist in other
pools.

So this patch removes the `pool=` from the osd cap, so from:

   osd = allow rwx pool={spec.pool}

To:

   osd = allow rwx

Fixes: https://tracker.ceph.com/issues/46138
Signed-off-by: Matthew Oliver <moliver@suse.com>
(cherry picked from commit 8cf51251a3299bf5a65ea338f9fb06c4f3052ad1)

src/pybind/mgr/cephadm/services/iscsi.py

index 68aad45d2fa3fbea972faa8f5be0152a7fdddebf..08db11590dbb3cace7227e5e92d107840fe724e9 100644 (file)
@@ -29,7 +29,7 @@ class IscsiService(CephadmService):
             'caps': ['mon', 'profile rbd, '
                             'allow command "osd blacklist", '
                             'allow command "config-key get" with "key" prefix "iscsi/"',
-                     'osd', f'allow rwx pool={spec.pool}'],
+                     'osd', 'allow rwx'],
         })
 
         if spec.ssl_cert: