Bug 1330012

Summary: webUI raises error for "operatting system" tab on submitting the "new host" form for first time
Product: Red Hat Satellite Reporter: Sachin Ghai <sghai>
Component: Content ManagementAssignee: Partha Aji <paji>
Status: CLOSED ERRATA QA Contact: Sachin Ghai <sghai>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, ehelms, mmccune, sghai, sthirugn
Target Milestone: UnspecifiedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/14802
Whiteboard:
Fixed In Version: rubygem-katello-3.0.0.24-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:42:42 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:
Attachments:
Description Flags
webUI raises error for "operatting system" tab on submitting the "new host" form for first time even when all entities are properly associated. none

Description Sachin Ghai 2016-04-25 09:46:29 UTC
Created attachment 1150336 [details]
webUI raises error for "operatting system" tab on submitting the "new host" form for first time even when all entities are properly associated.

Description of problem:
I was trying to provision a new host and as soon as I submitted the new host form, webUI highlighted "operating system" tab with 'red' border but no error on webUI. However, production.log says:

] [I] Failed to save: Medium can't be blank

Please note that media was associated. Please see the screenshot.

Also, above should be an error statement not "Info".


==> /var/log/foreman/production.log <==
2016-04-25 05:32:37 [app] [I] Started POST "/hosts" for 10.65.193.53 at 2016-04-25 05:32:37 -0400
2016-04-25 05:32:37 [app] [I] Processing by HostsController#create as */*
2016-04-25 05:32:37 [app] [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"8vCPyxpVczdumKXL5KNmK7Af1jYtwSEaunQpWzkXNW0=", "host"=>{"name"=>"rhel7", "organization_id"=>"1", "location_id"=>"2", "hostgroup_id"=>"", "compute_resource_id"=>"1", "compute_profile_id"=>"4", "content_facet_attributes"=>{"lifecycle_environment_id"=>"1", "content_view_id"=>"2", "id"=>""}, "environment_id"=>"1", "content_source_id"=>"1", "puppet_ca_proxy_id"=>"1", "puppet_proxy_id"=>"1", "puppetclass_ids"=>[""], "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"rhel7", "domain_id"=>"1", "subnet_id"=>"1", "ip"=>"192.168.100.14", "managed"=>"1", "primary"=>"1", "provision"=>"1", "execution"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>"", "compute_attributes"=>{"type"=>"network", "network"=>"foreman", "bridge"=>"enp0s29u1u1u5", "model"=>"virtio"}}}, "compute_attributes"=>{"cpus"=>"1", "memory"=>"1073741824", "start"=>"1", "volumes_attributes"=>{"0"=>{"_delete"=>"", "pool_name"=>"default", "capacity"=>"10G", "allocation"=>"0G", "format_type"=>"raw"}}}, "architecture_id"=>"1", "operatingsystem_id"=>"2", "provision_method"=>"build", "build"=>"1", "medium_id"=>"", "ptable_id"=>"61", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"3-Users", "enabled"=>"1", "model_id"=>"", "comment"=>"", "overwrite"=>"false"}, "capabilities"=>"build image", "provider"=>"Libvirt", "media_selector"=>"synced_content", "hostgroup"=>{"kickstart_repository_id"=>"13"}, "bare_metal_capabilities"=>"build"}
2016-04-25 05:32:37 [app] [I] Failed to save: Medium can't be blank
2016-04-25 05:32:37 [app] [I]   Rendered hosts/_progress.html.erb (0.3ms)
2016-04-25 05:32:37 [app] [I]   Rendered puppetclasses/_selectedClasses.html.erb (0.0ms)
2016-04-25 05:32:37 [app] [I]   Rendered puppetclasses/_classes_in_groups.html.erb (0.0ms)
2016-04-25 05:32:37 [app] [I]   Rendered puppetclasses/_classes.html.erb (0.1ms)
2016-04-25 05:32:37 [app] [I]   Rendered puppetclasses/_class_selection.html.erb (8.4ms)
2016-04-25 05:32:37 [app] [I]   Rendered nic/_base_form.html.erb (19.7ms)
2016-04-25 05:32:37 [app] [I]   Rendered nic/_virtual_form.html.erb (1.2ms)
2016-04-25 05:32:37 [app] [I]   Rendered compute_resources_vms/form/libvirt/_network.html.erb (19.9ms)
2016-04-25 05:32:37 [app] [I]   Rendered nic/_provider_specific_form.html.erb (20.4ms)
2016-04-25 05:32:37 [app] [I]   Rendered nic/manageds/_managed.html.erb (42.8ms)
2016-04-25 05:32:37 [app] [I]   Rendered nic/_base_form.html.erb (51.1ms)
2016-04-25 05:32:37 [app] [I]   Rendered nic/_virtual_form.html.erb (1.3ms)
2016-04-25 05:32:37 [app] [I]   Rendered compute_resources_vms/form/libvirt/_network.html.erb (19.9ms)
2016-04-25 05:32:37 [app] [I]   Rendered nic/_provider_specific_form.html.erb (20.4ms)
2016-04-25 05:32:37 [app] [I]   Rendered nic/manageds/_managed.html.erb (74.4ms)
2016-04-25 05:32:37 [app] [I]   Rendered hosts/_interfaces.html.erb (119.2ms)
2016-04-25 05:32:37 [app] [I]   Rendered compute_resources_vms/form/libvirt/_base.html.erb (13.9ms)
2016-04-25 05:32:37 [app] [I]   Rendered compute_resources_vms/form/libvirt/_volume.html.erb (3.3ms)
2016-04-25 05:32:37 [app] [I]   Rendered compute_resources_vms/form/libvirt/_volume.html.erb (3.3ms)
2016-04-25 05:32:37 [app] [I]   Rendered compute_resources_vms/form/_volumes.html.erb (8.9ms)
2016-04-25 05:32:37 [app] [I]   Rendered hosts/_compute_detail.html.erb (23.4ms)
2016-04-25 05:32:37 [app] [I]   Rendered hosts/_compute.html.erb (30.6ms)
2016-04-25 05:32:37 [app] [I]   Rendered common/os_selection/_architecture.html.erb (3.6ms)
2016-04-25 05:32:37 [app] [I]   Rendered common/os_selection/_operatingsystem.html.erb (71.6ms)
2016-04-25 05:32:37 [app] [I]   Rendered hosts/provision_method/build/_form.html.erb (72.9ms)
2016-04-25 05:32:37 [app] [I]   Rendered hosts/provision_method/image/_form.html.erb (0.2ms)
2016-04-25 05:32:37 [app] [I]   Rendered hosts/_operating_system.html.erb (80.6ms)
2016-04-25 05:32:37 [app] [I]   Rendered hosts/_unattended.html.erb (113.1ms)
2016-04-25 05:32:37 [app] [I]   Rendered puppetclasses/_class_parameters.html.erb (0.0ms)
2016-04-25 05:32:37 [app] [I]   Rendered puppetclasses/_classes_parameters.html.erb (5.0ms)
2016-04-25 05:32:37 [app] [I]   Rendered common_parameters/_inherited_parameters.html.erb (0.3ms)
2016-04-25 05:32:37 [app] [I]   Rendered common_parameters/_parameter.html.erb (1.7ms)
2016-04-25 05:32:37 [app] [I]   Rendered common_parameters/_parameters.html.erb (3.5ms)
2016-04-25 05:32:37 [app] [I]   Rendered hosts/_form.html.erb (321.4ms)
2016-04-25 05:32:37 [app] [I]   Rendered hosts/new.html.erb within layouts/application (322.1ms)
2016-04-25 05:32:37 [app] [I]   Rendered layouts/_application_content.html.erb (0.8ms)
2016-04-25 05:32:37 [app] [I] Deface: [WARNING] No :original defined for 'theme_css', you should change its definition to include:
 |  :original => '9f26415985aeb5438b8efcaf9078980451df5ff7' 
2016-04-25 05:32:37 [app] [I] Deface: [WARNING] No :original defined for 'remove foreman name from topbar', you should change its definition to include:
 |  :original => '6f86bcbd36e017373b168cc34f62c6deb016bb55' 
2016-04-25 05:32:37 [app] [I] Deface: [WARNING] No :original defined for 'add link to home', you should change its definition to include:
 |  :original => '7c247aee58a81a4e49096e83b6a14b07ec780462' 
2016-04-25 05:32:37 [app] [I]   Rendered home/_submenu.html.erb (1.7ms)
2016-04-25 05:32:37 [app] [I]   Rendered home/_user_dropdown.html.erb (1.5ms)
2016-04-25 05:32:37 [app] [I] Read fragment views/tabs_and_title_records-3 (0.1ms)
2016-04-25 05:32:37 [app] [I]   Rendered home/_topbar.html.erb (8.0ms)
2016-04-25 05:32:37 [app] [I]   Rendered layouts/base.html.erb (17.1ms)
2016-04-25 05:32:37 [app] [I] Completed 200 OK in 558ms (Views: 332.3ms | ActiveRecord: 33.8ms)

if you re-associate the media, then provisioning works fine.

Version-Release number of selected component (if applicable):
sat6.2 beta snap9.2

How reproducible:


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

Actual results:
webUI raises error for "operatting system" tab on submitting the "new host" form for first time even when all entities are properly associated.

Expected results:
1. UI should n't raise any error when media is properly associated.
2. In case of error, error should be thrown on webUI
3. error in production.log shouldn't be a info statement. It should be an error log

] [I] Failed to save: Medium can't be blank


Additional info:
on re-submitting the same form again works, but not for first time.

Comment 1 Sachin Ghai 2016-04-25 09:47:47 UTC
Setting blocker ? flag, as its a usability issue.

Comment 6 Partha Aji 2016-04-25 17:55:19 UTC
Created redmine issue http://projects.theforeman.org/issues/14802 from this bug

Comment 7 Bryan Kearney 2016-04-25 18:11:35 UTC
Upstream bug component is Content Management

Comment 9 sthirugn@redhat.com 2016-04-27 02:40:12 UTC
Verified using the RCM rhel 7 build from Comment 8.

New host creation doesn't error on Operating System tab anymore.  Screencast attached.

Comment 11 sthirugn@redhat.com 2016-04-27 02:50:53 UTC
Note that I hit https://bugzilla.redhat.com/show_bug.cgi?id=1329146 when verifying this bug.

Comment 12 Sachin Ghai 2016-04-27 09:47:55 UTC
Verified sat6.2 beta snap9.3

Tried following scenarios:

1) created a new host without hostgroup association and selected "synced contents" and host was successfully provisioned.

2) created a new host without hostgroup association and selected "All media" and host was successfully provisioned.

3) created a new host with hostgroup when associated CV includes ostree contents then webUI throws error: Atomic Media does not belong to RedHat 7.2 operating system

The original issue has been fixed. So filed another issue for the error mentioned in 3).

https://bugzilla.redhat.com/show_bug.cgi?id=1330869

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