external: do not add info=read cap if ceph version doesn't support it
The rgw ip validation feature was needing to update the rgw user
cap to add info=read permission, but this permission is only backported
till ceph pacific, so we added a check that only add this cap
when ceph version support it,
But this cap was also adding with the other caps, so removed it from there
Now it will only add this cap if ceph version support it
Signed-off-by: parth-gr <paarora@redhat.com>
(cherry picked from commit 54425803b6)
This commit is contained in:
1 parent
5dcfeca428
commit
77aef59108
1 file changed
+2
-2
@@ -1097,7 +1097,7 @@ class RadosJSON:
|
||||
"--display-name",
|
||||
"Rook RGW Admin Ops user",
|
||||
"--caps",
|
||||
"info=read;buckets=*;users=*;usage=read;metadata=read;zone=read",
|
||||
"buckets=*;users=*;usage=read;metadata=read;zone=read",
|
||||
]
|
||||
if self._arg_parser.dry_run:
|
||||
return self.dry_run("ceph " + " ".join(cmd))
|
||||
@@ -1128,7 +1128,7 @@ class RadosJSON:
|
||||
)
|
||||
raise Exception(err_msg)
|
||||
|
||||
# separately add info=read caps, because sometimes users already exited and the cap doesn't update
|
||||
# separately add info=read caps for rgw-endpoint ip validation
|
||||
info_cap_supported = True
|
||||
cmd = [
|
||||
"radosgw-admin",
|
||||
|
||||
Reference in new issue
Block a user