Bug 2015470

Summary: [CBT] It's possible to remove a disk immediately after starting a backup
Product: [oVirt] ovirt-engine Reporter: Benny Zlotnik <bzlotnik>
Component: BLL.StorageAssignee: Benny Zlotnik <bzlotnik>
Status: CLOSED CURRENTRELEASE QA Contact: Amit Sharir <asharir>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.4.8CC: bugs, dfodor, eshames
Target Milestone: ovirt-4.4.10Keywords: ZStream
Target Release: 4.4.10.1Flags: pm-rhel: ovirt-4.4+
asharir: testing_plan_complete-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.4.10.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-19 07:00:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
modified backup vm script none

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
3.

Actual results:
Disk detachment succeeds

Expected results:
Disk detachment should fail

Additional info:

Comment 1 Amit Sharir 2021-11-23 13:40:08 UTC
Version:
ovirt-engine-4.4.10-0.17.el8ev.noarch
vdsm-4.40.100.1-1.el8ev.x86_64


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.