Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

Commit

Permalink
Svc upgrade: wait for last batch to become healthy
Browse files Browse the repository at this point in the history
Before marking service as successfully upgraded
  • Loading branch information
Alena Prokharchyk authored and Denise committed Mar 13, 2018
1 parent 9be7a52 commit 370f21f
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,11 @@ protected void upgradeDeploymentUnits(final Service service,
lockManager.lock(new ServiceLock(service), new LockCallbackNoReturn() {
@Override
public void doWithLockNoResult() {
// wait for healthy only for upgrade
// should be skipped for rollback
// wait for healthy only for upgrade; should be skipped for rollback
// wait for healthy happens 3 times in this block:
// 1. Before performing an upgrade on the batch
// 2. If startFirst=true, after the upgrade is done, but before stop
// 3. After the batch upgrade is completed
if (isUpgrade) {
deploymentMgr.activate(service);
waitForHealthyState(service, currentProcess, strategy);
Expand All @@ -167,6 +170,9 @@ public void doWithLockNoResult() {
// 2. wait for reconcile (new instances will be started along)
activate(service);
}
if (isUpgrade) {
waitForHealthyState(service, currentProcess, strategy);
}
}

protected void markForUpgrade(final long batchSize) {
Expand Down

0 comments on commit 370f21f

Please sign in to comment.