Skip to content

Commit

Permalink
[PLAT-13089] SystemdUpgrade is now retriable
Browse files Browse the repository at this point in the history
Summary:
[PLAT-13089] SystemdUpgrade is now retriable
Adjusted the state check in verify params to allow SystemdUpgrade.
to go through on a retry.

Test Plan:
{F175509}

{F175508}phabricator
localtest

Reviewers: #yba-api-review!, nsingh

Reviewed By: nsingh

Subscribers: nsingh, yugaware

Differential Revision: https://phorge.dev.yugabyte.com/D34710
  • Loading branch information
amannijhawan committed May 3, 2024
1 parent f0b74be commit 0a86d62
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public NodeState getNodeState() {
@Override
public void validateParams(boolean isFirstTry) {
super.validateParams(isFirstTry);
taskParams().verifyParams(getUniverse(), isFirstTry);
taskParams().verifyParams(getUniverse(), getNodeState(), isFirstTry);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.yugabyte.yw.common.PlatformServiceException;
import com.yugabyte.yw.common.Util;
import com.yugabyte.yw.models.Universe;
import com.yugabyte.yw.models.helpers.NodeDetails.NodeState;
import play.mvc.Http.Status;

@JsonIgnoreProperties(ignoreUnknown = true)
Expand All @@ -15,7 +16,12 @@ public class SystemdUpgradeParams extends UpgradeTaskParams {

@Override
public void verifyParams(Universe universe, boolean isFirstTry) {
super.verifyParams(universe, isFirstTry);
verifyParams(universe, null, isFirstTry);
}

@Override
public void verifyParams(Universe universe, NodeState nodeState, boolean isFirstTry) {
super.verifyParams(universe, nodeState, isFirstTry);

if (upgradeOption != UpgradeOption.ROLLING_UPGRADE) {
throw new PlatformServiceException(
Expand Down

0 comments on commit 0a86d62

Please sign in to comment.