Bug 834361 - webadmin [Direct Lun]: fix error when trying to create a template from a VM with direct LUN [text]
Summary: webadmin [Direct Lun]: fix error when trying to create a template from a VM w...
Keywords:
Status: CLOSED DUPLICATE of bug 841534
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-webadmin-portal
Version: 3.1.0
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
: 3.1.0
Assignee: Asaf Shakarchi
QA Contact: Dafna Ron
URL:
Whiteboard: storage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-21 16:20 UTC by Dafna Ron
Modified: 2016-02-10 17:13 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-21 12:06:08 UTC
oVirt Team: Storage
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
log (25.77 KB, application/x-xz)
2012-06-21 16:20 UTC, Dafna Ron
no flags Details

Description Dafna Ron 2012-06-21 16:20:00 UTC
Created attachment 593497 [details]
log

Description of problem:

if I try to create a template from a vm with attached direct lun I get an error that the vm has no disks. 
I can also create a template when we have a regular disk in the vm. 
so UI appears to be disregarding the existence of this object in the query. 

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

si6

How reproducible:

100%

Steps to Reproduce:
1. try to create a template from a vm with direct lun
2. add regular disk, try to create a template
3.
  
Actual results:

we get am error that the vm has no disks and when adding a regular disk we create the template 

Expected results:

we should add direct lun to queries and add an appropriate message. 

Additional info: backend log

Comment 1 Itamar Heim 2012-06-21 21:38:51 UTC
ayal - what's the expectation on creating a VM from a template with a direct lun disk? clone only?

I think we can just not allow direct lun disks in tempalte for now?

wrt user filtering, if we think this use case is relevant, a user would have a permission to see a direct lun disk since they have a permission to its template.

Comment 2 Ayal Baron 2012-06-24 20:58:59 UTC
(In reply to comment #1)
> ayal - what's the expectation on creating a VM from a template with a direct
> lun disk? clone only?

either clone or just not include the disk at all.  It's not clear what the correct behaviour should be.

> 
> I think we can just not allow direct lun disks in tempalte for now?

The behaviour that was defined the same as for snapshots, when creating a template, the template would not contain the direct lun so this is behaving as designed.


> 
> wrt user filtering, if we think this use case is relevant, a user would have
> a permission to see a direct lun disk since they have a permission to its
> template.

Comment 3 Dafna Ron 2012-06-25 08:15:44 UTC
this is not the correct behaviour. 
if we do not allow create templates we should block this behaviour from GUI and not leave it as is. 
reopening bug

Comment 4 Ayal Baron 2012-06-28 21:42:44 UTC
(In reply to comment #3)
> this is not the correct behaviour. 

where "this" is?

> if we do not allow create templates we should block this behaviour from GUI
> and not leave it as is. 
> reopening bug

We allow creating templates from VMs with snappable disks.
When creating the template we only clone the snappable disks.
So if you have a VM which only has a direct LUN there is no template that can be created from it.
Once it has a regular disk (one or more) then you can clone it.

This is the defined behaviour and it is exactly as you described it above, so I don't understand what the problem is.

Comment 5 Dafna Ron 2012-06-29 14:38:27 UTC
except that our error message is that the vm has no disks which means that we are unaware of its existence in the first place :)
aside from giving the wrong error message it means that we are completely ignoring the existence of a direct lun and this was not what was discussed on this feature.
I also think that leaving it as is, is a major bug waiting to happen (if for some reason someone will add code that sends the direct lun as a disk to backend and vdsm). 

just because we do not create the template does not mean that this is the correct behaviour.

Comment 6 Yaniv Kaul 2012-07-01 12:47:23 UTC
Please specify what is going to be fixed here. Not sure what the devel-ack was given for.

Comment 7 Ayal Baron 2012-07-10 12:12:02 UTC
(In reply to comment #5)
> except that our error message is that the vm has no disks which means that
> we are unaware of its existence in the first place :)

Error message should indeed be fixed

> aside from giving the wrong error message it means that we are completely
> ignoring the existence of a direct lun and this was not what was discussed
> on this feature.

What was discussed is that LUNs are not part of a snapshot

> I also think that leaving it as is, is a major bug waiting to happen (if for
> some reason someone will add code that sends the direct lun as a disk to
> backend and vdsm). 

I don't know what you mean

> 
> just because we do not create the template does not mean that this is the
> correct behaviour.

I don't know what you mean here either.

devel_ack for changing message.

Comment 8 Asaf Shakarchi 2012-08-15 11:42:29 UTC
Ayal - please provide the exact phrase.

Comment 9 Ayal Baron 2012-08-17 11:55:34 UTC
Allon, do we allow creation of such templates now? is the code in? (if so please close this bug)

Comment 10 Allon Mureinik 2012-08-19 09:12:43 UTC
Such creation is still blocked.
The exact phrase should be: "Cannot create snapshot. VM has no snappable disks."

Comment 11 Asaf Shakarchi 2012-08-19 16:47:54 UTC
I believe you've meant "Cannot create Template. VM has no snappable disks."

Comment 12 Allon Mureinik 2012-08-19 16:49:27 UTC
Asaf - indeed, my bad.

Comment 13 Asaf Shakarchi 2012-08-19 17:10:30 UTC
Patch submitted: http://gerrit.ovirt.org/#/c/7327/

Comment 14 Ayal Baron 2012-08-19 19:20:18 UTC
(In reply to comment #11)
> I believe you've meant "Cannot create Template. VM has no snappable disks."

'Snappable' is not a word in English.  Please avoid using it in formal messages, despite it being catchy.

so *if* we go on blocking it, message should be something in the lines of:
Template creation requires disks which are eligible for snapshot creation, VM has none.

Andrew, can you suggest a better phrasing?

Allon, I thought we do not wish to prevent this? (template would be virtual hardware config and networks/cluster info only).

Comment 15 Asaf Shakarchi 2012-08-20 15:34:52 UTC
Waiting for Andrew to answer, re-assigning.

Comment 16 Allon Mureinik 2012-08-21 06:50:37 UTC
Ayal - we don't /want/ to block this, the question is do we want to create such a behviour change given the RHEV-M's release timeline?

Comment 17 Allon Mureinik 2012-08-21 12:06:08 UTC
Guys, sorry, please ignore my last couple of comments.

The correct behaviour we agreed upon is indeed to allow diskless templates.
There is already a patch pending review for this in response to #841534.

I'm closing this bug as a duplicate.

*** This bug has been marked as a duplicate of bug 841534 ***


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