Bug 1380365 - [RFE][HC] - allow forcing import of a VM from a storage domain, even if some of its disks are not accessible.
Summary: [RFE][HC] - allow forcing import of a VM from a storage domain, even if some ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RFEs
Version: 4.0.4
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ovirt-4.1.0-alpha
: 4.1.0.2
Assignee: Maor
QA Contact: SATHEESARAN
URL:
Whiteboard:
Depends On:
Blocks: 1393257 1430559
TreeView+ depends on / blocked
 
Reported: 2016-09-29 11:48 UTC by Yaniv Lavi
Modified: 2017-04-27 09:37 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
This update adds the ability to import partial virtual machines using the REST API. The Hyper Converged Infrastructure (HCI) Disaster Recovery (DR) solution is based on the concept that only data disks are replicated and system disks are not. Previously, if some of the virtual machine's disks were not replicated, the virtual machine import would fail. Since disks have snapshots, they cannot be imported as floating disks. To allow the DR to work, a virtual machine is forced to import from a storage domain, even if some of its disks are not accessible. The following is a REST request for importing a partial unregistered virtual machine. POST /api/storagedomains/xxxxxxx-xxxx-xxxx-xxxxxx/vms/xxxxxxx-xxxx-xxxx-xxxxxx/register HTTP/1.1 Accept: application/xml Content-type: application/xml <action> <cluster id='bf5a9e9e-5b52-4b0d-aeba-4ee4493f1072'></cluster> <allow_partial_import>true</allow_partial_import> </action>
Clone Of:
Environment:
Last Closed: 2017-04-27 09:37:20 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.1+
ylavi: planning_ack+
amureini: devel_ack+
ratamir: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 66955 0 master MERGED core: Allow register a VM with partial disks. 2020-05-26 15:30:46 UTC
oVirt gerrit 66956 0 master MERGED restapi: Support register a VM with partial disks. 2020-05-26 15:30:47 UTC
oVirt gerrit 66957 0 master MERGED core: Allow register a Template with partial disks. 2020-05-26 15:30:48 UTC
oVirt gerrit 66958 0 master MERGED restapi: Support register a template with partial disks. 2020-05-26 15:30:46 UTC
oVirt gerrit 66960 0 master MERGED Add flag allowPartialImport when importing a Template. 2020-05-26 15:30:47 UTC
oVirt gerrit 66961 0 master MERGED Add flag allowPartialImport when importing a VM 2020-05-26 15:30:47 UTC

Description Yaniv Lavi 2016-09-29 11:48:12 UTC
Description of problem:
HCI DR solution is based on the concept that only data disks are replicated and system disks are not. Currently if some of the VM's disks are not replicated the import of the VM fails. Since some of the disks have snapshots, they can not be imported as floating disks.
To allow the DR to works we need to force import of a VM from a storage domain, even if some of its disks are not accessible.

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

How reproducible:
Always

Steps to Reproduce:
1. Import a VM from storage domain with partial disks.

Actual results:
Fails

Expected results:
Should allow to force import.

Additional info:

Comment 1 Maor 2016-11-08 13:03:54 UTC
As I understood after talking with Yaniv, we want to be able to register VMs even if part of the storage domains does not exist in the engine (were not imported yet).

The behavior is that the user will be able to check a force check box, and the VM will be imported only with the disks that are exist.

I got a few questions, I will be happy if you can shed light on:
1) Do we want this behavior to reflect also on then export domain?

2) Do we still want to force import an unregistered VM if the storage domain does exists but the disk doesn't (Currently this behavior is blocked also for import VM)?

3) Do we want to support this also for Templates?
The reason I ask is what if the user will import a partial Template with partial disks, and then the user will add another storage domain and try to import a VM based on that Template.
This will block the VM to imported since part of the VM disks that are on the latest imported storage domain will not have a relate disk of the template.

4) We need to check what will happen if we will have a snapshot containing disks from missing storage domains, I think that the appropriate behavior will be to re-create those OVFs and remove the missing disks from the snapshot's OVF.

Comment 2 Yaniv Lavi 2016-11-09 14:47:44 UTC
(In reply to Maor from comment #1)
> As I understood after talking with Yaniv, we want to be able to register VMs
> even if part of the storage domains does not exist in the engine (were not
> imported yet).
> 
> The behavior is that the user will be able to check a force check box, and
> the VM will be imported only with the disks that are exist.
> 
> I got a few questions, I will be happy if you can shed light on:
> 1) Do we want this behavior to reflect also on then export domain?

I believe no since this is specific for the HCI DR and they don't use export domain for this.

> 
> 2) Do we still want to force import an unregistered VM if the storage domain
> does exists but the disk doesn't (Currently this behavior is blocked also
> for import VM)?

The HCI will always have a data disk present to import with.
Keep it simple and do what is easier, either way is fine.

> 
> 3) Do we want to support this also for Templates?
> The reason I ask is what if the user will import a partial Template with
> partial disks, and then the user will add another storage domain and try to
> import a VM based on that Template.
> This will block the VM to imported since part of the VM disks that are on
> the latest imported storage domain will not have a relate disk of the
> template.

Sahina?

> 
> 4) We need to check what will happen if we will have a snapshot containing
> disks from missing storage domains, I think that the appropriate behavior
> will be to re-create those OVFs and remove the missing disks from the
> snapshot's OVF.

+1

Comment 3 Sahina Bose 2016-11-09 15:27:01 UTC
(In reply to Yaniv Dary from comment #2)
> (In reply to Maor from comment #1)
> > As I understood after talking with Yaniv, we want to be able to register VMs
> > even if part of the storage domains does not exist in the engine (were not
> > imported yet).
> > 
> > The behavior is that the user will be able to check a force check box, and
> > the VM will be imported only with the disks that are exist.

In the DR scenario, a gluster volume is backed up and imported in a new instance of RHV. This gluster volume has the data disk, but not the OS disks of VMs. The OVF_STORE present on the storage domain contains the metadata information of the VMs. We want a way to import the data disks and attach it to another running VM in the new instance. Is this possible with the proposed flow of importing VM?

> > 
> > I got a few questions, I will be happy if you can shed light on:
> > 1) Do we want this behavior to reflect also on then export domain?
> 
> I believe no since this is specific for the HCI DR and they don't use export
> domain for this.

Right. No.
> 
> > 
> > 2) Do we still want to force import an unregistered VM if the storage domain
> > does exists but the disk doesn't (Currently this behavior is blocked also
> > for import VM)?
> 
> The HCI will always have a data disk present to import with.
> Keep it simple and do what is easier, either way is fine.

I'm not sure I understand what an unregistered VM is. Does the flow I mention above answer the question?

> 
> > 
> > 3) Do we want to support this also for Templates?
> > The reason I ask is what if the user will import a partial Template with
> > partial disks, and then the user will add another storage domain and try to
> > import a VM based on that Template.
> > This will block the VM to imported since part of the VM disks that are on
> > the latest imported storage domain will not have a relate disk of the
> > template.
> 
> Sahina?

I think we don't need to support templates - atleast in the use case that I described above.
> 
> > 
> > 4) We need to check what will happen if we will have a snapshot containing
> > disks from missing storage domains, I think that the appropriate behavior
> > will be to re-create those OVFs and remove the missing disks from the
> > snapshot's OVF.
> 
> +1

Comment 4 Maor 2016-11-13 15:03:35 UTC
(In reply to Sahina Bose from comment #3)
> (In reply to Yaniv Dary from comment #2)
> > (In reply to Maor from comment #1)
> > > As I understood after talking with Yaniv, we want to be able to register VMs
> > > even if part of the storage domains does not exist in the engine (were not
> > > imported yet).
> > > 
> > > The behavior is that the user will be able to check a force check box, and
> > > the VM will be imported only with the disks that are exist.
> 
> In the DR scenario, a gluster volume is backed up and imported in a new
> instance of RHV. This gluster volume has the data disk, but not the OS disks
> of VMs. The OVF_STORE present on the storage domain contains the metadata
> information of the VMs. We want a way to import the data disks and attach it
> to another running VM in the new instance. Is this possible with the
> proposed flow of importing VM?


Hi Sahina,

The flow we were thinking of is to allow importing unregistered VMs with partial disks to the engine.
We currently don't support register floating disks with snapshots.
The end result would be a VM with only data disks but you won't be able to attach those disks to a new VM but you can attach an additional system disk to the imported VM.
I think that this would be a better solution since you will maintain the VM details and won't need to create a new VM.
Does that fit your solution?

Comment 5 Maor 2016-11-13 15:05:08 UTC
(In reply to Maor from comment #4)
> (In reply to Sahina Bose from comment #3)
> > (In reply to Yaniv Dary from comment #2)
> > > (In reply to Maor from comment #1)
> > > > As I understood after talking with Yaniv, we want to be able to register VMs
> > > > even if part of the storage domains does not exist in the engine (were not
> > > > imported yet).
> > > > 
> > > > The behavior is that the user will be able to check a force check box, and
> > > > the VM will be imported only with the disks that are exist.
> > 
> > In the DR scenario, a gluster volume is backed up and imported in a new
> > instance of RHV. This gluster volume has the data disk, but not the OS disks
> > of VMs. The OVF_STORE present on the storage domain contains the metadata
> > information of the VMs. We want a way to import the data disks and attach it
> > to another running VM in the new instance. Is this possible with the
> > proposed flow of importing VM?
> 
> 
> Hi Sahina,
> 
> The flow we were thinking of is to allow importing unregistered VMs with
> partial disks to the engine.
> We currently don't support register floating disks with snapshots.
> The end result would be a VM with only data disks but you won't be able to
> attach those disks to a new VM but you can attach an additional system disk
> to the imported VM.
> I think that this would be a better solution since you will maintain the VM
> details and won't need to create a new VM.
> Does that fit your solution?

BTW, do you require the UI for this solution or the API should be enough?

Comment 6 Sahina Bose 2016-11-14 10:03:38 UTC
(In reply to Maor from comment #4)
> (In reply to Sahina Bose from comment #3)
> > (In reply to Yaniv Dary from comment #2)
> > > (In reply to Maor from comment #1)
> > > > As I understood after talking with Yaniv, we want to be able to register VMs
> > > > even if part of the storage domains does not exist in the engine (were not
> > > > imported yet).
> > > > 
> > > > The behavior is that the user will be able to check a force check box, and
> > > > the VM will be imported only with the disks that are exist.
> > 
> > In the DR scenario, a gluster volume is backed up and imported in a new
> > instance of RHV. This gluster volume has the data disk, but not the OS disks
> > of VMs. The OVF_STORE present on the storage domain contains the metadata
> > information of the VMs. We want a way to import the data disks and attach it
> > to another running VM in the new instance. Is this possible with the
> > proposed flow of importing VM?
> 
> 
> Hi Sahina,
> 
> The flow we were thinking of is to allow importing unregistered VMs with
> partial disks to the engine.
> We currently don't support register floating disks with snapshots.
> The end result would be a VM with only data disks but you won't be able to
> attach those disks to a new VM but you can attach an additional system disk
> to the imported VM.

In the flow that we had proposed, the new VM is recreated from a template. In this case, is there a similar way where the additional system disk can be cloned from an existing one and attached to the imported VM?
If so, this should work for us.
> I think that this would be a better solution since you will maintain the VM
> details and won't need to create a new VM.
> Does that fit your solution?

>BTW, do you require the UI for this solution or the API should be enough?
And yes, UI will be good to have

Comment 7 Maor 2016-11-14 23:48:14 UTC
Updating the bug after a meeting with Sahina over the phone:
We have decided that since supporting floating disks with snapshots will be a major change for the upcoming version we aim to support registering VMs with partial disks for now.

Comment 8 Maor 2016-11-17 03:31:58 UTC
Sahina,

After the VMs will be registered successfully, are you planning to move or copy the disks from one storage to another?

Just want to be sure that oVirt will support the whole scenario you plan.
I know for sure that move operation will work well and keep the volume chain with all its snapshots after the move.

Comment 9 Maor 2016-11-20 10:09:39 UTC
Sahina,

How crucial it is that the allow_partial_import flag will be also in the GUI?
I'm asking since it seems that the dialog of the register is pretty loaded.

The REST seems to work well for now, you can checkout the patches and see if that works for the customer use case.

This is the following REST command to import a partial unregistered VM (Same goes for Template)

POST /api/storagedomains/xxxxxxx-xxxx-xxxx-xxxxxx/vms/xxxxxxx-xxxx-xxxx-xxxxxx/register HTTP/1.1
Accept: application/xml
Content-type: application/xml

<action>
    <cluster id='bf5a9e9e-5b52-4b0d-aeba-4ee4493f1072'></cluster>
    <allow_partial_import>true</allow_partial_import>
</action>

Comment 10 Sahina Bose 2016-11-23 09:27:46 UTC
Let me first test out the flow via REST before we check on the UI

Comment 11 Yaniv Lavi 2016-11-30 10:35:22 UTC
(In reply to Sahina Bose from comment #10)
> Let me first test out the flow via REST before we check on the UI

I don't see us adding UI to this later since we have FF coming up.
Please decide if it's needed and describe the use case. If you don't have one, we will not be doing anything until 4.2.

Comment 12 Sandro Bonazzola 2016-12-12 13:57:35 UTC
The fix for this issue should be included in oVirt 4.1.0 beta 1 released on December 1st. If not included please move back to modified.

Comment 13 Sahina Bose 2016-12-13 16:14:12 UTC
(In reply to Yaniv Dary from comment #11)
> (In reply to Sahina Bose from comment #10)
> > Let me first test out the flow via REST before we check on the UI
> 
> I don't see us adding UI to this later since we have FF coming up.
> Please decide if it's needed and describe the use case. If you don't have
> one, we will not be doing anything until 4.2.

Ok, the API is fine for 4.1

Comment 14 Yaniv Lavi 2017-01-23 12:09:18 UTC
Sahina, can you verify this bug based on the DR script testing?

Comment 15 Sahina Bose 2017-01-27 06:59:07 UTC
Yes - changing QE contact to Sas to cover as part of DR workflow

Comment 19 SATHEESARAN 2017-04-05 07:17:09 UTC
Tested with RHV 4.1.1-6.

When the geo-replicated glusterfs storage domain is imported in the another RHV instance, the partial disks and templates could be registered


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