Bug 1467828 - Provisioned host automatically selects Blank template and has no storage
Provisioned host automatically selects Blank template and has no storage
Status: VERIFIED
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Compute Resources - RHEV (Show other bugs)
6.3.0
Unspecified Unspecified
medium Severity medium (vote)
: Beta
: --
Assigned To: orabin
Sanket Jagtap
: Regression, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-05 05:13 EDT by Sanket Jagtap
Modified: 2017-10-30 13:09 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Host created has no storage (38.92 KB, image/png)
2017-07-05 05:13 EDT, Sanket Jagtap
no flags Details
VM tab while creating the host (56.10 KB, image/png)
2017-07-05 05:14 EDT, Sanket Jagtap
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 20284 None None None 2017-07-12 05:15 EDT

  None (edit)
Description Sanket Jagtap 2017-07-05 05:13:28 EDT
Created attachment 1294518 [details]
Host created has no storage

Description of problem:


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

How reproducible:
Always

Steps to Reproduce:
1.Create a compute Profile, with all related options except template option(do not select it)
2.Create a Host using the same compute profile 
3.Go to the created host and check the VM tab
4.Blank template is selected, while host was provisioned

Actual results:
Selection of blank template ,overrides the storage config's from the compute resource
Host is provisioned with no storage

Expected results:
Blank template should not be selected
Host should be provisioned 

Additional info:
Comment 1 Sanket Jagtap 2017-07-05 05:14 EDT
Created attachment 1294519 [details]
VM tab while creating the host
Comment 3 orabin 2017-07-12 05:15:18 EDT
Created redmine issue http://projects.theforeman.org/issues/20284 from this bug
Comment 4 Ivan Necas 2017-07-12 11:46:02 EDT
We ware able to reproduce the issue this way:

1. when creating compute profile, first select the template (the storage volumes get populated), then unselect the template (the storage volumes
stay there and they are enabled).
2. save the compute profile
3. use it for provisioning

Results: no storage

Expected: the storage gets set

We were not able to reproduce the behaviour with the template being set even when
the it was not set in the compute profile.

Could you confirm it's possible the reproducer steps I've described are what you've seen as well. Additionally, could you share output of this API call
(update the ids of compute_resources and compute profiles accordingly)

  /api/compute_resources/1/compute_profiles/1
Comment 5 pm-sat@redhat.com 2017-07-14 04:14:52 EDT
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20284 has been resolved.
Comment 6 Sanket Jagtap 2017-08-09 10:32:53 EDT
I was able to reproduce this , with both the approaches from comment #1 and #4

Created using Comment #1
https://sat/api/compute_resources/2/compute_profiles/3 

{"created_at":"2017-08-07 21:57:04 +0530","updated_at":"2017-08-07 21:57:04 +0530","id":3,"name":"3-Large","compute_attributes":[{"id":2,"name":"1 Cores and 2 GB memory","compute_resource_id":2,"compute_resource_name":"rhevm1","provider_friendly_name":"RHEV","compute_profile_id":3,"compute_profile_name":"3-Large","vm_attrs":{"cluster":"00000001-0001-0001-0001-00000000022f","template":"","cores":"1","memory":"2147483648","interfaces_attributes":{"1502288635150":{"name":"nic1","network":"737353a9-dff8-44d7-bd64-de9c9edd6fda"}},"volumes_attributes":{"1502288655271":{"size_gb":"10","storage_domain":"69642628-4697-41c7-b9df-4f6791dd20c8","id":"","preallocate":"0","bootable":"true"}}}}]}

Created using Comment #4
https://sat/api/compute_resources/2/compute_profiles/2
{"created_at":"2017-08-07 21:57:04 +0530","updated_at":"2017-08-07 21:57:04 +0530","id":2,"name":"2-Medium","compute_attributes":[{"id":1,"name":"1 Cores and 1 GB memory","compute_resource_id":2,"compute_resource_name":"rhevm1","provider_friendly_name":"RHEV","compute_profile_id":2,"compute_profile_name":"2-Medium","vm_attrs":{"cluster":"00000001-0001-0001-0001-00000000022f","template":"","cores":"1","memory":"1073741824","interfaces_attributes":{"1502288289556":{"name":"nic1","network":"737353a9-dff8-44d7-bd64-de9c9edd6fda"}},"volumes_attributes":{"1502288299920":{"size_gb":"10","storage_domain":"69642628-4697-41c7-b9df-4f6791dd20c8","id":"","preallocate":"0","bootable":"true"}}}}]}
Comment 7 Sanket Jagtap 2017-10-24 15:41:13 EDT
Build : satellite 6.3.0 snap 21


Steps 
1. when creating compute profile, first select the template (the storage volumes get populated), then unselect the template (the storage volumes
stay there and they are enabled).
2. Removed the storage volumes
3. Added custom storage size
3. save the compute profile
4. use it for provisioning

Box was provisioned successfully


There is a no storage attached to created box  if, The same storage volumes are used as per step 1

"when creating compute profile, first select the template (the storage volumes get populated), then unselect the template (the storage volumes
stay there and they are enabled)."

Is this desired, are we supposed to delete the volume and add a new?
Comment 8 orabin 2017-10-29 02:18:33 EDT
If we unselect the template then the storage that was added for it should also get removed.
It used to keep it and enable it so selecting and unselecting would create more and more volumes.
Comment 12 Sanket Jagtap 2017-10-30 13:09:57 EDT
Marking this a verified.


Note: Be sure to remove storage volumes added due to selecting/unselecting templates.
See BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1498408

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