Bug 1384894

Summary: Setting no primary interface breaks host
Product: Red Hat Satellite Reporter: Sean O'Keeffe <sokeeffe>
Component: ProvisioningAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, inecas
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-14 17:32: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:

Description Sean O'Keeffe 2016-10-14 10:45:27 UTC
Description of problem:
After creating a new 'Managed' host, if you untick the primary interface and hit submit this breaks the hosts and anything you do to it after including trying and set a primary interface produces a error.

I've also tested on foreman-nightly and get the same error.

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


How reproducible:
100%

Steps to Reproduce:
1. Create 'Managed' host
2. Make no interface Primary
3. Hit Submit
4. anything you now do to the host will result in a error. e.g try and edit and make any interface primary again and it will error. Same thing if you try and clone it.

Actual results:
Module::DelegationError
Host::Base#name= delegated to primary_interface.name=, but primary_interface is nil: #<Host::Managed id: 1, name: "earl-heroman", last_compile: nil, last_report: nil, updated_at: "2016-10-14 10:44:17", created_at: "2016-10-14 10:44:04", root_pass: "$6$VPPU/1m3$Z3b30hZTT8pGLJsRLhlh1FjsKzvpR9dw0XHkBD...", architecture_id: 1, operatingsystem_id: 1, environment_id: nil, ptable_id: 80, medium_id: 1, build: true, comment: "", disk: "", installed_at: nil, model_id: nil, hostgroup_id: nil, owner_id: 3, owner_type: "User", enabled: true, puppet_ca_proxy_id: nil, managed: true, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: nil, puppet_proxy_id: nil, certname: nil, image_id: nil, organization_id: nil, location_id: nil, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: "build", grub_pass: "$6$VPPU/1m3$Z3b30hZTT8pGLJsRLhlh1FjsKzvpR9dw0XHkBD...", global_status: 0, lookup_value_matcher: "fqdn=earl-heroman.exmaple.com", pxe_loader: "">


Expected results:
To be able to set the primary interface.

Additional info:

Comment 1 Brad Buckingham 2016-10-14 17:32:16 UTC

*** This bug has been marked as a duplicate of bug 1384970 ***