Problem
Commit 4ef4632 ("use shorter internal hostnames for the pulp containers")
changed the Foreman container hostname from {{ ansible_facts['fqdn'] }} to
{{ ansible_facts['hostname'] }}.local for all containers, including the
Foreman application containers.
Foreman derives the unattended_url setting from the container's internal
hostname. After this change, unattended_url becomes http://satellite.local
instead of https://satellite.example.com, causing the Host initial configuration template to generate callbacks to an unreachable hostname.
Symptoms
All hosts register successfully via subscription-manager (POST /rhsm/consumers
works), but fail at the host init phase with:
ERROR: Host [hostname] configured, but failed to report status to Foreman.
The generated /root/registration_host_init.sh contains:
curl https://satellite.local/unattended/built?token=...
which is unreachable from external hosts.
Impact
- All host registrations using the global registration template fail
at the host init callback phase
- CI does not catch this because it does not test the full registration
flow with host init template execution
- Workaround:
hammer settings set --name unattended_url --value "https://$(hostname -f)"
Problem
Commit 4ef4632 ("use shorter internal hostnames for the pulp containers")
changed the Foreman container hostname from
{{ ansible_facts['fqdn'] }}to{{ ansible_facts['hostname'] }}.localfor all containers, including theForeman application containers.
Foreman derives the
unattended_urlsetting from the container's internalhostname. After this change,
unattended_urlbecomeshttp://satellite.localinstead of
https://satellite.example.com, causing theHost initial configurationtemplate to generate callbacks to an unreachable hostname.Symptoms
All hosts register successfully via subscription-manager (POST /rhsm/consumers
works), but fail at the host init phase with:
The generated
/root/registration_host_init.shcontains:which is unreachable from external hosts.
Impact
at the host init callback phase
flow with host init template execution
hammer settings set --name unattended_url --value "https://$(hostname -f)"