简体   繁体   中英

Azure Service Fabric Application stuck in Deleting state

I had a deployment on my service fabric cluster go wrong; I attempted to delete an application and for some reason, the deletion never seemed to and now the application is stuck in the deleting state, while all my deployments remain. I can't delete or upgrade the application since I get a status of "deleting"

Is there a way to update the status of the application so I can then proceed to delete it (for real) this time?

You'll most likely need to use power shell and execute an application delete that way, I had this issue as well when starting out with service fabric.

For instructions on how to connect to the cluster using powershell click here .

$nodes = Get-ServiceFabricNode

foreach ($node in $nodes)
{
    $replicas = Get-ServiceFabricDeployedReplica -NodeName $node.NodeName -ApplicationName "fabric:/AppNameHere"

    foreach ($replica in $replicas)
    {
        Remove-ServiceFabricReplica -ForceRemove -NodeName $node.NodeName -PartitionId $replica.PartitionId -ReplicaOrInstanceId $replica.ReplicaOrInstanceId
    }
}

Deletions that get stuck, in my experience, are often due to the application not honoring cancellation tokens. What kind of application did you deploy?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM