Skip to content

Record still left in snapshot_store_ref after primary storage has been removed causing 530 when listSanpshots is called #7093

Description

@davidjumani
ISSUE TYPE
  • Bug Report
COMPONENT NAME

Storage

CLOUDSTACK VERSION

4.17.2 (maybe before as well)

OS / ENVIRONMENT

VMware 6.7.3

SUMMARY

When a primary storage is deleted, the corresponding record in the snapshot_store_ref table is not deleted
Noted specifically in VMware

STEPS TO REPRODUCE
  • Take ROOT volume snapshot(This primary storage is Storage1.)
  • Migrate ROOT volume to other storage(as Storage2) with the API - migrateVirtualMachine -
  • Confirm the snapshot has two entries in cloud.snapshot_store_ref - one for primary and one for image.
  • Then remove Storage1.
  • Confirm that two entries remain in cloud.snapshot_store_ref.
  • Do a listSnapshots API call against the snapshot and observe Error:(HTTP 530, error code 9999) - Due to an NPE in the DB record refering to the deleted storage pool
EXPECTED RESULTS

The record in the table pointing to the now deleted primary storage is still present

ACTUAL RESULTS

The DB record is deleted

Similar to #3264

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions