0

I used to use Remove-ServiceFabricNodeState to remove faulted Service Fabric nodes. with this cmdlet i was able to remove a specific node by its name.

However I'm unable to use this cmdlet any more. It is not allowing me to install the module using Install-Module ServiceFabric anymore saying the module cannot be found in the gallery.

Also I'm unable to find a similar cmdlet in iether Az.ServiceFabric or az cli. all that is available is a Remove-AzServiceFabricNode which cannot specify which node I want to remove. It just accepts an integer for how many nodes I want to remove.

I would like to know how can I remove a Node by its name?

Nandun
  • 1,802
  • 2
  • 20
  • 35

2 Answers2

1

You can use Azure Service Fabric CLI with

sfctl node remove-state --node-name Node01 --timeout 60

This will remove the state of Node1 with a timeout of 60 seconds. Documnetation

For more information on how to install sfctl see how to install sfctl Simple version:

  1. Install Python (Version 3.X)
  2. Install Pip
  3. Execute the following command pip install -I sfctl==9.0.0. See table to see which version you need.
Preben Huybrechts
  • 5,853
  • 2
  • 27
  • 63
1

To use Remove-ServiceFabricNodeState, just need to install the Azure Service Fabric SDK, it also includes the runtime and tools, after installing it, reopen a PowerShell session, you will be able to use the command.

enter image description here

Besides, you can also use the Azure Service Fabric CLI command sfctl node remove-state as mentioned in another reply, all depend on your requirement.

Joy Wang
  • 39,905
  • 3
  • 30
  • 54