Invoke-ServiceFabricPartitionQuorumLoss

Invoke-ServiceFabricPartitionQuorumLoss

Invokes an action to induce quorum loss in a Service Fabric partition.

Syntax

Parameter Set: PartitionId
Invoke-ServiceFabricPartitionQuorumLoss -PartitionId <Guid> -QuorumLossDurationInSeconds <Int32> -QuorumLossMode <QuorumLossMode> {PartialQuorumLoss | FullQuorumLoss} -ServiceName <Uri> [-TimeoutSec <Int32]> ] [ <CommonParameters>]

Parameter Set: ServiceNamePartitionNamed
Invoke-ServiceFabricPartitionQuorumLoss -PartitionKey <String> -PartitionKindNamed -QuorumLossDurationInSeconds <Int32> -QuorumLossMode <QuorumLossMode> {PartialQuorumLoss | FullQuorumLoss} -ServiceName <Uri> [-TimeoutSec <Int32]> ] [ <CommonParameters>]

Parameter Set: ServiceNamePartitionSingleton
Invoke-ServiceFabricPartitionQuorumLoss -PartitionKindSingleton -QuorumLossDurationInSeconds <Int32> -QuorumLossMode <QuorumLossMode> {PartialQuorumLoss | FullQuorumLoss} -ServiceName <Uri> [-TimeoutSec <Int32]> ] [ <CommonParameters>]

Parameter Set: ServiceNamePartitionUniformedInt
Invoke-ServiceFabricPartitionQuorumLoss -PartitionKey <String> -PartitionKindUniformInt64 -QuorumLossDurationInSeconds <Int32> -QuorumLossMode <QuorumLossMode> {PartialQuorumLoss | FullQuorumLoss} -ServiceName <Uri> [-TimeoutSec <Int32]> ] [ <CommonParameters>]

Parameter Set: ServiceNameRandomPartition
Invoke-ServiceFabricPartitionQuorumLoss -QuorumLossDurationInSeconds <Int32> -QuorumLossMode <QuorumLossMode> {PartialQuorumLoss | FullQuorumLoss} -ServiceName <Uri> [-TimeoutSec <Int32]> ] [ <CommonParameters>]




Detailed Description

The Invoke-ServiceFabricPartitionQuoromLoss cmdlet induces quorum loss in a Service Fabric partition for a specified amount of time. If the test stops before the quorum loss operation completes, run the Remove-ServiceFabricTestState cmdlet to clear the test state.

You can run this cmdlet only with stateful services.

Before using this cmdlet, connect to the Service Fabric cluster.

Parameters

-PartitionId<Guid>

Specifies the ID of the partition on which to invoke the quorum loss.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-PartitionKey<String>

Specifies the key of the partition on which to invoke the test.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-PartitionKindNamed

Indicates that this cmdlet invokes a quorum loss on a named partition.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PartitionKindSingleton

Indicates that this cmdlet invokes a quorum loss on a singleton partition.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PartitionKindUniformInt64

Indicates that this cmdlet invokes a quorum loss for a UniformInt64 partitioned service.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-QuorumLossDurationInSeconds<Int32>

Specifies the duration period, in seconds, for the quorum loss.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-QuorumLossMode<QuorumLossMode>

Specifies the quorum loss mode.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ServiceName<Uri>

Specifies the name of the service to test.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-TimeoutSec<Int32]>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • System.Guid

    Represents the ID of a Service Fabric partition.


  • System.Uri

    Represents the name of a Service Fabric service.


Outputs

The output type is the type of the objects that the cmdlet emits.

  • System.Object

    This cmdlet returns a System.Fabric.Testability.InvokeQuorumLossResult object that represents the operation result.


Examples

Example 1: Invoke full quorum loss on a named partition

This command invokes full quorum loss for the specified service.


PS C:\> Invoke-ServiceFabricPartitionQuorumLoss -ServiceName fabric:/TestSvc –PartitionKindNamed -QuorumLossDurationInSeconds 10 -PartitionKey "Partition3" -QuorumLossMode FullQuorumLoss

Example 2: Invoke partial quorum loss on a UniformInt64 partition

This command invokes partial quorum loss on a UniformInt64 partition.


PS C:\> Invoke-ServiceFabricPartitionQuorumLoss -ServiceName fabric:/TestSvc -PartitionKindUniformInt64 -QuorumLossDurationInSeconds 10 -PartitionKey "23" -QuorumLossMode PartialQuorumLoss

Related topics

Show: