Bug 1468301 - Creating a new Pool fails if 'Auto select target' check box is enabled and the created Pool is based on a Template with at least one disk
Summary: Creating a new Pool fails if 'Auto select target' check box is enabled and th...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ovirt-4.1.5
: 4.1.5
Assignee: Sharon Gratch
QA Contact: Nisim Simsolo
URL:
Whiteboard:
Depends On:
Blocks: 1415559
TreeView+ depends on / blocked
 
Reported: 2017-07-06 15:51 UTC by Sharon Gratch
Modified: 2017-08-23 08:00 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-23 08:00:54 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.1+
rule-engine: blocker+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 79286 0 master MERGED core: set new Pool's images format to COW for 'auto select target' 2017-07-16 06:53:09 UTC
oVirt gerrit 79599 0 ovirt-engine-4.1 MERGED core: set new Pool's images format to COW for 'auto select target' 2017-07-24 07:33:50 UTC

Description Sharon Gratch 2017-07-06 15:51:17 UTC
Description of problem:
Trying to create new Pool based on a Template with at least one existed disk and checking the 'Auto select target' check box (in 'Resource Allocation' side tab), causes the whole pool creation to fail.
(this check box is used for dynamically allocating the disks among SDs - please see  bug 1081536 for feature details).

According to feature bug 1081536, this was tested on 4.1.1 and therefore it is a regression.

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

How reproducible:
100%

Steps to Reproduce:
1.Open a new Pool dialog
2.Select a Template with at least one existed disk.
3. Go to 'Resource Allocation' side tab and check the 'Auto select target' check box.

Actual results:
The Pool creation fails in async call to addVMCommand because it tries to create Pool's VMs with images of RAW volume type instead of COW. 

The following WARN appears in engine.log:
"Validation of action 'AddVm' failed for user admin@internal-authz. Reasons: VAR__ACTION__ADD,VAR__TYPE__VM,ACTION_TYPE_FAILED_THIN_TEMPLATE_DISKS_SHOULD_ONLY_BE_COW 

ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-6-thread-13) [5d1908ac-4b19-4322-8632-91494c42
3037] EVENT_ID: USER_ADD_VM_POOL_WITH_VMS_FAILED(303), Failed to create VM Pool"

Expected results:
Pool creation should succeed. 

Additional info:
The Bug is because in case the 'Auto select target' is checked, we copy the Pool's template images as is in CommonVmPoolCommand (and in case they are in RAW format, they stay in that format). The fix should override the format to COW in Backend - the same as done in Frontend if 'Auto select target' check box is not set.

Comment 1 Sharon Gratch 2017-07-06 15:56:13 UTC
I have a patch ready for master branch for fixing this bug

Comment 2 Tomas Jelinek 2017-07-12 06:37:22 UTC
patch seems to be trivial - targeting 4.1.6

@Meital: any chance to enrich the automation of pool testing to make sure also this flow is tested?

Comment 3 Red Hat Bugzilla Rules Engine 2017-07-12 06:37:26 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 4 Sharon Gratch 2017-07-16 10:34:21 UTC
Tomas, 
can we set Target Milestone to 4.1.5 (since a patch for master was merged already)?

Comment 5 Nisim Simsolo 2017-08-17 13:05:43 UTC
Verification builds:
ovirt-engine-4.1.5.2-0.1.el7
libvirt-client-3.2.0-14.el7_4.2.x86_64
vdsm-4.19.28-1.el7ev.x86_64
qemu-kvm-rhev-2.9.0-16.el7_4.3.x86_64
sanlock-3.5.0-1.el7.x86_64


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