Bug 1344288

Summary: [upgrade] Host creation failed with error: Medium can't be blank even when media was correctly associated
Product: Red Hat Satellite Reporter: Sachin Ghai <sghai>
Component: UpgradesAssignee: Marek Hulan <mhulan>
Status: CLOSED ERRATA QA Contact: Sachin Ghai <sghai>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, paji, sghai
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-katello-3.0.0.50-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:26:23 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: 1335807    
Attachments:
Description Flags
media selection before submitting the host create form
none
media selection after submitting the host create form none

Description Sachin Ghai 2016-06-09 10:43:56 UTC
Description of problem: I was trying to create new host on upgraded sat6.2 from sat6.1.9 on rhel7 and host creation failed with error:

2016-06-09 06:31:52 [app] [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"/sGd0w6atFzcfKxqi7YF/VQDzF/RzgTiJKnkKc8U3CI=", "host"=>{"name"=>"postupgrade", "organization_id"=>"1", "location_id"=>"2", "hostgroup_id"=>"9", "compute_resource_id"=>"2", "content_facet_attributes"=>{"lifecycle_environment_id"=>"2", "content_view_id"=>"2", "id"=>"", "kickstart_repository_id"=>"47"}, "environment_id"=>"3", "content_source_id"=>"1", "openscap_proxy_id"=>"", "puppetclass_ids"=>[""], "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"postupgrade", "domain_id"=>"1", "subnet_id"=>"14", "ip"=>"10.8.119.115", "managed"=>"1", "primary"=>"1", "provision"=>"1", "execution"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>"", "compute_attributes"=>{"name"=>"nic1", "network"=>"6b5c3ecd-6738-43eb-944a-9573b9d12937"}}}, "compute_attributes"=>{"cluster"=>"00000001-0001-0001-0001-00000000022f", "template"=>"00000000-0000-0000-0000-000000000000", "cores"=>"1", "memory"=>"1073741824", "start"=>"1", "volumes_attributes"=>{"0"=>{"_delete"=>"", "size_gb"=>"10", "storage_domain"=>"af918214-e6b2-4a01-a960-73dbc06a7073", "id"=>"", "preallocate"=>"0"}}}, "architecture_id"=>"1", "operatingsystem_id"=>"1", "provision_method"=>"build", "build"=>"1", "ptable_id"=>"63", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"3-Users", "enabled"=>"1", "comment"=>"", "overwrite"=>"false"}, "capabilities"=>"build image", "provider"=>"Ovirt", "media_selector"=>"synced_content", "bare_metal_capabilities"=>"build"}
2016-06-09 06:31:53 [app] [I] Failed to save: Medium can't be blank
2


Please note that I choose "synced content" from operating system -> media selection.

But when I submitted the form, "All media" option auto selected and that shows blank media.

Version-Release number of selected component (if applicable):
upgraded sat6.2 from sat6.1.9 on rhel7 

How reproducible:


Steps to Reproduce:
1. create a new host
2.
3.

Actual results:
2016-06-09 06:31:53 [app] [I] Failed to save: Medium can't be blank
2


Expected results:
host should be created successfully

Additional info:

Comment 1 Sachin Ghai 2016-06-09 10:44:34 UTC
Created attachment 1166237 [details]
media selection before submitting the host create form

Comment 2 Sachin Ghai 2016-06-09 10:45:59 UTC
Created attachment 1166238 [details]
media selection after submitting the host create form

Comment 4 Brad Buckingham 2016-06-09 19:54:25 UTC
Sachin, do you happen to see this behavior only on an upgraded Satellite or also on a new install?

Also, I assume this is on SNAP 15.  Is that correct? (It should not matter; however, wanted to confirm).

Comment 6 Sachin Ghai 2016-06-10 10:47:12 UTC
@Brad: I see this issue on upgraded satellite ( from 6.1.9 -> 6.2 GA snap15). I'll see if I can reproduce on fresh setup

Comment 7 Sachin Ghai 2016-06-10 10:53:47 UTC
@Partha: on satellite rhel7Server contents synced from CDN along with kickstart repo of 7.2. 

Yes, I associated hostgroup while creating new host.

Comment 8 Sachin Ghai 2016-06-10 11:27:41 UTC
Not reproducible with upgrade using snap15.1. I'll keep this open for few more days, if not reproducible then close this out and removing blocker flag.

Comment 9 Marek Hulan 2016-06-13 12:36:32 UTC
Created redmine issue http://projects.theforeman.org/issues/15383 from this bug

Comment 10 Bryan Kearney 2016-06-16 14:16:11 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/15383 has been closed

Comment 11 Sachin Ghai 2016-06-27 12:33:17 UTC
Verified with sat6.2 GA snap17.

I tried copule of scenarios to reproduce this bz:

1) tried to provision a rhel7 host with custom rhel7 contents with and w/o hostgroup
2) tried to provision a rhel7 host with redhat rhel7 contens w/ and w/o hostgroup

3. tried to provision a rhel7 host by amnually associating os/media/partition_table when these were not associated with hostgroup.

The reported issue is not reproducible on fresh install. Going to see same on upgraded system.

Comment 12 Sachin Ghai 2016-06-27 12:41:53 UTC
Okay, I tested on upgraded setup too where hostgroup doesn't set os/media and user sets them manually and still issue is not reproducible. So moving this to verified.

Comment 13 Bryan Kearney 2016-07-27 11:26:23 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-2016:1501