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
Creating a new Pool fails if 'Auto select target' check box is enabled and th...
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ovirt-4.1.5
: 4.1.5
Assigned To: Sharon Gratch
Nisim Simsolo
: Regression
Depends On:
Blocks: 1415559
  Show dependency treegraph
Reported: 2017-07-06 11:51 EDT by Sharon Gratch
Modified: 2017-08-23 04:00 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-08-23 04:00:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Virt
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑4.1+
rule-engine: blocker+

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 79286 master MERGED core: set new Pool's images format to COW for 'auto select target' 2017-07-16 02:53 EDT
oVirt gerrit 79599 ovirt-engine-4.1 MERGED core: set new Pool's images format to COW for 'auto select target' 2017-07-24 03:33 EDT

  None (edit)
Description Sharon Gratch 2017-07-06 11:51:17 EDT
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:

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 11:56:13 EDT
I have a patch ready for master branch for fixing this bug
Comment 2 Tomas Jelinek 2017-07-12 02:37:22 EDT
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 02:37:26 EDT
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 06:34:21 EDT
can we set Target Milestone to 4.1.5 (since a patch for master was merged already)?
Comment 5 Nisim Simsolo 2017-08-17 09:05:43 EDT
Verification builds:

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