RollingUpgradePolicy Class
- java.
lang. Object - com.
azure. compute. batch. models. RollingUpgradePolicy
- com.
Implements
public final class RollingUpgradePolicy
implements JsonSerializable<RollingUpgradePolicy>
The configuration parameters used while performing a rolling upgrade.
Constructor Summary
| Constructor | Description |
|---|---|
| RollingUpgradePolicy() |
Creates an instance of Rolling |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Rolling |
fromJson(JsonReader jsonReader)
Reads an instance of Rolling |
| Integer |
getMaxBatchInstancePercent()
Get the max |
| Integer |
getMaxUnhealthyInstancePercent()
Get the max |
| Integer |
getMaxUnhealthyUpgradedInstancePercent()
Get the max |
| Duration |
getPauseTimeBetweenBatches()
Get the pause |
| Boolean |
isEnableCrossZoneUpgrade()
Get the enable |
| Boolean |
isPrioritizeUnhealthyInstances()
Get the prioritize |
| Boolean |
isRollbackFailedInstancesOnPolicyBreach()
Get the rollback |
|
Rolling |
setEnableCrossZoneUpgrade(Boolean enableCrossZoneUpgrade)
Set the enable |
|
Rolling |
setMaxBatchInstancePercent(Integer maxBatchInstancePercent)
Set the max |
|
Rolling |
setMaxUnhealthyInstancePercent(Integer maxUnhealthyInstancePercent)
Set the max |
|
Rolling |
setMaxUnhealthyUpgradedInstancePercent(Integer maxUnhealthyUpgradedInstancePercent)
Set the max |
|
Rolling |
setPauseTimeBetweenBatches(Duration pauseTimeBetweenBatches)
Set the pause |
|
Rolling |
setPrioritizeUnhealthyInstances(Boolean prioritizeUnhealthyInstances)
Set the prioritize |
|
Rolling |
setRollbackFailedInstancesOnPolicyBreach(Boolean rollbackFailedInstancesOnPolicyBreach)
Set the rollback |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
RollingUpgradePolicy
public RollingUpgradePolicy()
Creates an instance of RollingUpgradePolicy class.
Method Details
fromJson
public static RollingUpgradePolicy fromJson(JsonReader jsonReader)
Reads an instance of RollingUpgradePolicy from the JsonReader.
Parameters:
Returns:
Throws:
getMaxBatchInstancePercent
public Integer getMaxBatchInstancePercent()
Get the maxBatchInstancePercent property: 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:
getMaxUnhealthyInstancePercent
public Integer getMaxUnhealthyInstancePercent()
Get the maxUnhealthyInstancePercent property: 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:
getMaxUnhealthyUpgradedInstancePercent
public Integer getMaxUnhealthyUpgradedInstancePercent()
Get the maxUnhealthyUpgradedInstancePercent property: 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:
getPauseTimeBetweenBatches
public Duration getPauseTimeBetweenBatches()
Get the pauseTimeBetweenBatches property: 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:
isEnableCrossZoneUpgrade
public Boolean isEnableCrossZoneUpgrade()
Get the enableCrossZoneUpgrade property: 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:
isPrioritizeUnhealthyInstances
public Boolean isPrioritizeUnhealthyInstances()
Get the prioritizeUnhealthyInstances property: Upgrade all unhealthy instances in a scale set before any healthy instances.
Returns:
isRollbackFailedInstancesOnPolicyBreach
public Boolean isRollbackFailedInstancesOnPolicyBreach()
Get the rollbackFailedInstancesOnPolicyBreach property: Rollback failed instances to previous model if the Rolling Upgrade policy is violated.
Returns:
setEnableCrossZoneUpgrade
public RollingUpgradePolicy setEnableCrossZoneUpgrade(Boolean enableCrossZoneUpgrade)
Set the enableCrossZoneUpgrade property: 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:
Returns:
setMaxBatchInstancePercent
public RollingUpgradePolicy setMaxBatchInstancePercent(Integer maxBatchInstancePercent)
Set the maxBatchInstancePercent property: 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:
Returns:
setMaxUnhealthyInstancePercent
public RollingUpgradePolicy setMaxUnhealthyInstancePercent(Integer maxUnhealthyInstancePercent)
Set the maxUnhealthyInstancePercent property: 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:
Returns:
setMaxUnhealthyUpgradedInstancePercent
public RollingUpgradePolicy setMaxUnhealthyUpgradedInstancePercent(Integer maxUnhealthyUpgradedInstancePercent)
Set the maxUnhealthyUpgradedInstancePercent property: 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:
Returns:
setPauseTimeBetweenBatches
public RollingUpgradePolicy setPauseTimeBetweenBatches(Duration pauseTimeBetweenBatches)
Set the pauseTimeBetweenBatches property: 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:
Returns:
setPrioritizeUnhealthyInstances
public RollingUpgradePolicy setPrioritizeUnhealthyInstances(Boolean prioritizeUnhealthyInstances)
Set the prioritizeUnhealthyInstances property: Upgrade all unhealthy instances in a scale set before any healthy instances.
Parameters:
Returns:
setRollbackFailedInstancesOnPolicyBreach
public RollingUpgradePolicy setRollbackFailedInstancesOnPolicyBreach(Boolean rollbackFailedInstancesOnPolicyBreach)
Set the rollbackFailedInstancesOnPolicyBreach property: Rollback failed instances to previous model if the Rolling Upgrade policy is violated.
Parameters:
Returns: