Share via


Start-ServiceFabricRepairTask

Starts a repair task.

Syntax

NodeBuiltInAuto (Default)

Start-ServiceFabricRepairTask
    [-NodeName] <String>
    [-NodeAction] <SystemNodeRepairAction>
    [-TaskId <String>]
    [-Description <String>]
    [-TimeoutSec <Int32>]
    [<CommonParameters>]

NodeCustomAuto

Start-ServiceFabricRepairTask
    [-NodeNames] <String[]>
    [-CustomAction] <String>
    [-TaskId <String>]
    [-Description <String>]
    [-TimeoutSec <Int32>]
    [<CommonParameters>]

NodeManual

Start-ServiceFabricRepairTask
    [-NodeNames] <String[]>
    [-NodeImpact] <NodeImpactLevel>
    [-TaskId <String>]
    [-Description <String>]
    [-TimeoutSec <Int32>]
    [<CommonParameters>]

Description

The Start-ServiceFabricRepairTask cmdlet starts a repair task. You can create Service Fabric repair tasks that run automatically or manually. To create repair tasks, first enable the Repair Manager system service in the cluster configuration. For repair tasks that run automatically, an appropriate repair executor must be running for each repair action to run automatically. These are currently only available in specially-configured Azure Cloud Services.

This cmdlet supports the Service Fabric platform. Do not run this cmdlet directly.

To create a manual repair task, provide the set of impacted node names and the expected impact. When the state of the created repair task changes to approved, you can safely perform repair actions on those nodes. After you finish repairing the nodes, use the Complete-ServiceFabricRepairTask cmdlet to complete the task and bring the nodes back online.

To create an automatic repair task, provide the target node name and desired repair action. You can provide one of the built-in node repair actions, or you can specify a string that contains the full name of the custom repair action. If the custom repair executor for the action supports it, you can also specify more than one target node.

This cmdlet requires that you connect to the cluster with credentials that are granted administrator access to the cluster. 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: Create a manual repair task

PS C:\> Start-ServiceFabricRepairTask -NodeNames "MyNode.0","MyNode.4" -NodeImpact RemoveData

This command creates a manual repair task for two nodes whose data is removed.

Parameters

-CustomAction

Specifies the repair action to perform. You can specify any action that one of the repair executors supports.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NodeCustomAuto
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Description

Specifies a description of the purpose of the repair task, or other information.

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

-NodeAction

Specifies the repair action to perform. Valid values are:

  • Reboot. Requests a reboot of the computer on which the node runs.
  • ReimageOS. Requests that the operating system volume be reimaged on the computer on which the given node is running.
  • FullReimage. Requests that all disk volumes be reimaged on the computer on which the given node runs.

Parameter properties

Type:SystemNodeRepairAction
Default value:None
Accepted values:Reboot, ReimageOS, FullReimage
Supports wildcards:False
DontShow:False

Parameter sets

NodeBuiltInAuto
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-NodeImpact

Specifies the expected level of impact of a manual repair of a set of nodes. Valid values are:

  • Invalid. Do not specify this value.
  • None. No expected impact.
  • Restart. The node is expected to stop and restart.
  • RemoveData. The node is expected to stop. It may lose all of its persisted state prior to restarting.
  • Pause. No expected impact, but safety checks will be performed.

Parameter properties

Type:NodeImpactLevel
Default value:None
Accepted values:Invalid, None, Restart, RemoveData, RemoveNode, Pause
Supports wildcards:False
DontShow:False

Parameter sets

NodeManual
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-NodeName

Specifies the name of a Service Fabric node. This cmdlet repairs the node that this parameter specifies.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NodeBuiltInAuto
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-NodeNames

Specifies an array of names of Service Fabric nodes. This cmdlet repairs the nodes that this parameter specifies.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NodeCustomAuto
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
NodeManual
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TaskId

Specifies the ID of the repair task to create. If you do not specify an ID, this cmdlet generates a unique ID.

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

-TimeoutSec

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

Parameter properties

Type:Int32
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

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.

Inputs

System.String

Outputs

System.Object