Skip to content

Commit

Permalink
Merge pull request #9249 from olivierbouffet/fixrgwflag
Browse files Browse the repository at this point in the history
object: fix rgw ceph config
  • Loading branch information
leseb committed Nov 25, 2021
2 parents 32cb63b + c92270c commit fbe47e4
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
Expand Up @@ -108,16 +108,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
Expand Up @@ -129,7 +129,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 fbe47e4

Please sign in to comment.