When step 3 and 5 are missing, ImageStore accumulates files.
How to configure cleaning up copied application package (automatic Step 3)
At step 2, Register (a.k.a. Provision), the application package is deleted after successfully registering the application type.
<Parameter Name="CleanupApplicationPackageOnProvisionSuccess" Value="False" />
</Section>
This configuration enabled automatic cleanup of application package after successfully registering the application type.
How to configure cleaning up automatically unused application type (automatic Step 5)
<Section Name="Management">
<Parameter Name="CleanupUnusedApplicationTypes" Value="true" />
<Parameter Name="PeriodicCleanupUnusedApplicationTypes" Value="true" />
<Parameter Name="TriggerAppTypeCleanupOnProvisionSuccess" Value="true" />
<Parameter Name="MaxUnusedAppTypeVersionsToKeep" Value="3" />
</Section>
When ImageStoreService must be cleaned up manually, you can follow this steps.
1. Delete copied packages
#Delete Content from Image Store
$content =
Get-ServiceFabricImageStoreContent -RemoteRelativePath "\" -ImageStoreConnectionString fabric:ImageStore
foreach($folder in $content)
{
Write-Host Working on $folder.StoreRelativePath
if (($folder.StoreRelativePath -ne "Store") -and ($folder.StoreRelativePath -ne "WindowsFabricStore"))
{
Write-Host Deleting $folder.StoreRelativePath
Remove-ServiceFabricApplicationPackage -ApplicationPackagePathInImageStore $folder.StoreRelativePath -ImageStoreConnectionString fabric:ImageStore
}
}
2. Unregister
Unregister-ServiceFabricApplicationType will remove application packages from image store as well as ImageCache on nodes (after a while).
Scenario1 : Seeing zombie application package in the store, which taking most of the disk space.
Note : For 6.5+ Cluster, SFX had ImageStoreService tab in Cluster, where GetSize button to get the size of Store content.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.