Bug 1399102

Summary: Provisioning of template based vm from Sat6 to RHEV3.6 do not respect the Allocation Policy of the template
Product: Red Hat Satellite Reporter: Roman Bobek <rbobek>
Component: Compute Resources - RHEVAssignee: orabin
Status: CLOSED ERRATA QA Contact: Ranjan Kumar <rankumar>
Severity: high Docs Contact:
Priority: high    
Version: 6.2.4CC: ahumbe, aperotti, appraprv, bkearney, dconsoli, ekuric, inecas, jcallaha, ktordeur, mhulan, mmccune, orabin, pcreech, pmoravec, rankumar, rbobek
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-1.15.6.42-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1572289 (view as bug list) Environment:
Last Closed: 2018-06-19 20:17:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1541321, 1459226    

Description Roman Bobek 2016-11-28 09:48:51 UTC
Description of problem:
When provisioning template based vm from Satellite 6 (6.2.4) to RHEV 3.6, the provisioned machine do not respect the disk settings in the template. The disk in the template is set as Preallocated, but the provisioned machine has Thin Provisioned disk.

Version-Release number of selected component (if applicable):
Red Hat Satellite 6.2.4

How reproducible:
Always

Steps to Reproduce:
1. Create RHEV compute resource
2. Create a template on RHEV with Preallocated disk
3. Create a new Host, choose the correct template
4. On the Virtual Machine tab tick the Preallocated checkbox
5. Create the host and check the disk type in the RHEV-M (vm > Disks > Edit > Allocation Policy)
6. Now in Sat check Hosts > All Hosts > choose the host > Edit > Virtual Machine tab > the Preallocated checkbox is not checked anymore

Actual results:
The VM is provisioned with Thin Provisioned disk.

Expected results:
The VM should be provisioned with Preallocated disk.

Additional info:
This is probably a regression of:
https://bugzilla.redhat.com/show_bug.cgi?id=1286033
https://bugzilla.redhat.com/show_bug.cgi?id=1320313

Comment 10 orabin 2017-05-03 15:43:45 UTC
Can you please share how you created a preallocated disk on a RHEV template?

I tried with RHEV 3.6 by creating a template from a vm with a preallocated disk and the template was created with a thin provisioning disk.

With the disk in the template as thin, I was unable to create a vm (in RHEV) that turns the disk to preallocated, it remained thin provisioning.

Comment 11 Roman Bobek 2017-05-04 09:14:02 UTC
(In reply to orabin from comment #10)
> Can you please share how you created a preallocated disk on a RHEV template?
> 
> I tried with RHEV 3.6 by creating a template from a vm with a preallocated
> disk and the template was created with a thin provisioning disk.
> 
> With the disk in the template as thin, I was unable to create a vm (in RHEV)
> that turns the disk to preallocated, it remained thin provisioning.

Hello, 

I made the template via RHEV 3.6 GUI. I stopped the machine, clicked it with right mouse, choose 'Make template', set the name... and the template was created with Preallocated disk. I can share our environment, if needed.

-Roman

Comment 12 Satellite Program 2017-05-08 16:13:52 UTC
Upstream bug assigned to orabin

Comment 13 Satellite Program 2017-05-08 16:13:57 UTC
Upstream bug assigned to orabin

Comment 18 Ivan Necas 2017-11-02 11:05:20 UTC
*** Bug 1505974 has been marked as a duplicate of this bug. ***

Comment 19 Ivan Necas 2017-11-03 12:53:57 UTC
Progress update: after more investigation, we discovered that there was a change between RHEV 3.6 and 4.1, that made the patches not working against newer versions. The new patches are being worked on, see https://github.com/theforeman/foreman/pull/4512#issuecomment-341683342

Comment 30 Satellite Program 2018-02-20 09:18:25 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/10273 has been resolved.

Comment 35 Patrick Creech 2018-05-22 20:34:15 UTC
This failed to cherrypick downstream, Ori can you take a look?

Comment 45 errata-xmlrpc 2018-06-19 20:17:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:1950