| Summary: | should prevent creating snapshot image with the same file name as file in snapshot chain | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Shirley Zhou <szhou> |
| Component: | qemu-kvm | Assignee: | Jes Sorensen <Jes.Sorensen> |
| Status: | CLOSED WONTFIX | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.1 | CC: | kwolf, mkenneth, mshao, virt-maint |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-02-14 14:25:55 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Bug Depends On: | |||
| Bug Blocks: | 580946 | ||
|
Description
Shirley Zhou
2011-02-09 05:54:20 UTC
This was introduced by commit d1671013d61fd9204f063a643cb07935c41622bb: "Introduce do_snapshot_blkdev() and monitor command to handle it." You probably also shouldn't try to overwrite the image of a different disk in the VM, or the disk image of another VM, or your host kernel. The question is, how far can and should we go with sanity checking? We'll never be able to completely protect the user from doing stupid things. We could probably avoid overwriting any existing file by default, but then I guess we'd need a force flag. I added a basic test in the code to make sure we didn't try to overwrite the base image, however this test was effectively free. As Kevin points out too, there's an endless chain of options we would have to consider. A filename could be a link to a filename we already use etc. We would have to walk the full chain of backing files and stat() each one of them to compare the output. It will add expensive overhead without adding any real gain. The real fix here is to make sure you don't try to specify an existing image file or device. Closing as WONTFIX |