Azure Service Fabric : Disable a node

Amine Charot
Charot
Published in
2 min readMar 20, 2019

When we try to disable a node in a cluster Service Fabric, we find ourselves face of three intents on Service Fabric Explorer :

  • Pause;
  • Restart;
  • Remove Data.

Using powershell, you have in addition of these intents, a Remove Node one. What is the difference between them ?

Pause intent is useful if you need to debug a service or the node without any changes (It keeps the same services and processes). It just pauses the node. The services inside will keep running but they will not move out and no other services will move in. It’s a pause state !

If you need to upgrade your OS or Service Fabric needs to upgrade itself, you have to choose the Restart intent. It will not remove the replicas because we know that we won’t remove or reimage the node but we will just restart it (it will come back).

The Remove Data will remove the knowledge about replicas. It’s like we need to clean this node (a reimage situation). In this case you should tell Service Fabric that you need to move replicas from this node. We generally do it to avoid data loss.

The last intent is Remove Node, used in case you have no other choice than removing the node. If you have the intention to scale down the cluster, you need to choose the Remove Node intent. Yes allright, but what is the difference between Remove Data and Node, both of them clean the node ! You are right, if you were in case where you should remove a Seed Node, the Remove Node intent will run a Service Fabric upgrade which will reconfigure the cluster manifest by voting on a new seed node to replace the one that you’ll remove.

This script disables a node using SF and wait for it status.

That’s all,

Bella ciao

--

--