-
Notifications
You must be signed in to change notification settings - Fork 20
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
Conversation
} | ||
|
||
// Check to see if it is a RamenConfig | ||
if _, ok := cm.Data["ramen_manager_config.yaml"]; !ok { |
There was a problem hiding this comment.
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)
There was a problem hiding this 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 <vbadrina@redhat.com>
[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:
Approvers can indicate their approval by writing |
/cherry-pick release-4.14 |
@vbnrh: failed to push cherry-picked changes in GitHub: pushToNamedFork is not implemented in the v2 client In response to this:
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. |
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.