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(migrate): update lock file path when csp is scaled down #85
fix(migrate): update lock file path when csp is scaled down #85
Conversation
Signed-off-by: shubham <shubham.bajpai@mayadata.io>
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 also need to go through an import code path/doc to understand in a case where the process was crashed during the renaming of the pool
Signed-off-by: shubham shubham.bajpai@mayadata.io Co-authored-by: sai chaithanya <sai.chaithanya@mayadata.io>
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.
changes are good
newCSPDeploy.Spec.Template.Spec.Volumes = cspiDeploy.Spec.Template.Spec.Volumes | ||
patchData, err := GetPatchData(cspDeployList.Items[0], newCSPDeploy) | ||
if err != nil { | ||
return errors.Wrapf(err, "failed to patch data for csp %s", cspName) |
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.
nit:
return errors.Wrapf(err, "failed to patch data for csp %s", cspName) | |
return errors.Wrapf(err, "failed to get patch data for csp deployment %s", cspName) |
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.
The error returned by GetPatchData function is wrapped like "failed to generate patch data"
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
Signed-off-by: shubham shubham.bajpai@mayadata.io
What this PR does:
This PR handles the scenario where the csp deployments are scaled up by mistake. The path to the lock file is different for csp and cspi deployments which leads to multiple simultaneous imports. Patching the
tmp
path while scaling down the csp deployment fixes this problem.csp Volumes
cspi Volumes
Which issue(s) this PR fixes:
Fixes #82
Special notes for your reviewer:
Checklist
documentation
tagrequires-upgrade
tag