The Update-ServiceFabricApplicationUpgrade cmdlet modifies the parameters of an Application upgrade description while the upgrade is still active.
Service Fabric detects and applies changes according to the UpgradeStatusPollInterval value, as specified in the cluster manifest.
Except for health-evaluation policies, this cmdlet updates only the parameters that you specify.
Unspecified parameters remain unaffected.
You must update the following health-evaluation policies together, not individually:
ConsiderWarningAsError
DefaultServiceTypeHealthPolicy
MaxPercentUnhealthyDeployedApplications
ServiceTypeHealthPolicyMap
Before you perform any operation on a Service Fabric cluster, establish a connection to the cluster by using the Connect-ServiceFabricCluster cmdlet.
Examples
Example 1: Update a value for an application upgrade
This command sets the replica set check time-out value to 0 for a pending upgrade on fabric:/MyApplication.
The update leaves all other upgrade values alone.
Parameters
-ApplicationName
Specifies the Uniform Resource Identifier (URI) of a Service Fabric application.
The cmdlet updates the settings for the upgrade for the application that has the URI that this parameter specifies.
Parameter properties
Type:
Uri
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
0
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type:
SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Aliases:
cf
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ConsiderWarningAsError
Indicates whether to treat a warning health report as error during health evaluation.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-DefaultServiceTypeHealthPolicy
Specifies the default health policy for service types.
Health policy is used for the monitored upgrade.
The policy follows the format MaxPercentUnhealthyPartitionsPerService,MaxPercentUnhealthyReplicasPerPartition,MaxPercentUnhealthyServices.
For example, 5,10,15 indicates the following values:
MaxPercentUnhealthyPartitionsPerService = 5
MaxPercentUnhealthyReplicasPerPartition = 10
MaxPercentUnhealthyServices = 15
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-FailureAction
Specifies the action to take if the monitored upgrade fails.
The acceptable values for this parameter are:
Rollback
Manual
Parameter properties
Type:
UpgradeFailureAction
Default value:
None
Accepted values:
Invalid, Rollback, Manual
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Force
Indicates that this cmdlet skips the warning message and forces the update.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ForceRestart
Indicates whether the service host restarts even if the upgrade is a configuration-only change.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-HealthCheckRetryTimeoutSec
Specifies the duration, in seconds, after which Service Fabric retries the health check if the previous health check fails.
Parameter properties
Type:
UInt32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-HealthCheckStableDurationSec
Specifies the duration, in seconds, that Service Fabric waits in order to verify that the application is stable before it continues to the next upgrade domain or completes the upgrade.
This wait duration prevents undetected changes of health right after the health check is performed.
Parameter properties
Type:
UInt32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-HealthCheckWaitDurationSec
Specifies the duration, in seconds, that Service Fabric waits before it performs the initial health check after it finishes the upgrade on the upgrade domain.
Parameter properties
Type:
UInt32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-InstanceCloseDelayDurationSec
Specifies the duration in seconds, to wait before a stateless instance which is impacted by application upgrade is closed, to allow the active requests to drain gracefully. This wait duration is effective only for the instances of those stateless services which have a non-zero value configured for the InstanceCloseDelayDuration, and will override the pre-configured value. See InstanceCloseDelayDuration for details.
Parameter properties
Type:
UInt32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MaxPercentUnhealthyDeployedApplications
Specifies the maximum percentage of tolerated deployed applications that can have a health state of error.
If the percentage of unhealthy application instances deployed on the nodes in the cluster exceeds the value that this parameter specifies, the health state of the application is error.
Parameter properties
Type:
Byte
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ServiceTypeHealthPolicyMap
Specifies the map of the health policy to use for different service types.
Specify the map as a hash table in the following format: @ {"ServiceTypeName" : "MaxPercentUnhealthyPartitionsPerService,MaxPercentUnhealthyReplicasPerPartition,MaxPercentUnhealthyServices"}.
For instance:
Specifies the maximum time, in seconds, that Service Fabric waits for a service to reconfigure into a safe state, if not already in a safe state, before Service Fabric proceeds with the upgrade.
Parameter properties
Type:
UInt32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-UpgradeTimeoutSec
Specifies the maximum time, in seconds, that Service Fabric takes for the entire upgrade.
After this period, the upgrade fails.
Parameter properties
Type:
UInt32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type:
SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Aliases:
wi
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.