Update-ServiceFabricApplicationUpgrade

Modifies the upgrade description of an active Application upgrade.

Syntax

Update-ServiceFabricApplicationUpgrade
      [-ApplicationName] <Uri>
      [-ForceRestart <Boolean>]
      [-UpgradeReplicaSetCheckTimeoutSec <UInt32>]
      [-UpgradeMode <RollingUpgradeMode>]
      [-FailureAction <UpgradeFailureAction>]
      [-HealthCheckRetryTimeoutSec <UInt32>]
      [-HealthCheckWaitDurationSec <UInt32>]
      [-HealthCheckStableDurationSec <UInt32>]
      [-UpgradeDomainTimeoutSec <UInt32>]
      [-UpgradeTimeoutSec <UInt32>]
      [-ConsiderWarningAsError <Boolean>]
      [-DefaultServiceTypeHealthPolicy <String>]
      [-MaxPercentUnhealthyDeployedApplications <Byte>]
      [-ServiceTypeHealthPolicyMap <Hashtable>]
      [-Force]
      [-InstanceCloseDelayDurationSec <UInt32>]
      [-TimeoutSec <Int32>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

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

PS C:\> Update-ServiceFabricApplicationUpgrade -ApplicationName fabric:/MyApplication -UpgradeReplicaSetCheckTimeoutSec 0

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.

Type:Uri
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ConsiderWarningAsError

Indicates whether to treat a warning health report as error during health evaluation.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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
Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-FailureAction

Specifies the action to take if the monitored upgrade fails. The acceptable values for this parameter are:

  • Rollback
  • Manual
Type:UpgradeFailureAction
Accepted values:Invalid, Rollback, Manual
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Indicates that this cmdlet skips the warning message and forces the update.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ForceRestart

Indicates whether the service host restarts even if the upgrade is a configuration-only change.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HealthCheckRetryTimeoutSec

Specifies the duration, in seconds, after which Service Fabric retries the health check if the previous health check fails.

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

Type:Byte
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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:

@{ "ServiceTypeName01" = "5,10,5"; "ServiceTypeName02" = "5,5,5" }

Type:Hashtable
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TimeoutSec

Specifies the time-out period, in seconds, for the operation.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-UpgradeDomainTimeoutSec

Specifies the maximum time, in seconds, that Service Fabric takes to upgrade a single upgrade domain. After this period, the upgrade fails.

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-UpgradeMode

Specifies the new UpgradeMode for the upgrade.

Type:RollingUpgradeMode
Accepted values:Invalid, UnmonitoredAuto, UnmonitoredManual, Monitored
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-UpgradeReplicaSetCheckTimeoutSec

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.

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-UpgradeTimeoutSec

Specifies the maximum time, in seconds, that Service Fabric takes for the entire upgrade. After this period, the upgrade fails.

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

System.Object