[Satellite 6] - MAC address of host is changed making provisioning fail

Solution Unverified - Updated

Environment

  • Red Hat Satellite 6.0
  • Red Hat Satellite 6.1 Beta with host having 2 or more network interfaces

Issue

  • After puppet facts are uploaded to Satellite a MAC address for the host, which facts are being uploaded, is set to different value. This happens if the host has more than one interface. When rebuilding the host, it can lead to DHCP conflict errors like this
DHCP entry ([RestClient::Conflict]: 409 Conflict) for proxy https://$host:9090/dhcp/usr/share/foreman/lib/proxy_api/dhcp.rb:66:in `rescue in set'
/usr/share/foreman/lib/proxy_api/dhcp.rb:62:in `set'
/usr/share/foreman/lib/net/dhcp/record.rb:28:in `create'
/usr/share/foreman/app/models/concerns/orchestration/dhcp.rb:22:in `set_dhcp'

Rolling back due to a problem: [Create DHCP Settings for host	 9	 failed	 [#<Host::Managed id: 32, name: "$host", ip: "$ip", last_compile: "2015-05-22 05:24:40", last_freshcheck: nil, last_report: "2015-05-22 05:24:33", updated_at: "2015-05-22 05:24:44", source_file_id: nil, created_at: "2015-05-21 01:15:47", mac: "$mac", root_pass: "rootpass", serial: nil, puppet_status: 0, domain_id: 1, architecture_id: 1, operatingsystem_id: 2, environment_id: 5, subnet_id: 1, ptable_id: 11, medium_id: 7, build: false, comment: "", disk: "", installed_at: "2015-05-21 01:25:19", model_id: 2, hostgroup_id: 4, 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: "host", image_id: nil, organization_id: 3, location_id: 2, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: "build", content_source_id: 1>, :set_dhcp]]
Create DHCP reservation for $host-$mac/$ip
Failed to perform rollback on Remove DHCP Settings for $host - ERF12-6899 [ProxyAPI::ProxyException]: Unable to set DHCP entry ([RestClient::Conflict]: 409 Conflict) for proxy https://$host:9090/dhcp
Failed to save: Create DHCP Settings for $host task failed with the following error: ERF12-6899 [ProxyAPI::ProxyException]: Unable to set DHCP entry ([RestClient::Conflict]: 409 Conflict) for proxy https://$host:9090/dhcp, Failed to perform rollback on Remove DHCP Settings for $host - ERF12-6899 [ProxyAPI::ProxyException]: Unable to set DHCP entry ([RestClient::Conflict]: 409 Conflict) for proxy https://$host:9090/dhcp

Resolution

  • As a workaround user can disable updating IP and MAC address of primary interface. To do that, navigate to Administer -> Settings -> Provisioning and find a setting with name ignore_puppet_facts_for_provisioning. Change its value to true and restart the Satellite service (`katello-service restart').

An internal bugzilla is ongoing to fix this bug in Satellite 6.2:

This content is not included.Bug 1225500 - ERF12-6899 [ProxyAPI::ProxyException]: Unable to set DHCP entry ([RestClient::Conflict]: 409 Conflict) for proxy

For more KB articles/solutions related to Red Hat Satellite 6.x Provisioning Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x Provisioning related Issues

Root Cause

  • It is caused by updating the MAC address of host by puppet facts after host has been provisioned. Puppet facter uploads two facts - ipaddress and macadress that Satellite uses for updating the primary interface.

  • When rebuilding host, no DHCP reservation can be deleted (reservation exists for old MAC) and when it tries to create a new reservation it conflicts with the old one. Unfortunately facter do not set these values based on primary interface but it uses first interface in alphabetical order. Also if the first interface does not have IP set, it takes IP from different interface so the combination does not even have to be for the same interface.

SBR
Product(s)
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.