Description of problem:
After creating a host from the Satellite webui under hosts > all hosts with 1 primary interface set. If the profile is saved without a primary interface, the host profile will not allow you to save any changes to the profile or select a new primary interface. Error given in the webui:
Oops, we're sorry but something went wrong Host::Base#name= delegated to primary_interface.name=, but primary_interface is nil: #<Host::Managed id: 29, name: "test46", last_compile: nil, last_report: nil, updated_at: "2016-10-14 12:43:19", created_at: "2016-10-14 12:42:41", root_pass: "$5$Gccv5/7h$9AxSRhnUoqRY5rrZBcbw4spU0MvDSn7O1EZYj4...", architecture_id: 1, operatingsystem_id: 2, environment_id: 2, ptable_id: 61, medium_id: nil, build: true, comment: "", disk: "", installed_at: nil, model_id: nil, hostgroup_id: 2, owner_id: 3, owner_type: "User", enabled: true, puppet_ca_proxy_id: 1, managed: true, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: nil, puppet_proxy_id: 1, certname: nil, image_id: nil, organization_id: 1, location_id: 2, type: "Host::Managed", otp: "bC,DdAHGlZqk", realm_id: 1, compute_profile_id: 4, provision_method: "build", content_source_id: 1, grub_pass: "$5$Gccv5/7h$9AxSRhnUoqRY5rrZBcbw4spU0MvDSn7O1EZYj4...", content_view_id: 1, lifecycle_environment_id: 1, global_status: 0, lookup_value_matcher: "fqdn=test46.libvirtnode1.prov", discovery_rule_id: nil, openscap_proxy_id: nil>
Version-Release number of selected component (if applicable):
Satellite 6.2.2.1
How reproducible:
Every time
Steps to Reproduce:
1. Create host profile with primary interface with any number of NICs, submit
2. Select newly built host, edit, interface tab, edit nic, and remove primary check from the check box, click ok, and submit
3. Perform the same steps as step 2 except try to add one of the NICs as a primary, results in the error from above.
Actual results:
Oops, we're sorry but something went wrong Host::Base#name= delegated to primary_interface.name=, but primary_interface is nil: #<Host::Managed id: 29, name: "test46", last_compile: nil, last_report: nil, updated_at: "2016-10-14 12:43:19", created_at: "2016-10-14 12:42:41", root_pass: "$5$Gccv5/7h$9AxSRhnUoqRY5rrZBcbw4spU0MvDSn7O1EZYj4...", architecture_id: 1, operatingsystem_id: 2, environment_id: 2, ptable_id: 61, medium_id: nil, build: true, comment: "", disk: "", installed_at: nil, model_id: nil, hostgroup_id: 2, owner_id: 3, owner_type: "User", enabled: true, puppet_ca_proxy_id: 1, managed: true, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: nil, puppet_proxy_id: 1, certname: nil, image_id: nil, organization_id: 1, location_id: 2, type: "Host::Managed", otp: "bC,DdAHGlZqk", realm_id: 1, compute_profile_id: 4, provision_method: "build", content_source_id: 1, grub_pass: "$5$Gccv5/7h$9AxSRhnUoqRY5rrZBcbw4spU0MvDSn7O1EZYj4...", content_view_id: 1, lifecycle_environment_id: 1, global_status: 0, lookup_value_matcher: "fqdn=test46.libvirtnode1.prov", discovery_rule_id: nil, openscap_proxy_id: nil>
Expected results:
Either, never be allowed to leave the profile with out having set a primary NIC
or
Allow to set primary NIC after removing all primarys
Additional info:
Without primary NIC being set, the "kickstart_networking_setup" template does not seem to render for review from the host page of the webui.
Comment 1Marcelo Moreira de Mello
2016-10-14 15:34:34 UTC