cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Vm Snapshot left in allocated state are not cleaned up

Open kiranchavala opened this issue 1 year ago • 1 comments

ISSUE TYPE

Bug

COMPONENT NAME

Component: Bug

CLOUDSTACK VERSION

Cloudstack version 4.18, 4.19 rc1

SUMMARY

Vm Snapshot left in the allocated state are not cleaned up

Steps to reproduce the behaviour

  1. launch a vm with root disk

  2. Take a vm-snapshot

  3. Stop the management server when vm snapshot is in progress

  4. Navigate to the database, and check the snapshots table, the snapshot


*************************** 3. row ***************************
                 id: 3
               uuid: 1b83e2ef-10f6-48ee-a5d6-bed473083f8a
               name: i-2-40-VM_VS_20240102064443
       display_name: cv
        description: cv
              vm_id: 40
         account_id: 2
          domain_id: 1
service_offering_id: 1
   vm_snapshot_type: DiskAndMemory
              state: Allocated
             parent: NULL
            current: NULL
       update_count: 0
            updated: NULL
            created: 2024-01-02 06:44:43
            removed: NULL

  1. Start the Management server

  2. Navigate to the U

Storage > VM Snapshots >

There is no option to delete the vm snapshots which are struck in allocated state

Screenshot 2024-01-02 at 12 24 24 PM

Screenshot 2024-01-02 at 12 22 26 PM

Actual Behaviour

There is no option to delete the VM Snapshots which are in Allocated state

Expected Behaviour

Cloudstack should be able to delete the VM Snapshots in Allocated state or Cloudstack should mark the VMSnapshots in destoryed state and mark them removed so that it's not displayed in the UI

kiranchavala avatar Jan 02 '24 06:01 kiranchavala

If you try to take another vmsnapshot, the following exception occurs

Screenshot 2024-01-02 at 12 31 28 PM

kiranchavala avatar Jan 02 '24 07:01 kiranchavala

We could probably benefit from a delete API supporting a force option which deletes the failed item from ACS DB, so users/admins can do other things (like expunge instance with failed VM snapshots)

rohityadavcloud avatar Aug 26 '25 11:08 rohityadavcloud

fixed by #8452

weizhouapache avatar Sep 23 '25 06:09 weizhouapache