Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1195039 - Inconsistent behavior of blank and custom templates when there is no enough MAC addresses left in MAC Address Pool and misleading error message
Summary: Inconsistent behavior of blank and custom templates when there is no enough M...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.5.0
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Michal Skrivanek
QA Contact: Michael Burman
URL:
Whiteboard:
Depends On: 999969
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-22 12:21 UTC by Michael Burman
Modified: 2016-04-20 01:38 UTC (History)
13 users (show)

Fixed In Version: 3.6.0-11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-20 01:38:07 UTC
oVirt Team: Virt
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 45342 0 master MERGED core: add action info when failing with 'not enough MAC' Never
oVirt gerrit 45351 0 ovirt-engine-3.6 MERGED core: add action info when failing with 'not enough MAC' Never

Description Michael Burman 2015-02-22 12:21:09 UTC
Description of problem:
Inconsistent behavior of blank and custom templates when there is no enough MAC addresses left in MAC Address Pool and misleading error message.

- When trying to create new VM from custom template and there is no enough 
MAC addresses left in the MAC address pool, i get the next error message:
Operation Canceled
Error while executing action:

customTemp:

    Not enough MAC addresses left in MAC Address Pool.

The result when pressing 'close' : operation indeed canceled, vm doesn't created.
- Same behavior^^ for VM's from snapshot(clone VM from snapshot). 

- When trying to create new VM from blank template and there is no enough MAC addresses left in the MAC address pool, i get the next error message:
Operation Canceled
Error while executing action:

blankTemp:

    Not enough MAC addresses left in MAC Address Pool.

The result when pressing 'close': operation actually succeed, VM created, vNIC's created according to free MAC's in the pool.
The error message in this case, is misleading.

- In both this cases the behavior is different and in case of blank template, the error message is misleading.

Version-Release number of selected component (if applicable):
3.5.0-0.32.el6ev
3.6.0-0.0.master.20150217062203.git1012296.el6

How reproducible:
100

Steps to Reproduce:
1. custom template with 3 vNIC's
1. Define MAC pool range of 00:00:00:00:00:05-00:00:00:00:00:06 via engine-config(3.5) or via 'configure'(3.6)
2. Create new VM based on blank template with 3 vNIC's
3. Remove VM from stem 2
4. Try to create new VM based on the custom template from step 1.

Actual results:
step 2 - when trying to approve operation getting the error message, but VM got created with 2 vNIC's instead of 3. This is expected behavior.
step 4 - when trying to approve operation getting the error message and VM doesn't created, operation canceled and new VM window dialog is closed.

Expected results:
1. The expected behavior should be the creation of the VM, in both cases. Without any error messages, maybe only warning message about the lack of MAC addresses. VM should be created with numbers of vNIC's according to the number of free MAC addresses. Same for snapshots.

2. The behavior should be consistent for all cases for new VM creation based on templates.

3. And even if i get an error message that saying that operation is canceled, i expect it to actually be canceled. Not like in the example described above, when creating new VM based on blank template. In such case you get operation canceled message, but VM got created in the end.

Comment 1 Omer Frenkel 2015-02-23 16:43:12 UTC
The problem here is that when creating vm from template,
the interfaces are created as part of the addVm command flow in the backend.
when creating vm from blank (and setting the nic in the dialog..)
then first the vm is created, and the nic is created afterwards by the ui in a different command.

although the ui can do some check before calling the add-vm, it might be racy and i am not sure it is worth dealing with.

Comment 2 Lior Vernia 2015-02-23 16:59:28 UTC
It's a good thing we're looking to fix Bug 999969 for 3.6 then :) Should make it very easy to also add/remove NICs upon creating of a VM (either from a template or from Blank) in a transactive way.

Comment 3 Omer Frenkel 2015-08-19 11:58:31 UTC
now that  Bug 999969 is solved, can you please check if this is still relevant?

Comment 4 Michael Burman 2015-08-19 15:16:12 UTC
Hi Omer,

It's the exact behavior like described in my Description above ^^
So yes, it is still relevant. nothing changed here. Thanks.

Comment 5 Omer Frenkel 2015-08-24 06:33:13 UTC
Ok, looking into this and the issue is that when creating vm from blank, and setting the nics in the dialog, what actually happens is:
1. add vm from blank (without nics)
2. add nics to the new vm
for the user it looks like one operation,
but actually he asked is create vm and add nics to it...
this is why what is failing is just step 2, adding the nics

when creating vm from template with nics, its only one step,
the nics are created as part of the add command, so this fails the whole command
but if you would choose other template that has no nics, and add nics on the dialog, it would happen as well.

what i suggest is to improve the message to describe what has failed, so the user will not be confused:
instead of "Not enough MAC addresses left in MAC Address Pool."
user will get:
"Cannot Add VM. Not enough MAC addresses left in MAC Address Pool."
or
"Cannot Add NIC. Not enough MAC addresses left in MAC Address Pool."

Comment 6 Michael Burman 2015-09-09 13:01:37 UTC
Verified on - 3.6.0-0.13.master.el6

In case of New VM based on blank template and not enough free MAC addresses we will get the next error message -->
"Cannot Add NIC. Not enough MAC addresses left in MAC Address Pool."
VM will be created. NIcs will be created according to free MACs left in the pool.

In case of New VM based on template with nics and not enough MAC addresses left we will get -->
"Cannot Add VM. Not enough MAC addresses left in MAC Address Pool."
VM won't be created. Operation canceled.


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