service-fabric-cli icon indicating copy to clipboard operation
service-fabric-cli copied to clipboard

ICommunicationListener.CloseAsync not called on replica removed when force-remove=false

Open talarari opened this issue 6 years ago • 2 comments

I'm trying to issue a sfctl replica remove command to gracefully restart my stateless service process. when using this command:

sfctl replica remove --node-name mynodename --partition-id mypartitionid --replica-id myinstanceid

ICommunicationListener.CloseAsync is not called and instead ICommunicationListener.Abort is called.

when using the force-remove=false flag neither the ICommunicationListener.Abort nor the ICommunicationListener.CloseAsync functions get called.

What is the expected behavior for replica remove with --force-remove=false? what is the default? how can i achieve graceful restart of my stateless service process?

talarari avatar Aug 09 '18 10:08 talarari

Why are you trying to do this? Is this for testing or some other reason?

abhishekram avatar Aug 13 '18 20:08 abhishekram

Also wanted to add that the behavior you saw is expected. For graceful restart of your service process, there is no direct command that does it.

One option is to trigger an application upgrade with the --force-restart option, which will result in graceful restart of your processes one upgrade domain at a time. https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-sfctl-application#sfctl-application-upgrade

Please note that you don't necessarily need to update the application version in order to perform an upgrade. You can also do this by updating some application parameter. You could also designate a "dummy" application parameter just for this purpose.

abhishekram avatar Aug 17 '18 00:08 abhishekram