"Linux host_init_config default" script not running after provisioning

Problem:

When creating, building, and provisioning a new RHEL 8.10 host, the Linux host_init_config default Provisioning Template is not applied. RHEL registration does not occur, Puppet installation/initial run does not occur, and Clevis/Tang enrollment does not occur. There don’t appear to be any logs related to this, e.g. 'Content-Type: text/plain' --data 'Host initial configuration failed, please see the registration log for more details.' from the curl command in the script (or if there are, I can’t find them). The host OS installs as expected.

Expected outcome:

After OS provisioning, the script runs and registers the system with RHEL, installs and runs Puppet, and enrolls the system with Tang.

Foreman and Proxy versions:

Foreman: 3.15.0
Foreman Proxy: 3.15.0

Foreman and Proxy plugin versions:

N/A

Distribution and version:

Ubuntu 22.04 LTS

Other relevant data:

We are using the default Linux host_init_config default Provisioning Template. I’ve set the following Global Parameters:

  • activation_key: string
  • disk_enc_tang_servers: array
  • enable-official-puppet8-repo: boolean (true)
  • puppet_server: string
  • subscription_manager: boolean (true)
  • subscription_manager_org: string

Also probably relevant - we have an internal CA that signed the cert for Foreman’s HTTPS traffic, but Puppet clients are using the self-signed certs.

The message you’re seeing “Host initial configuration failed, please see the registration log for more detail” comes from the host_init_config_default provisioning template. That means the template is being executed, but something inside it is failing.

Could you please share:

  • The full output of the registration command
  • The relevant Foreman logs for the registration request from /var/log/foreman/production.log
  • The contents of /root/registration_host_init.sh and its log output on the host (since the error usually points there)

This will help us pinpoint what part of the template is failing.