You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "KreVet-Ka (via GitHub)" <gi...@apache.org> on 2026/04/21 07:58:52 UTC
[I] Cloudstack allows you to create snapshots with the same name [cloudstack]
KreVet-Ka opened a new issue, #13051:
URL: https://github.com/apache/cloudstack/issues/13051
### problem
Bug report:
CloudStack allows creating multiple snapshots of the same volume with identical names.
<img width="1126" height="307" alt="Image" src="https://github.com/user-attachments/assets/789aad21-4259-4d36-aafd-91a21770027f" />
These snapshots are treated as separate entities in CloudStack, but they reference the same snapshot file on secondary storage.
<img width="1335" height="86" alt="Image" src="https://github.com/user-attachments/assets/a55a91f4-729e-496f-823c-b4c1a2e7d970" />
The snapshot file on secondary storage is overwritten when a snapshot with the same name is created
<img width="1430" height="281" alt="Image" src="https://github.com/user-attachments/assets/9dea9d6d-0a85-49ee-8b7d-d7de77d56717" />
When one of these snapshots is deleted via CloudStack. The snapshot file is removed from secondary storage. Other snapshot entries remain in CloudStack but no longer have a corresponding file.
Deleted a snapshot in Cloudstack
<img width="1416" height="267" alt="Image" src="https://github.com/user-attachments/assets/be66b591-9af6-4b0b-9fcb-78d2ff021248" />
The first snapshot was deleted from CloudStack. During the deletion process, CloudStack also removed the snapshot file from secondary storage.
<img width="1609" height="390" alt="Image" src="https://github.com/user-attachments/assets/e981baeb-6877-4b0d-a2dd-7869a3258657" />
However, a second snapshot entry still remains in the database and references a file on secondary storage that no longer exists.
<img width="1481" height="106" alt="Image" src="https://github.com/user-attachments/assets/27b70acf-2789-46e1-b1ae-bdc35f2fe1b7" />
### versions
ACS: 4.20.2.0
Hypervisor: KVM
Primary Storage: Linstor
Secondary Storage: NFS
### The steps to reproduce the bug
1. Create a volume
2. Create snapshot with name "test-snapshot"
3. Create another snapshot with the same name "test-snapshot"
4. Verify that both snapshots exist in CloudStack
5. Delete ONE of the snapshots via CloudStack
6. Check secondary storage โ snapshot file is removed
7. Check remaining snapshot in CloudStack
### What to do about it?
Prevent creating snapshots with the same name for the same volume. Deleting one breaks the other.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Cloudstack allows you to create snapshots with the same name for the same volume [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland closed issue #13051: Cloudstack allows you to create snapshots with the same name for the same volume
URL: https://github.com/apache/cloudstack/issues/13051
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Cloudstack allows you to create snapshots with the same name for the same volume [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on issue #13051:
URL: https://github.com/apache/cloudstack/issues/13051#issuecomment-6335620388
fixed in #14089
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Cloudstack allows you to create snapshots with the same name for the same volume [cloudstack]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #13051:
URL: https://github.com/apache/cloudstack/issues/13051#issuecomment-5330088797
## ๐ฏ Triage report
CloudStack does not enforce unique volume snapshot names, so two snapshots on the same volume with the same name silently overwrite each other's underlying file on secondary storage; deleting one DB entry then removes the file backing the other, causing broken/orphaned snapshot references and potential data loss.
### ๐ Assessment
| Dimension | Value | Reasoning |
|---|---|---|
| **Type** | type:bug | Missing validation leads to real data loss, not just a cosmetic issue |
| **Component** | component:primary-storage | Snapshot naming/storage path collision; also touches secondary storage but primary volume/snapshot management is the root cause |
| **Severity** | Severity:Major | Can cause silent, unrecoverable loss of a snapshot's data |
| **Labels** | type:bug, component:primary-storage | |
| **Coding agent** | Suitable | Well-defined scope: add a uniqueness check/validation on snapshot name per volume at creation time; clear reproduction steps provided |
### ๐ Similar issues
No similar open issues found; this appears to be a distinct, previously unreported bug about snapshot name uniqueness not being enforced.
<details><summary>๐ก Notes and suggestions</summary>
- Suggested fix: enforce snapshot name uniqueness per volume (or generate a unique storage-side filename independent of the user-supplied display name) in `createSnapshot` validation.
- Consider whether existing snapshots in the field may already have silent collisions; a migration/audit script might be needed to detect orphaned references.
</details>
> Generated by [Daily Issue Triage](https://github.com/apache/cloudstack/actions/runs/32143747223) ยท sonnet50 259.3K ยท [โท](https://github.com/search?q=repo%3Aapache%2Fcloudstack+%22gh-aw-workflow-call-id%3A+apache%2Fcloudstack%2Fdaily-issue-triage%22&type=issues)
>
<details>
<summary>Add this agentic workflows to your repo</summary>
To install this agentic workflow, run
```
gh aw add githubnext/agentics/workflows/daily-issue-triage.md@d7c1dc4b72b00607a67caaffdcc216cb64379cf9
```
</details>
<!-- gh-aw-agentic-workflow: Daily Issue Triage, engine: copilot, version: 1.0.52, model: claude-sonnet-5, id: 32143747223, workflow_id: daily-issue-triage, run: https://github.com/apache/cloudstack/actions/runs/32143747223 -->
<!-- gh-aw-workflow-call-id: apache/cloudstack/daily-issue-triage -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org