Bug 1529394 - [DR] - detaching of a storage domain with existing VM leases for VMs in down status fails which affect the failback flow
Summary: [DR] - detaching of a storage domain with existing VM leases for VMs in down ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Backend.Core
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.2.3
: 4.2.3.2
Assignee: Tal Nisan
QA Contact: Kevin Alon Goldblatt
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-27 22:40 UTC by Maor
Modified: 2018-05-10 06:28 UTC (History)
5 users (show)

Fixed In Version: ovirt-engine-4.2.3.2
Clone Of:
Environment:
Last Closed: 2018-05-10 06:28:07 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.2+
ylavi: exception+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1408877 0 unspecified CLOSED Detaching a storage domain containing leases of VMs or templates should be blocked 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1548010 0 medium CLOSED [Blocked] VM lease doesn't remove when VM unregistered from the data-center 2022-01-18 11:23:50 UTC
oVirt gerrit 89651 0 master MERGED core: Allow detaching of a storage domain with leases 2018-04-04 08:00:42 UTC
oVirt gerrit 89802 0 ovirt-engine-4.2 MERGED core: Allow detaching of a storage domain with leases 2018-04-04 09:04:52 UTC

Internal Links: 1408877 1548010

Description Maor 2017-12-27 22:40:12 UTC
Description of problem:
in commit 26b57d4c0926ae97e86e20c1ea41f8feea83efd2 we introduced a behavior which blocks the detach of a storage domain when any VM contains a lease on a storage domain.
This behavior might be problematic for the support of DR site-to-site related to the fail-back scenario.

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

How reproducible:
100%

Steps to Reproduce:
1. Add a VM lease on a storage domain
2. Move the storage domain to maintenance
3. Detach that storage domain

Actual results:
The detach operation is blocked

Expected results:
IMHO leases should be treated the same as we do with VM's disks.
If the VM is down we allow to detach the storage domain and the VM's disks are removed from the DB and can be restored once the VM will be registered again to the setup.

I think that the same behavior should apply for VM leases.
The engine should be able to detach the storage domain containing that lease and eventually restore it once the VM will be registered.

Currently, the VM leases are not part of the VM's/Template's OVF, so until they do, I think that we should avoid block the detach operation

Additional info:

Comment 1 Tal Nisan 2017-12-28 10:17:05 UTC
That's an option although the thing is that we cannot "register" those leases later, can we circumvent it while fall-backing or is it a must to change the behavior?

Comment 2 Maor 2017-12-28 11:54:38 UTC
(In reply to Tal Nisan from comment #1)
> That's an option although the thing is that we cannot "register" those
> leases later

Why not? We need to add this info in the OVF and once VM will be registered we will add it as part of the vm_static.
I think that we should support recovery of leases eventually, if the user will encounter a disaster he/she will probably want to have their leases back.

> , can we circumvent it while fall-backing or is it a must to
> change the behavior?

I thought about it but then we will need to manage that through ansible which I don't want to go there because it will complex the entire playbook.
For example we will have to remove those leases, what if it will fail? What if we will fail to add them on register?

Comment 3 Tal Nisan 2017-12-28 15:15:28 UTC
OK, will handle that, thanks for the input

Comment 4 Kevin Alon Goldblatt 2018-04-24 12:44:54 UTC
Verified with the following code:
-------------------------------------------
ovirt-engine-4.2.3-0.1.el7.noarch
vdsm-4.20.25-1.el7ev.x86_64

Verified with the following scenario:
-------------------------------------------

Steps to Reproduce:
1. Add a VM lease on a storage domain
2. Move the storage domain to maintenance
3. Detach that storage domain >>>>> works fine
4. Attach the storage domain again >>>> works fine

Actual results:
The detach operation is successfull


Moving to VERIFIED

Comment 5 Sandro Bonazzola 2018-05-10 06:28:07 UTC
This bugzilla is included in oVirt 4.2.3 release, published on May 4th 2018.

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