Skip to content

Commit

Permalink
object: fix rgw ceph config
Browse files Browse the repository at this point in the history
use Zone and ZoneGroup instead of storename for rgw_zone and rgw_zonegroup

Signed-off-by: Olivier Bouffet <olivier.bouffet@infomaniak.com>
(cherry picked from commit c92270c)
  • Loading branch information
olivierbouffet authored and leseb committed Nov 25, 2021
1 parent 0dcfefa commit 561cede
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pkg/operator/ceph/object/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,16 @@ func (c *clusterConfig) generateKeyring(rgwConfig *rgwConfig) (string, error) {
return keyring, s.CreateOrUpdate(rgwConfig.ResourceName, keyring)
}

func (c *clusterConfig) setDefaultFlagsMonConfigStore(rgwName string) error {
func (c *clusterConfig) setDefaultFlagsMonConfigStore(rgwConfig *rgwConfig) error {
monStore := cephconfig.GetMonStore(c.context, c.clusterInfo)
who := generateCephXUser(rgwName)
who := generateCephXUser(rgwConfig.ResourceName)
configOptions := make(map[string]string)

configOptions["rgw_log_nonexistent_bucket"] = "true"
configOptions["rgw_log_object_name_utc"] = "true"
configOptions["rgw_enable_usage_log"] = "true"
configOptions["rgw_zone"] = c.store.Name
configOptions["rgw_zonegroup"] = c.store.Name
configOptions["rgw_zone"] = rgwConfig.Zone
configOptions["rgw_zonegroup"] = rgwConfig.ZoneGroup

for flag, val := range configOptions {
err := monStore.Set(who, flag, val)
Expand Down
2 changes: 1 addition & 1 deletion pkg/operator/ceph/object/rgw.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func (c *clusterConfig) startRGWPods(realmName, zoneGroupName, zoneName string)
// Unfortunately, on upgrade we would not set the flags which is not ideal for old clusters where we were no setting those flags
// The KV supports setting those flags even if the RGW is running
logger.Info("setting rgw config flags")
err = c.setDefaultFlagsMonConfigStore(rgwConfig.ResourceName)
err = c.setDefaultFlagsMonConfigStore(rgwConfig)
if err != nil {
// Getting EPERM typically happens when the flag may not be modified at runtime
// This is fine to ignore
Expand Down

0 comments on commit 561cede

Please sign in to comment.