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:
parth-gr authored and Mergify committed 2022-09-12 21:16:28 +00:00
1 parent fd5e0d57e5
commit 32e4160971
1 file changed
+2 -2
@@ -1092,7 +1092,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))
@@ -1123,7 +1123,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",