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

cherry-pick(upgarde): scale down jiva contoller deployment only if not upgraded (#1663) #1665

Merged
merged 1 commit into from
Apr 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions pkg/upgrade/upgrader/jiva_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,21 @@ func (j *jivaVolumeOptions) replicaUpgrade(pvName, openebsNamespace string) erro
}
statusObj.Phase = utask.StepErrored

// Continue with replica upgrade only if the controller is not upgraded
// otherwise return from here itself,
// as controller is always upgarded after replicas are successfully upgraded.
if j.controllerObj.version == upgradeVersion {
klog.Infof("replicas already in %s version", upgradeVersion)
statusObj.Phase = utask.StepCompleted
statusObj.Message = "Replica upgrade was successful"
statusObj.Reason = ""
j.utaskObj, uerr = updateUpgradeDetailedStatus(j.utaskObj, statusObj, openebsNamespace)
if uerr != nil && isENVPresent {
return uerr
}
return nil
}

// Scaling down controller ensures no I/O occurs
// which make volume to come in RW mode early
err = scaleDeploy(j.controllerObj.name, j.ns, ctrlDeployLabel, 0)
Expand Down