Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1202779

Summary: Creating a host without OS set gives undefined method `boot_filename' exception
Product: Red Hat Satellite Reporter: Lukas Zapletal <lzap>
Component: WebUIAssignee: Lukas Zapletal <lzap>
WebUI sub component: Foreman QA Contact: Sachin Ghai <sghai>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: bbuckingham, cwelton, jmontleo
Version: 6.1.0Keywords: Triaged
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/5701
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-12 05:30:16 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
screenshot from sanp4 c2
none
Creating a host without OS now raises "can't be blank" validation error none

Description Lukas Zapletal 2015-03-17 12:37:41 UTC
When no OS is assigned for host or host group, provisioning ends up with this weird error instead of nice one.

Fix was already delivered upstream (Foreman 1.8), we only need to cherry pick small patch in core.

Comment 1 Lukas Zapletal 2015-03-17 12:39:04 UTC
Jason, the patch in foreman core fixes this:

https://github.com/theforeman/foreman/pull/2120/files

Giving it a POST already, yeah, I am a bad boy!

Comment 6 Sachin Ghai 2015-05-15 12:08:52 UTC
Verified with sanp4 compose2.. Issue is reproducible

2015-05-15 16:58:20 [I] Processing by DiscoveredHostsController#update as */*
2015-05-15 16:58:20 [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"o5Vg3xdsjhXm5y3/xk0LOUA10jllWL4VZGl+9ABdwUo=", "host"=>{"name"=>"mac52540050266d", "hostgroup_id"=>"1", "environment_id"=>"3", "content_source_id"=>"2", "puppet_ca_proxy_id"=>"2", "puppet_proxy_id"=>"2", "puppetclass_ids"=>[""], "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "domain_id"=>"1", "realm_id"=>"", "mac"=>"52:54:00:50:26:6d", "subnet_id"=>"2", "ip"=>"192.168.110.33", "interfaces_attributes"=>{"new_interfaces"=>{"_destroy"=>"false", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"", "domain_id"=>"", "subnet_id"=>"", "ip"=>"", "managed"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>""}}, "architecture_id"=>"1", "operatingsystem_id"=>"", "build"=>"1", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"3-Users", "enabled"=>"1", "model_id"=>"2", "comment"=>"", "overwrite"=>"false"}, "hostgroup"=>{"lifecycle_environment_id"=>"2", "content_view_id"=>"2"}, "id"=>"mac52540050266d"}
2015-05-15 16:58:20 [W] Operation FAILED: undefined method `boot_filename' for nil:NilClass
2015-05-15 16:58:20 [I]   Rendered common/500.html.erb (7.0ms)
2015-05-15 16:58:20 [I] Completed 500 Internal Server Error in 321ms (Views: 8.0ms | ActiveRecord: 15.7ms)
2015-05-15 16:58:21 [I] Processing by DiscoveredHostsController#edit as */*
2

Comment 7 Sachin Ghai 2015-05-15 12:10:25 UTC
Created attachment 1025817 [details]
screenshot from sanp4 c2

Comment 9 Lukas Zapletal 2015-06-30 10:47:33 UTC
I am getting correct behavior (Can't be blank) now.

Comment 10 Sachin Ghai 2015-07-08 11:29:30 UTC
Verified with sat6.1.1 snap11 compose2.

creating a host without associating OS gives "Can't be blank".

Comment 11 Sachin Ghai 2015-07-08 11:31:36 UTC
Created attachment 1049823 [details]
Creating a host without OS now raises "can't be blank" validation error

Comment 13 errata-xmlrpc 2015-08-12 05:30:16 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/RHSA-2015:1592