Bug 2015470 - [CBT] It's possible to remove a disk immediately after starting a backup
Summary: [CBT] It's possible to remove a disk immediately after starting a backup
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.4.8
Hardware: Unspecified
OS: Unspecified
medium vote
Target Milestone: ovirt-4.4.10
Assignee: Benny Zlotnik
QA Contact: Amit Sharir
Depends On:
TreeView+ depends on / blocked
Reported: 2021-10-19 09:54 UTC by Benny Zlotnik
Modified: 2022-02-02 10:44 UTC (History)
3 users (show)

Fixed In Version: ovirt-engine-
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2022-01-19 07:00:13 UTC
oVirt Team: Storage
pm-rhel: ovirt-4.4+
asharir: testing_plan_complete-

Attachments (Terms of Use)
modified backup vm script (17.17 KB, text/plain)
2021-10-19 09:54 UTC, Benny Zlotnik
no flags Details

System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHV-43833 0 None None None 2021-10-19 09:55:55 UTC
oVirt gerrit 117074 0 master MERGED core: avoid passing lock to child command in StartVmBackup 2021-10-21 10:28:46 UTC
oVirt gerrit 117322 0 ovirt-engine-4.4 MERGED core: avoid passing lock to child command in StartVmBackup 2021-10-28 12:05:35 UTC

Description Benny Zlotnik 2021-10-19 09:54:27 UTC
Created attachment 1834568 [details]
modified backup vm script

Description of problem:
After starting a backup it is possible to manipulate the backed up disk, this happens because the memory lock is released by a child command.

This can be reproduced with the attached modified backup_vm.py script which attempts to detach the VM's disk immediately after backup starts. The operation should be blocked but it possible to detach the disk and even delete it later

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Start a VM
2. run the attached modified backup_vm.py script

Actual results:
Disk detachment succeeds

Expected results:
Disk detachment should fail

Additional info:

Comment 1 Amit Sharir 2021-11-23 13:40:08 UTC

Verification flow:
I Used the flow Benny mentioned with the attached script.

I ran the script like the following:
python3 backup_vm_modified.py -c engine start <vm_id>

Verification Conclusions:
The expected output matched the actual output.

I got the following error message when running the script from vdsm:
"fault reason is "Operation Failed". Fault detail is "[Cannot hot unplug Virtual Disk. The VM is during a backup operation.]". HTTP response code is 409" - which indicates that the disk detachment failed (as expected).

Bug verified.

Comment 3 Sandro Bonazzola 2022-01-19 07:00:13 UTC
This bugzilla is included in oVirt 4.4.10 release, published on January 18th 2022.

Since the problem described in this bug report should be resolved in oVirt 4.4.10 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.

Comment 4 Amit Sharir 2022-02-02 10:44:04 UTC
We would not check this flow in our automation since it will be hard to reproduce and will require running a script that our customers do not have.

Note You need to log in before you can comment on or make changes to this bug.