Bug 1369637

Summary: bootstrap.py script fails with "interfaces.name": "is invalid", "interfaces.ip": "can't be blank"...
Product: Red Hat Satellite Reporter: Marcelo Giles <mgiles>
Component: BootstrapAssignee: Rich Jerrido <rjerrido>
Status: CLOSED DEFERRED QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.0CC: bbuckingham, bkearney, jcallaha, oshtaier
Target Milestone: UnspecifiedKeywords: Triaged
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: 2017-04-10 20:42:30 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:

Description Marcelo Giles 2016-08-24 03:49:54 UTC
Description of problem:
Running bootstrap.py to register an existing RHEL6 host fails with the following error:

Error: The following error occured while talking to the API:
url: https://satellite.example.com:8443/api/v2/hosts/
code: 422
data: {
  "host": {
    "managed": "true",
    "name": "sec_test",
    "hostgroup_id": 1,
    "organization_id": 1,
    "mac": "00:50:56:95:67:67",
    "architecture_id": 1,
    "location_id": 3,
    "domain_id": 1
  }
}
error: {
  "error": {
    "errors": {
      "interfaces.name": [
        "is invalid"
      ],
      "interfaces.ip": [
        "can't be blank"
      ],
      "name": [
        "is invalid"
      ]
    },
    "id": null,
    "full_messages": [
      "Ip can't be blank",
      "Name is invalid",
      "Name is invalid"
    ]
  }
}

Version-Release number of selected component (if applicable):
katello-client-bootstrap-1.1.0-2.el7sat.noarch
satellite-6.2.1-1.2.el7sat.noarch

How reproducible:
Always

Additional info:
Also tried the script at https://github.com/Katello/katello-client-bootstrap. This one fails with the following error:

FATAL Error - local variable 'e' referenced before assignment

Comment 1 Marcelo Giles 2016-08-24 15:26:44 UTC
Using a suggestion from a comment in https://github.com/Katello/katello-client-bootstrap, I added "--unmanaged" to the options and that seems to work. The client registers to the Satellite, installs katello and puppet, etc. Not sure if there is any functionality missing by using this option.

Comment 3 Rich Jerrido 2016-10-03 11:33:46 UTC
What were the specs of this host? (output from subscription-manager facts & facter would be useful here as a reproducer)

Comment 4 Marcelo Giles 2016-10-07 21:43:02 UTC
Sorry, no longer have access to this customer's systems to retry. Workaround "--unmanaged" worked fine, though.

Thanks

Comment 5 Bryan Kearney 2017-04-10 20:42:30 UTC
I am closing this out per comment 4.