Get-ServiceFabricTestCommandStatusList

Gets the list of all the fault operations triggered in the cluster and their status

Syntax

Get-ServiceFabricTestCommandStatusList
   [-StateFilter <TestCommandStateFilter>]
   [-TypeFilter <TestCommandTypeFilter>]
   [-TimeoutSec <Int32>]
   [<CommonParameters>]

Description

The Get-ServiceFabricTestCommandStatusList gets the list of the fault operations triggered in the cluster and their status. The list of faults tracked by this operation include Partition Data Loss (Start-ServiceFabricPartitionDataLoss), Partition Quorum Loss (Start-ServiceFabricPartitionQuorumLoss), Partition Restart (Start-ServiceFabricPartitionRestart) and Node State Transition (Start-ServiceFabricNodeTransition).

The Operation ID returned can be used to get additional details about the fault operation using the get progress APIs for the respective fault and/or to cancel the fault using the Stop-ServiceFabricTestCommand command. The mapping from TestCommandType to the progress API can be found below

TestCommandType Get Progress Command
PartitionDataLoss Get-ServiceFabricPartitionDataLossProgress
PartitionQuorumLoss Get-ServiceFabricPartitionQuorumLossProgress
PartitionRestart Get-ServiceFabricPartitionRestartProgress
NodeTransition Get-ServiceFabricNodeTransitionProgress

Examples

Example 1: Get status of cancelled test commands

PS C:\> Get-ServiceFabricTestCommandStatusList -StateFilter Cancelled
OperationId                              State     TestCommandType
-----------                              -----     ---------------
a268cc73-2e30-462b-b3df-3a0d30e5b330 Cancelled     PartitionQuorumLoss

This command gets the status of fault operations that have been cancelled. In this example, the result has one fault operation.

Example 2: Get status of all test commands

PS C:\> Get-ServiceFabricTestCommandStatusList
OperationId                              State     TestCommandType
-----------                              -----     ---------------
aeaceca9-320d-4f7b-84e8-3cc13c29a974 Completed     PartitionQuorumLoss
0e3fa169-dec0-46d1-8eff-2f1a4a3f5fde Completed     PartitionRestart
a268cc73-2e30-462b-b3df-3a0d30e5b330 Cancelled     PartitionQuorumLoss
51ed168c-bb22-47d5-97f9-6b74b353bb33 Completed     PartitionQuorumLoss
ebd322c2-b1d3-46a7-b254-3cc42e6ca2d1 Completed     PartitionRestart
d3f12b09-6a90-4745-a4fc-3f92149a7419 Completed     PartitionDataLoss

This command gets the status of all fault operations. The returned list contains five completed operations, and one cancelled operation.

Parameters

-StateFilter

This parameter can be used to filter the list of operations returned based on the current Status of the fault operation. You can use this to limit the results returned to the ones that interest you.

Type:TestCommandStateFilter
Accepted values:Default, Running, RollingBack, CompletedSuccessfully, Failed, Cancelled, ForceCancelled, All
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

-TypeFilter

This parameter can be used to filter the list of operations returned based on the type of the fault operation. You can use this to limit the results returned to the fault types that interest you.

Type:TestCommandTypeFilter
Accepted values:Default, PartitionDataLoss, PartitionQuorumLoss, PartitionRestart, NodeTransition, All
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

System.Object