object: fix the deafult multisite zonegroup creation

there was a bug in the code which doesn't
sets realm if we try to get the zonegoup
so because of that 1.12 this backport pr
for original change was not working

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit a9c77280c6)
This commit is contained in:
parth-gr authored and Mergify committed 2024-01-31 14:57:45 +00:00
1 parent c46f1bdd3f
commit 2cc5682a35
1 file changed
+5 -1
+5 -1
View File
@@ -392,7 +392,11 @@ func createMultisiteConfigurations(objContext *Context, configType, configTypeAr
args = append([]string{configType}, args...)
args = append(args, configTypeArg)
// get the multisite config before creating
output, getConfigErr := RunAdminCommandNoMultisite(objContext, true, configType, "get", configTypeArg)
configTypeArgs := []string{configType, "get", configTypeArg}
if configType == "zonegroup" {
configTypeArgs = append(configTypeArgs, fmt.Sprintf("--rgw-realm=%s", objContext.Realm))
}
output, getConfigErr := RunAdminCommandNoMultisite(objContext, true, configTypeArgs...)
if getConfigErr == nil {
return nil
}