Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with empty s3 profile config #179

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

vbnrh
Copy link
Member

@vbnrh vbnrh commented Oct 4, 2023

This commit fixes issue where s3 profile config is not updated in the Ramen config map. This is due to a race condition existing between MCO and Ramen where Ramen starts after MCO during upgrade at which point s3profile is updated and Ramen replaces this with newly created default config.

This fix will ensure that any changes to Ramen configmap is watched and triggers reconcile for all secrets in the current namespace which should ensure that s3profile is properly updated regardless of the upgrade sequence.

@openshift-ci openshift-ci bot added the approved label Oct 4, 2023
}

// Check to see if it is a RamenConfig
if _, ok := cm.Data["ramen_manager_config.yaml"]; !ok {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would possibly look at this as YAML unmarshalling one of the data keys to RamenConfig and if that goes through, then consider this a ramen config map change. This line assumes the key for the data would remain constant at this point.

IOW something like this:

ramenConfig = &ramendrv1alpha1.RamenConfig{}
err = yaml.Unmarshal([]byte(configMap.Data[ConfigMapRamenConfigKeyName]), ramenConfig)

Copy link

@ShyamsundarR ShyamsundarR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than the one comment on name assumption.

This commit fixes issue where s3 profile config is not updated in the Ramen config map.
This is due to a race condition existing between MCO and Ramen where Ramen starts after MCO during upgrade at which point s3profile is updated and  Ramen replaces this with newly created default config.

This fix will ensure that any changes to Ramen configmap is watched and triggers reconcile for all secrets in the current namespace which should ensure that s3profile is properly updated regardless of the upgrade sequence.

Signed-off-by: vbadrina <[email protected]>
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 5, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: umangachapagain, vbnrh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [umangachapagain,vbnrh]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot merged commit c0ecede into red-hat-storage:main Oct 5, 2023
8 checks passed
@vbnrh
Copy link
Member Author

vbnrh commented Oct 5, 2023

/cherry-pick release-4.14

@openshift-cherrypick-robot

@vbnrh: failed to push cherry-picked changes in GitHub: pushToNamedFork is not implemented in the v2 client

In response to this:

/cherry-pick release-4.14

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants