Removing an application from a service network cluster

I tried to remove the application from the service structure using the service explorer.

I uninstalled my application using the "Uninstall application" action. Then, when I tried the Unprovision application type, I received an error message,

Error: Application type version 1.0.0 cannot be excluded as it still contains active applications.

I saw that even after uninstalling the application in some nodes, the active service inside the application is still active. Attached is a screenshot of my tissue services researcher.

Any help regarding the complete removal of applications?

+4
source share
1 answer

, , , , RunAsync.

PowerShell script, .

Connect-ServiceFabricCluster -ConnectionEndpoint localhost:19000

$nodes = Get-ServiceFabricNode

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

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

All Articles