RollingUpgradePolicy Class

  • java.lang.Object
    • com.microsoft.azure.batch.protocol.models.RollingUpgradePolicy

public class RollingUpgradePolicy

The configuration parameters used while performing a rolling upgrade.

Constructor Summary

Constructor Description
RollingUpgradePolicy()

Method Summary

Modifier and Type Method and Description
Boolean enableCrossZoneUpgrade()

Get allow VMSS to ignore AZ boundaries when constructing upgrade batches.

Integer maxBatchInstancePercent()

Get the maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch.

Integer maxUnhealthyInstancePercent()

Get the maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts.

Integer maxUnhealthyUpgradedInstancePercent()

Get the maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state.

org.joda.time.Period pauseTimeBetweenBatches()

Get the wait time between completing the update for all virtual machines in one batch and starting the next batch.

Boolean prioritizeUnhealthyInstances()

Get upgrade all unhealthy instances in a scale set before any healthy instances.

Boolean rollbackFailedInstancesOnPolicyBreach()

Get rollback failed instances to previous model if the Rolling Upgrade policy is violated.

RollingUpgradePolicy withEnableCrossZoneUpgrade(Boolean enableCrossZoneUpgrade)

Set allow VMSS to ignore AZ boundaries when constructing upgrade batches.

RollingUpgradePolicy withMaxBatchInstancePercent(Integer maxBatchInstancePercent)

Set the maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch.

RollingUpgradePolicy withMaxUnhealthyInstancePercent(Integer maxUnhealthyInstancePercent)

Set the maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts.

RollingUpgradePolicy withMaxUnhealthyUpgradedInstancePercent(Integer maxUnhealthyUpgradedInstancePercent)

Set the maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state.

RollingUpgradePolicy withPauseTimeBetweenBatches(Period pauseTimeBetweenBatches)

Set the wait time between completing the update for all virtual machines in one batch and starting the next batch.

RollingUpgradePolicy withPrioritizeUnhealthyInstances(Boolean prioritizeUnhealthyInstances)

Set upgrade all unhealthy instances in a scale set before any healthy instances.

RollingUpgradePolicy withRollbackFailedInstancesOnPolicyBreach(Boolean rollbackFailedInstancesOnPolicyBreach)

Set rollback failed instances to previous model if the Rolling Upgrade policy is violated.

Methods inherited from java.lang.Object

Constructor Details

RollingUpgradePolicy

public RollingUpgradePolicy()

Method Details

enableCrossZoneUpgrade

public Boolean enableCrossZoneUpgrade()

Get allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size. This field is able to be set to true or false only when using NodePlacementConfiguration as Zonal.

Returns:

the enableCrossZoneUpgrade value

maxBatchInstancePercent

public Integer maxBatchInstancePercent()

Get the maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The value of this field should be between 5 and 100, inclusive. If both maxBatchInstancePercent and maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent should not be more than maxUnhealthyInstancePercent.

Returns:

the maxBatchInstancePercent value

maxUnhealthyInstancePercent

public Integer maxUnhealthyInstancePercent()

Get the maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The value of this field should be between 5 and 100, inclusive. If both maxBatchInstancePercent and maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent should not be more than maxUnhealthyInstancePercent.

Returns:

the maxUnhealthyInstancePercent value

maxUnhealthyUpgradedInstancePercent

public Integer maxUnhealthyUpgradedInstancePercent()

Get the maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The value of this field should be between 0 and 100, inclusive.

Returns:

the maxUnhealthyUpgradedInstancePercent value

pauseTimeBetweenBatches

public Period pauseTimeBetweenBatches()

Get the wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format.

Returns:

the pauseTimeBetweenBatches value

prioritizeUnhealthyInstances

public Boolean prioritizeUnhealthyInstances()

Get upgrade all unhealthy instances in a scale set before any healthy instances.

Returns:

the prioritizeUnhealthyInstances value

rollbackFailedInstancesOnPolicyBreach

public Boolean rollbackFailedInstancesOnPolicyBreach()

Get rollback failed instances to previous model if the Rolling Upgrade policy is violated.

Returns:

the rollbackFailedInstancesOnPolicyBreach value

withEnableCrossZoneUpgrade

public RollingUpgradePolicy withEnableCrossZoneUpgrade(Boolean enableCrossZoneUpgrade)

Set allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size. This field is able to be set to true or false only when using NodePlacementConfiguration as Zonal.

Parameters:

enableCrossZoneUpgrade - the enableCrossZoneUpgrade value to set

Returns:

the RollingUpgradePolicy object itself.

withMaxBatchInstancePercent

public RollingUpgradePolicy withMaxBatchInstancePercent(Integer maxBatchInstancePercent)

Set the maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The value of this field should be between 5 and 100, inclusive. If both maxBatchInstancePercent and maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent should not be more than maxUnhealthyInstancePercent.

Parameters:

maxBatchInstancePercent - the maxBatchInstancePercent value to set

Returns:

the RollingUpgradePolicy object itself.

withMaxUnhealthyInstancePercent

public RollingUpgradePolicy withMaxUnhealthyInstancePercent(Integer maxUnhealthyInstancePercent)

Set the maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The value of this field should be between 5 and 100, inclusive. If both maxBatchInstancePercent and maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent should not be more than maxUnhealthyInstancePercent.

Parameters:

maxUnhealthyInstancePercent - the maxUnhealthyInstancePercent value to set

Returns:

the RollingUpgradePolicy object itself.

withMaxUnhealthyUpgradedInstancePercent

public RollingUpgradePolicy withMaxUnhealthyUpgradedInstancePercent(Integer maxUnhealthyUpgradedInstancePercent)

Set the maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The value of this field should be between 0 and 100, inclusive.

Parameters:

maxUnhealthyUpgradedInstancePercent - the maxUnhealthyUpgradedInstancePercent value to set

Returns:

the RollingUpgradePolicy object itself.

withPauseTimeBetweenBatches

public RollingUpgradePolicy withPauseTimeBetweenBatches(Period pauseTimeBetweenBatches)

Set the wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format.

Parameters:

pauseTimeBetweenBatches - the pauseTimeBetweenBatches value to set

Returns:

the RollingUpgradePolicy object itself.

withPrioritizeUnhealthyInstances

public RollingUpgradePolicy withPrioritizeUnhealthyInstances(Boolean prioritizeUnhealthyInstances)

Set upgrade all unhealthy instances in a scale set before any healthy instances.

Parameters:

prioritizeUnhealthyInstances - the prioritizeUnhealthyInstances value to set

Returns:

the RollingUpgradePolicy object itself.

withRollbackFailedInstancesOnPolicyBreach

public RollingUpgradePolicy withRollbackFailedInstancesOnPolicyBreach(Boolean rollbackFailedInstancesOnPolicyBreach)

Set rollback failed instances to previous model if the Rolling Upgrade policy is violated.

Parameters:

rollbackFailedInstancesOnPolicyBreach - the rollbackFailedInstancesOnPolicyBreach value to set

Returns:

the RollingUpgradePolicy object itself.

Applies to