Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Service Fabric: removed actors and now upgrade fails

I'm trying to upgrade a Service Fabric application with a mix of stateful and stateless actors. I did some refactoring and so removed some actors I didn't need any more. Now, when I try to upgrade the application, I get the following error:

Services must be explicitly deleted before removing their Service Types.

After thinking about it a little bit, I think I understand the trouble that could come from removed services and upgrades, but then what's the correct way to do this?

like image 209
Michael Nero Avatar asked Mar 30 '16 21:03

Michael Nero


1 Answers

You need to remove the service instances before you can upgrade to a version that doesn't contain the removed service package. Either:

  • In SF Explorer, navigate to the service and click Actions > Delete Service
  • In PowerShell:

    Connect-ServiceFabricCluster
    Remove-ServiceFabricService -ServiceName fabric:/MyApp/MyService
    

DO BE CAREFUL - If you're deleting a stateful service you'll lose all its data. Always be sure to have a periodic backup of production data.

like image 198
Eli Arbel Avatar answered Oct 16 '22 19:10

Eli Arbel