Bug 1983414 - Disks are locked forever when copying VMs' disks after snapshot
Summary: Disks are locked forever when copying VMs' disks after snapshot
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.4.8
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.4.8
: 4.4.8.2
Assignee: Benny Zlotnik
QA Contact: sshmulev
URL:
Whiteboard:
Depends On:
Blocks: 1999754
TreeView+ depends on / blocked
 
Reported: 2021-07-18 12:01 UTC by sshmulev
Modified: 2021-09-01 07:59 UTC (History)
8 users (show)

Fixed In Version: ovirt-engine-4.4.8.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1999754 (view as bug list)
Environment:
Last Closed: 2021-08-19 06:23:07 UTC
oVirt Team: Storage
Embargoed:
pm-rhel: ovirt-4.4+
lsvaty: blocker-
lsvaty: exception+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 115771 0 master MERGED core: unlock source chain after copy 2021-07-28 09:05:49 UTC

Description sshmulev 2021-07-18 12:01:22 UTC
Description of problem:
After doing a live snapshot to a VM with disks and then making a copy of them, the origin disks of the VM becomes locked.

Versions:
ovirt-engine-4.4.8-0.19.el8ev.noarch
vdsm-4.40.80.1-1.el8ev.x86_64


How reproducible:
100%

Steps to reproduce:
1) Create a VM from Template (latest-rhel-guest-image-8.3-infra)
2) Added 4 disks (from the same SD iscsi)
- size 1G, interface VirtIO, preallocated
- size 1G, interface VirtIO, Thin
- size 1G, interface VirtIO-SCSI, preallocated
- size 1G, interface VirtIO-SCSI, Thin
3) Run the VM
4) Create a live snapshot with memory
5) Turn off the VM
6) Create copy of each disk
7) Run the VM

Expected results:
VM should be up after step 7.

Actual results:
The disks are locked, So can't run the VM with the message:
Cannot run VM: The following disks are locked: VM_Disk4, VM_Disk2, VM_Disk1, VM_Disk3

Comment 2 Eyal Shenitzky 2021-07-18 14:17:43 UTC
Sophie, all disks copies finished before running the VM?

Comment 3 sshmulev 2021-07-18 15:30:57 UTC
(In reply to Eyal Shenitzky from comment #2)
> Sophie, all disks copies finished before running the VM?

After the copy operation is fully done I tried to run the VM. The disks are locked for good.
This has been reproduced manually and on 2 automation test cases.

I checked it also on 4.3 and it doesn't reproduce there (The issue started from 4.4.5).

Comment 6 Nir Soffer 2021-07-19 10:17:28 UTC
(In reply to sshmulev from comment #0)
> Steps to reproduce:
...
> 6) Create copy of each disk

What do you mean by create copy? Please specify the exact button in the UI
or the API/SDK call you are using to reproduce.

You also don't specify if you wait until the copy completes or not.

> 7) Run the VM
> 
> Expected results:
> VM should be up after step 7.

It depends if the copy was completed or not, which you did not specify.

> Actual results:
> The disks are locked, So can't run the VM with the message:
> Cannot run VM: The following disks are locked: VM_Disk4, VM_Disk2, VM_Disk1,
> VM_Disk3

This is expected if the copy is still running.

What we miss in this bug is a more detailed description of the events like:

1. Start copy disk1

relevant log...

2. Copy was completed

relevant log...

3. Try to start the VM - fail

relevant log...

Comment 7 sshmulev 2021-07-19 10:36:26 UTC
(In reply to Nir Soffer from comment #6)
> (In reply to sshmulev from comment #0)
> > Steps to reproduce:
> ...
> > 6) Create copy of each disk
> 
> What do you mean by create copy? Please specify the exact button in the UI
> or the API/SDK call you are using to reproduce.

The copy was done from the button in the UI.
> 
> You also don't specify if you wait until the copy completes or not.
> 
I added a comment that I waited until the copy was fully completed (comment3)

> > 7) Run the VM
> > 
> > Expected results:
> > VM should be up after step 7.
> 
> It depends if the copy was completed or not, which you did not specify.
> 
The copy was completed.

> > Actual results:
> > The disks are locked, So can't run the VM with the message:
> > Cannot run VM: The following disks are locked: VM_Disk4, VM_Disk2, VM_Disk1,
> > VM_Disk3
> 
> This is expected if the copy is still running.
>

Comment 8 sshmulev 2021-07-19 10:54:23 UTC
(In reply to Nir Soffer from comment #6)

> 
> What we miss in this bug is a more detailed description of the events like:
> 
> 1. Start copy origin_VM_Disk4_copy for example:
> 
2021-07-18 14:41:44,754+03 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedThreadFactory-engine-Thread-57319) [eaa78a88-f9fe-4877-9c43-0a2b258adc3f] EVENT_ID: USER_COPIED_DISK(2,004), User admin@internal-authz is copying disk origin_VM_Disk4_copy to domain iscsi_0.
> 
> 2. Copy was completed
> 
2021-07-18 14:42:00,342+03 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-49) [] EVENT_ID: USER_COPIED_DISK_FINISHED_SUCCESS(2,006), User admin@internal-authz finished copying disk origin_VM_Disk4_copy to domain iscsi_0.
> 
> 3. Try to start the VM - fail
> 
2021-07-18 14:54:51,900+03 WARN  [org.ovirt.engine.core.bll.RunVmCommand] (default task-47) [d326463a-a5e8-42f5-8edf-20682ecb3f5a] Validation of action 'RunVm' failed for user admin@internal-authz. Reasons: VAR__ACTION__RUN,VAR__TYPE__VM,ACTION_TYPE_FAILED_DISKS_LOCKED,$diskAliases origin_VM_Disk4, origin_VM_Disk2, origin_VM_Disk1, origin_VM_Disk3

Comment 9 Nir Soffer 2021-07-19 11:32:50 UTC
(In reply to sshmulev from comment #8)
Thanks, the issue is pretty clear now, disk remains locked after successful copy.

Comment 12 sshmulev 2021-08-02 14:30:00 UTC
Verified.

Versions:
ovirt-engine-4.4.8.2-0.11.el8ev.noarch
vdsm-4.40.80.3-1.el8ev

Steps to reproduce according to the bug description.
Everything worked as expected.

Comment 13 Sandro Bonazzola 2021-08-19 06:23:07 UTC
This bugzilla is included in oVirt 4.4.8 release, published on August 19th 2021.

Since the problem described in this bug report should be resolved in oVirt 4.4.8 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.


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