-
Notifications
You must be signed in to change notification settings - Fork 200
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
refact(upgrade): scale down jiva target deploy before replica patch #1626
Conversation
Signed-off-by: shubham <shubham.bajpai@mayadata.io>
Signed-off-by: shubham <shubham.bajpai@mayadata.io>
} | ||
}, | ||
"spec": { | ||
"replicas": 1, |
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.
[doubt] replicas: 1
Is this where we scale down the target?, setting replica to 1.
It would be better if the indentation changes were excluded, since it is generating a huge diff.
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.
Scale down is performed via update before patching. the replica deployment
This is where scale up the target back again while patching the new image and labels.
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.
gave some comments.
Signed-off-by: shubham <shubham.bajpai@mayadata.io>
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.
/lgtm
…penebs-archive#1626) Avoid the replica's from getting connected to the older version of the controller and triggering a snapshot delete and so forth code. Signed-off-by: shubham <shubham.bajpai@mayadata.io>
…1626) Avoid the replica's from getting connected to the older version of the controller and triggering a snapshot delete and so forth code. Signed-off-by: shubham <shubham.bajpai@mayadata.io>
@@ -429,6 +469,18 @@ func (j *jivaVolumeOptions) replicaUpgrade(openebsNamespace string) error { | |||
} | |||
|
|||
statusObj.Phase = utask.StepErrored | |||
|
|||
err = scaleDownTargetDeploy(j.controllerObj.name, j.ns) |
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.
is j.controllerObj
be NULL here? it seems to be populated in next step
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.
It is populated before the patching is done in the preuprade step. https://github.com/openebs/maya/blob/4104241e9966c87bc3153d7dab9aedaba9f503ac/pkg/upgrade/upgrader/jiva_upgrade.go#L599
if err != nil { | ||
return err | ||
} | ||
pvLabelKey := "openebs.io/persistent-volume" |
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.
can we use existing variables here instead of new ones?
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.
Sure. Will fix this in upcoming PRs.
Signed-off-by: shubham shubham.bajpai@mayadata.io
What this PR does / why we need it:
This PR adds a step to scale down jiva target deploy before upgrading replica deploy.
Sample logs:
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Special notes for your reviewer:
Checklist:
documentation
tagbreaking-changes
tagrequires-upgrade
tag