问题
I'm looking for a way of cleaning old application versions in Service Fabric via the SDK. It seems there is no way to unprovision a version by using FabricClient
's ApplicationManager
(similar to the action available in the Service Fabric Explorer, Application Type view) ?
I can get a list of all the versions for an application type by using: fabricClient.QueryManager.GetApplicationTypeListAsync()
回答1:
How about this:
public System.Threading.Tasks.Task UnprovisionApplicationAsync (string applicationTypeName, string applicationTypeVersion);
Unregisters and removes a Service Fabric application type from the cluster.
回答2:
SF performes a regular sync on the nodes, so after a while the folders on the disk for the unprovisioned versions will be cleaned.
来源:https://stackoverflow.com/questions/44114543/azure-service-fabric-unprovision-application-version