Dela via


FabricClient.FaultManagementClient.RestartNodeAsync Method

Definition

Overloads

RestartNodeAsync(ReplicaSelector, CompletionMode)

Restarts a cluster node by restarting the Fabric.exe process that hosts the node.

RestartNodeAsync(ReplicaSelector, CompletionMode, CancellationToken)

Restarts a cluster node by restarting the Fabric.exe process that hosts the node.

RestartNodeAsync(String, BigInteger, CompletionMode)

Restarts a cluster node by restarting the Fabric.exe process that hosts the node.

RestartNodeAsync(ReplicaSelector, CompletionMode, TimeSpan, CancellationToken)

Restarts a cluster node by restarting the Fabric.exe process that hosts the node.

RestartNodeAsync(String, BigInteger, CompletionMode, CancellationToken)

Restarts a cluster node by restarting the Fabric.exe process that hosts the node.

RestartNodeAsync(String, BigInteger, TimeSpan, CancellationToken)

Restarts a cluster node by restarting the Fabric.exe process that hosts the node.

RestartNodeAsync(ReplicaSelector, Boolean, CompletionMode, TimeSpan, CancellationToken)

Restarts a cluster node by restarting the Fabric.exe process that hosts the node.

RestartNodeAsync(String, BigInteger, Boolean, CompletionMode, TimeSpan, CancellationToken)

Restarts a cluster node by restarting the Fabric.exe process that hosts the node.

RestartNodeAsync(ReplicaSelector, CompletionMode)

Restarts a cluster node by restarting the Fabric.exe process that hosts the node.

public System.Threading.Tasks.Task<System.Fabric.Result.RestartNodeResult> RestartNodeAsync (System.Fabric.ReplicaSelector replicaSelector, System.Fabric.CompletionMode completionMode);
member this.RestartNodeAsync : System.Fabric.ReplicaSelector * System.Fabric.CompletionMode -> System.Threading.Tasks.Task<System.Fabric.Result.RestartNodeResult>
Public Function RestartNodeAsync (replicaSelector As ReplicaSelector, completionMode As CompletionMode) As Task(Of RestartNodeResult)

Parameters

replicaSelector
ReplicaSelector

This parameter is used to choose a specific replica. This replica's corresponding node will be restarted.

completionMode
CompletionMode

If set to Verify, the system will check that the node restarted, and the API will not return until it has and NodeStatus is Up. If set to DoNotVerify, the API returns once the node restart has been initiated.

Returns

A task with information representing the target node, and the replica selected.

Exceptions

The ErrorCode property will indicate the reason. If the ErrorCode is InvalidArgument, nodeName is invalid. If the ErrorCode is ReplicaDoesNotExist, the selected replica was not found. If the ErrorCode is PartitionNotFound, the specified partition does not exist.

The operation timed out.

An argument with a value of null was passed in.

Remarks

This API simulates Service Fabric node failures in the cluster, which tests the fail-over recovery paths of your service.

Applies to

RestartNodeAsync(ReplicaSelector, CompletionMode, CancellationToken)

Restarts a cluster node by restarting the Fabric.exe process that hosts the node.

public System.Threading.Tasks.Task<System.Fabric.Result.RestartNodeResult> RestartNodeAsync (System.Fabric.ReplicaSelector replicaSelector, System.Fabric.CompletionMode completionMode, System.Threading.CancellationToken token);
member this.RestartNodeAsync : System.Fabric.ReplicaSelector * System.Fabric.CompletionMode * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Fabric.Result.RestartNodeResult>
Public Function RestartNodeAsync (replicaSelector As ReplicaSelector, completionMode As CompletionMode, token As CancellationToken) As Task(Of RestartNodeResult)

Parameters

replicaSelector
ReplicaSelector

This parameter is used to choose a specific replica. This replica's corresponding node will be restarted.

completionMode
CompletionMode

If set to Verify, the system will check that the node restarted, and the API will not return until it has and NodeStatus is Up. If set to DoNotVerify, the API returns once the node restart has been initiated.

token
CancellationToken

The cancellation token that is monitored for any request to cancel the operation.

Returns

A task with information representing the target node, and the replica selected.

Exceptions

The ErrorCode property will indicate the reason. If the ErrorCode is InvalidArgument, nodeName is invalid. If the ErrorCode is ReplicaDoesNotExist, the selected replica was not found. If the ErrorCode is PartitionNotFound, the specified partition does not exist.

The operation timed out.

An argument with a value of null was passed in.

Remarks

This API simulates Service Fabric node failures in the cluster, which tests the fail-over recovery paths of your service.

Applies to

RestartNodeAsync(String, BigInteger, CompletionMode)

Restarts a cluster node by restarting the Fabric.exe process that hosts the node.

public System.Threading.Tasks.Task<System.Fabric.Result.RestartNodeResult> RestartNodeAsync (string nodeName, System.Numerics.BigInteger nodeInstance, System.Fabric.CompletionMode completionMode);
member this.RestartNodeAsync : string * System.Numerics.BigInteger * System.Fabric.CompletionMode -> System.Threading.Tasks.Task<System.Fabric.Result.RestartNodeResult>
Public Function RestartNodeAsync (nodeName As String, nodeInstance As BigInteger, completionMode As CompletionMode) As Task(Of RestartNodeResult)

Parameters

nodeName
String

The node name of the node to restart.

nodeInstance
BigInteger

The node instance ID of the node to restart. If not specified, or is set to 0, the value is ignored. If the instance is set to -1, the system will internally determine this value. If the instance has a positive value, it is compared with the active node ID. If the IDs do not match, the process is not restarted and an error occurs. A stale message can cause this error.

completionMode
CompletionMode

If set to Verify, the system will check that the node restarted, and the API will not return until it has and NodeStatus is Up. If set to DoNotVerify, the API returns once the node restart has been initiated.

Returns

A task with information representing the target node.

Exceptions

The ErrorCode property will indicate the reason. If the ErrorCode is NodeNotFound, nodeName or nodeInstance is invalid. If the ErrorCode is InstanceIdMismatch, the nodeInstance provided does not match the currently running instance.

The operation timed out.

An argument with a value of null was passed in.

Remarks

This API simulates Service Fabric node failures in the cluster, which tests the fail-over recovery paths of your service.

Applies to

RestartNodeAsync(ReplicaSelector, CompletionMode, TimeSpan, CancellationToken)

Restarts a cluster node by restarting the Fabric.exe process that hosts the node.

public System.Threading.Tasks.Task<System.Fabric.Result.RestartNodeResult> RestartNodeAsync (System.Fabric.ReplicaSelector replicaSelector, System.Fabric.CompletionMode completionMode, TimeSpan operationTimeout, System.Threading.CancellationToken token);
member this.RestartNodeAsync : System.Fabric.ReplicaSelector * System.Fabric.CompletionMode * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Fabric.Result.RestartNodeResult>
Public Function RestartNodeAsync (replicaSelector As ReplicaSelector, completionMode As CompletionMode, operationTimeout As TimeSpan, token As CancellationToken) As Task(Of RestartNodeResult)

Parameters

replicaSelector
ReplicaSelector

This parameter is used to choose a specific replica. The node where the replica is deployed will be restarted.

completionMode
CompletionMode

If set to Verify, the system will check that the node restarted, and the API will not return until it has and NodeStatus is Up. If set to DoNotVerify, the API returns once the node restart has been initiated.

operationTimeout
TimeSpan

The timeout for this API call.

token
CancellationToken

The cancellation token that is monitored for any request to cancel the operation.

Returns

A task with information representing the target node, and the replica selected.

Exceptions

The ErrorCode property will indicate the reason. If the ErrorCode is InvalidArgument, nodeName is invalid. If the ErrorCode is ReplicaDoesNotExist, the selected replica was not found. If the ErrorCode is PartitionNotFound, the specified partition does not exist.

The operation timed out.

An argument with a value of null was passed in.

Remarks

This API simulates Service Fabric node failures in the cluster, which tests the fail-over recovery paths of your service.

Applies to

RestartNodeAsync(String, BigInteger, CompletionMode, CancellationToken)

Restarts a cluster node by restarting the Fabric.exe process that hosts the node.

public System.Threading.Tasks.Task<System.Fabric.Result.RestartNodeResult> RestartNodeAsync (string nodeName, System.Numerics.BigInteger nodeInstance, System.Fabric.CompletionMode completionMode, System.Threading.CancellationToken token);
member this.RestartNodeAsync : string * System.Numerics.BigInteger * System.Fabric.CompletionMode * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Fabric.Result.RestartNodeResult>
Public Function RestartNodeAsync (nodeName As String, nodeInstance As BigInteger, completionMode As CompletionMode, token As CancellationToken) As Task(Of RestartNodeResult)

Parameters

nodeName
String

The node name of the node to restart.

nodeInstance
BigInteger

The node instance ID of the node to restart. If not specified, or is set to 0, the value is ignored. If the instance is set to -1, the system will internally determine this value. If the instance has a positive value, it is compared with the active instance ID. If the instances do not match, the process is not restarted and an error occurs. A stale message can cause this error.

completionMode
CompletionMode

If set to Verify, the system will check that the node restarted, and the API will not return until it has and NodeStatus is Up. If set to DoNotVerify, the API returns once the node restart has been initiated.

token
CancellationToken

The CancellationToken that this operation is observing. It is used to notify the operation that it should be canceled.

Returns

A task with information representing the target node.

Exceptions

The ErrorCode property will indicate the reason. If the ErrorCode is NodeNotFound, nodeName is invalid. If the ErrorCode is InstanceIdMismatch, the nodeInstance provided does not match the currently running instance.

The operation timed out.

An argument with a value of null was passed in.

Remarks

This API simulates Service Fabric node failures in the cluster, which tests the fail-over recovery paths of your service.

Applies to

RestartNodeAsync(String, BigInteger, TimeSpan, CancellationToken)

Restarts a cluster node by restarting the Fabric.exe process that hosts the node.

public System.Threading.Tasks.Task<System.Fabric.Result.RestartNodeResult> RestartNodeAsync (string nodeName, System.Numerics.BigInteger nodeInstance, TimeSpan operationTimeout, System.Threading.CancellationToken token);
member this.RestartNodeAsync : string * System.Numerics.BigInteger * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Fabric.Result.RestartNodeResult>
Public Function RestartNodeAsync (nodeName As String, nodeInstance As BigInteger, operationTimeout As TimeSpan, token As CancellationToken) As Task(Of RestartNodeResult)

Parameters

nodeName
String

The node name of the node to restart.

nodeInstance
BigInteger

The node instance ID of the node to restart. If not specified, or is set to 0, the value is ignored. If the instance is set to -1, the system will internally determine this value. If the instance has a positive value, it is compared with the active node ID. If the IDs do not match, the process is not restarted and an error occurs. A stale message can cause this error.

operationTimeout
TimeSpan

The timeout for this API call.

token
CancellationToken

The cancellation token that is monitored for any request to cancel the operation.

Returns

A task with information representing the target node.

Exceptions

The ErrorCode property will indicate the reason. If the ErrorCode is NodeNotFound, nodeName is invalid. If the ErrorCode is InstanceIdMismatch, the nodeInstance provided does not match the currently running instance.

The operation timed out.

An argument with a value of null was passed in.

Remarks

This API simulates Service Fabric node failures in the cluster, which tests the fail-over recovery paths of your service.

Applies to

RestartNodeAsync(ReplicaSelector, Boolean, CompletionMode, TimeSpan, CancellationToken)

Restarts a cluster node by restarting the Fabric.exe process that hosts the node.

public System.Threading.Tasks.Task<System.Fabric.Result.RestartNodeResult> RestartNodeAsync (System.Fabric.ReplicaSelector replicaSelector, bool createFabricDump, System.Fabric.CompletionMode completionMode, TimeSpan operationTimeout, System.Threading.CancellationToken token);
member this.RestartNodeAsync : System.Fabric.ReplicaSelector * bool * System.Fabric.CompletionMode * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Fabric.Result.RestartNodeResult>
Public Function RestartNodeAsync (replicaSelector As ReplicaSelector, createFabricDump As Boolean, completionMode As CompletionMode, operationTimeout As TimeSpan, token As CancellationToken) As Task(Of RestartNodeResult)

Parameters

replicaSelector
ReplicaSelector

This parameter is used to choose a specific replica. This replica's corresponding node will be restarted.

createFabricDump
Boolean

If set to true, the system will create the process dump for Fabric.exe on this node.

completionMode
CompletionMode

If set to Verify, the system will check that the node restarted, and the API will not return until it has and NodeStatus is Up. If set to DoNotVerify, the API returns once the node restart has been initiated.

operationTimeout
TimeSpan

The timeout for this API call.

token
CancellationToken

The cancellation token that is monitored for any request to cancel the operation.

Returns

A task with information representing the target node, and the replica selected.

Exceptions

The ErrorCode property will indicate the reason. If the ErrorCode is InvalidArgument, nodeName is invalid. If the ErrorCode is ReplicaDoesNotExist, the selected replica was not found. If the ErrorCode is PartitionNotFound, the specified partition does not exist.

The operation timed out.

An argument with a value of null was passed in.

Remarks

A cluster node is a process, not an virtual or physical machine. If the createFabricDump parameter is set, on restart the process is crashed and the crash dump is placed in the Crash Dumps folder which the DCA can be configured to upload.

Applies to

RestartNodeAsync(String, BigInteger, Boolean, CompletionMode, TimeSpan, CancellationToken)

Restarts a cluster node by restarting the Fabric.exe process that hosts the node.

public System.Threading.Tasks.Task<System.Fabric.Result.RestartNodeResult> RestartNodeAsync (string nodeName, System.Numerics.BigInteger nodeInstance, bool createFabricDump, System.Fabric.CompletionMode completionMode, TimeSpan operationTimeout, System.Threading.CancellationToken token);
member this.RestartNodeAsync : string * System.Numerics.BigInteger * bool * System.Fabric.CompletionMode * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Fabric.Result.RestartNodeResult>
Public Function RestartNodeAsync (nodeName As String, nodeInstance As BigInteger, createFabricDump As Boolean, completionMode As CompletionMode, operationTimeout As TimeSpan, token As CancellationToken) As Task(Of RestartNodeResult)

Parameters

nodeName
String

The node name of the node to restart.

nodeInstance
BigInteger

The node instance ID of the node to restart. If not specified, or is set to 0, the value is ignored. If the instance is set to -1, the system will internally determine this value. If the instance has a positive value, it is compared with the active node ID. If the IDs do not match, the process is not restarted and an error occurs. A stale message can cause this error.

createFabricDump
Boolean

If set to true, the system will create the process dump for Fabric.exe on this node.

completionMode
CompletionMode

If set to Verify, the system will check that the node restarted, and the API will not return until it has and NodeStatus is Up. If set to DoNotVerify, the API returns once the node restart has been initiated.

operationTimeout
TimeSpan

The timeout for this API call.

token
CancellationToken

The cancellation token that is monitored for any request to cancel the operation.

Returns

A task with information representing the target node.

Exceptions

The ErrorCode property will indicate the reason. If the ErrorCode is NodeNotFound, nodeName is invalid. If the ErrorCode is InstanceIdMismatch, the nodeInstance provided does not match the currently running instance.

The operation timed out.

An argument with a value of null was passed in.

Remarks

This API simulates Service Fabric node failures in the cluster, which tests the fail-over recovery paths of your service.

Applies to