bootstap.py issue

Latest response

Hi,

Running Sat 6.2.1 and I am using the bootstrap to register clients.

*Server name info has been removed and replaced with generic info for this posting.

Using this method on RHEL 5.11 :

./bootstrap.py -l user -p xxxx -s satserver.example.com -o 'org' -L 'thislocation' -g Test -a 'akey' --skip-puppet --legacy-login=user --legacy-password=xxx --legacy-purge -R

I get the following error:

Retrieving http://satserver.example.com/pub/katello-ca-consumer-latest.noarch.rpm
Preparing... ##################################################
katello-ca-consumer.satserver.##################################################
[SUCCESS], [2016-09-13 13:25:23], [rpm -Uvh http://satserver.example.com/pub/katello-ca-consumer-latest.noarch.rpm], completed successfully.

[RUNNING], [2016-09-13 13:25:24], [Calling Foreman API to create a host entry associated with the group, org & location]
Error: The following error occured while talking to the API:
url: https://satserver.example.com:443/api/v2/hosts/
code: 201
data: {
"host": {
"managed": "true",
"name": "testclient",
"hostgroup_id": 1,
"organization_id": 1,
"mac": "xxx",
"architecture_id": 1,
"location_id": 2,
"domain_id": 1
}
}
error: {
"comment": null,
"build_status": 0,
"environment_id": null,
"managed": true,
"permissions": {
"provision_discovered_hosts": true,
"edit_hosts": true,
"power_hosts": true,
"submit_discovered_hosts": true,
"ipmi_boot": true,
"console_hosts": true,
"puppetrun_hosts": true,
"view_discovered_hosts": true,
"auto_provision_discovered_hosts": true,
"destroy_hosts": true,
"edit_discovered_hosts": true,
"create_hosts": true,
"destroy_discovered_hosts": true,
"view_hosts": true,
"build_hosts": true
},
"model_id": null,
"ip": null,
"provision_method": "build",
"last_compile": null,
"updated_at": "2016-09-13 18:25:25 UTC",
"realm_name": null,
"compute_resource_id": null,
"puppet_status": 0,
"sp_mac": null,
"operatingsystem_name": "RedHat 6.8",
"all_puppetclasses": [],
"id": 48,
"disk": null,
"location_id": 2,
"domain_id": 1,
"build_status_label": "Installed",
"organization_name": "Default",
"location_name": "Default",
"ptable_id": null,
"parameters": [],
"subnet_id": null,
"sp_name": null,
"environment_name": null,
"architecture_name": "x86_64",
"domain_name": "domain.domain",
"capabilities": [
"build"
],
"name": "testclient.example.com",
"image_id": null,
"global_status": 0,
"architecture_id": 1,
"build": false,
"hostgroup_title": "Test",
"subnet_name": null,
"sp_ip": null,
"model_name": null,
"global_status_label": "OK",
"owner_id": 3,
"operatingsystem_id": 3,
"sp_subnet_id": null,
"config_groups": [],
"compute_profile_name": null,
"interfaces": [
{
"name": "testclient.example.com",
"ip": null,
"primary": true,
"mac": "xxx",
"type": "interface",
"identifier": null,
"provision": true,
"id": 61
}
],
"certname": "testclient.example.com",
"image_name": null,
"organization_id": 1,
"image_file": "",
"mac": "xxx",
"puppet_ca_proxy_id": null,
"puppetclasses": [],
"last_report": null,
"medium_name": null,
"puppet_proxy_id": null,
"uuid": null,
"ptable_name": null,
"medium_id": null,
"compute_resource_name": null,
"created_at": "2016-09-13 18:25:25 UTC",
"enabled": true,
"hostgroup_id": 1,
"compute_profile_id": null,
"hostgroup_name": "Test",
"use_image": null,
"all_parameters": [],
"owner_type": "User",
"realm_id": null,
"installed_at": null
}

I see in the output it shows:
"operatingsystem_name": "RedHat 6.8"

However, I'm not sure why that would show up, this is a 5.11 system. I do have the server 5 repo and Sat tools for RHEL 5 repo synced on my sat server.

Also, I am using the switch to exclude puppet. However it seems to still install the puppet agent package. I have confirmed this on RHEL 6 systems.

This is from a RHEL 6 system using the same bootstap options as posted above:

[SUCCESS], [2016-09-13 13:24:17], [/usr/bin/puppet agent --test --noop --tags no_such_tag --waitforcert 10], completed successfully.

[RUNNING], [2016-09-13 13:24:17], [/sbin/service puppet restart]
Stopping puppet agent: [ OK ]
Starting puppet agent: [ OK ]
[SUCCESS], [2016-09-13 13:24:18], [/sbin/service puppet restart], completed successfully.

The above bootstap command works fine on RHEL 6 systems, minus the puppet agent getting installed..

Responses