Migration: How to migrate hosts between Foreman servers?

Problem:

I have the following scenario:

Target Server:

Server A

Foreman + Katello version: 3.10 + 4.12

Origin servers:

Server B

Foreman + Katello version: 1.21.0 + 3.11.0
Host OS: RedHat 7.x, CentOS 6 and 7, Rocky Linux 8.x and 9.x, Fedora xx,

Server C

Foreman + Katello version: 3.5.2 + 4.7.4
OS Hosts: Rocky Linux 8.x and 9.x

We want to migrate all hosts from servers B and C to Server A. After migrating all hosts, we will deactivate servers B and C.

Expected outcome:

We intend to successfully migrate all hosts from Servers B and C to Server A.

Other relevant data:

I would like suggestions on how to carry out this migration quickly and safely.

Hi @eduardocortez3

Can you follow Registering a host in Managing Hosts? I believe using --force from action item 20 will ensure that the host registration process overwrites any existing certificates used by subscription-manager.

You can synchronize content from Foreman Server to Foreman Server: Configuring Inter-Server Synchronization (ISS) in Foreman in Managing Content.

Depending on the number of hosts and your environment, this looks like a big task. Maybe you would also like to have a look at Professional Services.

Running subscription-manager with --force may not work here, since force runs subscription-manager unregister which tries to contact the existing (old) Foreman.

If you run subscription-manager clean on all your hosts, and then register to the new Foreman the normal way without --force, this should work fine.

Looking in the documentation, you may be able to accomplish this via a before_registration snippet:

https://docs.theforeman.org/nightly/Managing_Hosts/index-katello.html#customizing-host-registration-by-using-snippets_managing-hosts

1 Like

Thank you for the collaborations.

I will perform a test using the method described by @jeremylens on a test instance.

Just to make it more in line with your suggestion @jeremylens, can you tell me what this “normal registration path in the new Foreman” is?

I mean the steps in the procedure @maximilian posted - Managing hosts.

I tried to register a host that was on server B and received the error below. I added the puppetlabs repository in products > repositories and then published it in the content view and enabled it in the activation key.

How can I resolve this?

#
# Running registration
#
subscription-manager is already installed!


The system has been registered with ID: xxx-xxx-40eb-a424-xxx
The registered system name is: xxx.xxx.xxx
# Running [xxx.xxx.xxx] host initial configuration
curl: (35) TCP connection reset by peer
error: skipping https://yum.puppet.com/puppet-release-el-7.noarch.rpm - transfer failed
Retrieving https://yum.puppet.com/puppet-release-el-7.noarch.rpm
Host [xxx.xxx.xxx] initial configuration failed

Do you have the registration command set up to enable a repository? If it’s enabled in the activation key, it doesn’t need to be added in the registration command.

The host uses CentOS 7, I added the repository with the upstream URL Index of /puppet/el/7/x86_64.
It is enabled in the activation key.

Would I have to add the repository with the upstream URL pointing to https://yum.puppet.com/puppet-release-el-7.noarch.rpm?

Can I see the generated registration command? It seems the repository is being enabled in the registration command. It only needs to be enabled in the activation key.

The registration command I’m using is below.

This arrangement had to be done a little differently than the command generated in the Foreman host registration portal.

curl -sS --insecure 'https://xx-xxxx-xxxx.xxx.xxx/register?activation_keys=ak_xxx_centos&hostgroup_id=x&location_id=x&operatingsystem_id=x&organization_id=x&update_packages=false' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo3LCJpYXQiOjE3MTIwODA2MTgsImp0aSI6IjU2NmZhZGRiNTZkMzBmODBkY2VlNjEyNzExM2JlNDcwNDc3ZWI2Nzc5M2Y3NmYzMTRlMDU2NTQ3NjY1ZTIyOTciLCJleHAiOjE3MTIwOTUwMTgsInNjb3BlIjoicmVnaXN0cmF0aW9uI2dsb2JhbCByZWdpc3RyYXRpb24jaG9zdCJ9.1KhW3W3mnAPB3cQuaSiGRmJu_wG8fTgLIT7J-QfLRz8' > script.sh && chmod +x script.sh && sudo ./script.sh | tee "script_$(date '+%Y-%m-%d_%H-%M-%S').log"

Looking at the request you posted, I’m not sure where the attempt to download https://yum.puppet.com/puppet-release-el-7.noarch.rpm is coming from. Enabling it on the activation key would not do this. @lstejska ?

I have configured the following global parameters in Foreman, perhaps some of them are impacting the provisioning models that run after host registration.

Name	Value	Type	Actions
ansible_roles_check_mode	false	boolean	
dual_stack_provision_fallback	false	boolean	
enable-puppetlabs-repo	true	boolean	
force-puppet	true	boolean	
host_packages		string	
host_registration_insights	false	boolean	
host_registration_remote_execution	true	boolean	
keyboard	br-abnt2	string	
ntp_server	a.ntp.xxxx.xxx	string	
only_subscription_manager_repos	true	boolean	
time-zone	America/Sao_Paulo	string

This command generated by Foreman’s host registry, cURL, creates the script.sh file with the content below, the content has been slightly modified to hide sensitive data.

#!/bin/sh

# Make sure, all command output can be parsed (e.g. from subscription-manager)
export LC_ALL=C LANG=C

# Rendered with following template parameters:
# User: [xxx]
# Organization: [xxxx]
# Location: [xxx]
# Host group: [xxxxxx_CentOS7]
# Update packages: [false]
# Activation keys: [ak_xxxxxx_centos,ak_xxxxxx_centos]

if ! [ $(id -u) = 0 ]; then
  echo "Please run as root"
  exit 1
fi

# Select package manager for the OS (sets the $PKG_MANAGER* variables)

if [ -f /etc/os-release ] ; then
  . /etc/os-release
fi

if [ "${NAME%.*}" = 'FreeBSD' ]; then
  PKG_MANAGER='pkg'
  PKG_MANAGER_INSTALL="${PKG_MANAGER} install -y"
  PKG_MANAGER_REMOVE="${PKG_MANAGER} delete -y"
  PKG_MANAGER_UPGRADE="${PKG_MANAGER} install -y"
elif [ -f /etc/fedora-release -o -f /etc/redhat-release -o -f /etc/amazon-linux-release -o -f /etc/system-release ]; then
  PKG_MANAGER='dnf'
  if [ -f /etc/redhat-release -a "${VERSION_ID%.*}" -le 7 ]; then
    PKG_MANAGER='yum'
  elif [ -f /etc/system-release ]; then
    PKG_MANAGER='yum'
  fi
  PKG_MANAGER_INSTALL="${PKG_MANAGER} install -y"
  PKG_MANAGER_REMOVE="${PKG_MANAGER} remove -y"
  PKG_MANAGER_UPGRADE="${PKG_MANAGER} upgrade -y"
elif [ -f /etc/debian_version ]; then
  PKG_MANAGER='apt-get'
  PKG_MANAGER_INSTALL="${PKG_MANAGER} install -y"
  PKG_MANAGER_REMOVE="${PKG_MANAGER} remove -y"
  PKG_MANAGER_UPGRADE="${PKG_MANAGER} -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' -o APT::Get::Upgrade-Allow-New='true' upgrade -y"
elif [ -f /etc/arch-release ]; then
  PKG_MANAGER='pacman'
  PKG_MANAGER_INSTALL="${PKG_MANAGER} --noconfirm -S"
  PKG_MANAGER_REMOVE="${PKG_MANAGER} --noconfirm -R"
  PKG_MANAGER_UPGRADE="${PKG_MANAGER} --noconfirm -S"
elif [ x$ID = xopensuse-tumbleweed -o x$ID = xsles ]; then
  PKG_MANAGER='zypper'
  PKG_MANAGER_INSTALL="${PKG_MANAGER} --non-interactive install --auto-agree-with-licenses"
  PKG_MANAGER_REMOVE="${PKG_MANAGER} --non-interactive remove"
  PKG_MANAGER_UPGRADE="${PKG_MANAGER} --non-interactive update"
fi


SSL_CA_CERT=$(mktemp)
cat << EOF > $SSL_CA_CERT
-----BEGIN CERTIFICATE-----
xxxxxx==
-----END CERTIFICATE-----

EOF

cleanup_and_exit() {
  rm -f $SSL_CA_CERT
  exit $1
}


register_host() {
  curl --silent --show-error --cacert $SSL_CA_CERT --request POST https://sv-xxxx-xxx.xxxx.xxx/register \
       -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo3LCJpYXQiOjE3MTIxNjI5NDMsImp0aSI6IjIyMTJkMTZmZDc4NWQzNDdkYTFhYTRlY2UwYjIwYjg2Y2U2ODFlNzAyZTI5NDgzOWRmNDdmNzMyYjNkNDgxYjUiLCJleHAiOjE3MTIxNzczNDMsInNjb3BlIjoicmVnaXN0cmF0aW9uI2dsb2JhbCByZWdpc3RyYXRpb24jaG9zdCJ9.cgDdLE75hoUhGQq6Uf4qd0mrfBtLPa7SIABWfdGs90w' \
       --data "host[name]=$(hostname --fqdn)" \
       --data "host[build]=false" \
       --data "host[managed]=false" \
       --data 'host[organization_id]=4' \
       --data 'host[location_id]=3' \
       --data 'host[hostgroup_id]=3' \
       --data 'update_packages=false' \

}

echo "#"
echo "# Running registration"
echo "#"

register_katello_host(){
    UUID=$(subscription-manager identity | grep --max-count 1 --only-matching '\([[:xdigit:]]\{8\}-[[:xdigit:]]\{4\}-[[:xdigit:]]\{4\}-[[:xdigit:]]\{4\}-[[:xdigit:]]\{12\}\)')
    curl --silent --show-error --cacert $KATELLO_SERVER_CA_CERT --request POST "https://sv-xxxx-xxx.xxxx.xxx/register" \
         -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo3LCJpYXQiOjE3MTIxNjI5NDMsImp0aSI6IjIyMTJkMTZmZDc4NWQzNDdkYTFhYTRlY2UwYjIwYjg2Y2U2ODFlNzAyZTI5NDgzOWRmNDdmNzMyYjNkNDgxYjUiLCJleHAiOjE3MTIxNzczNDMsInNjb3BlIjoicmVnaXN0cmF0aW9uI2dsb2JhbCByZWdpc3RyYXRpb24jaG9zdCJ9.cgDdLE75hoUhGQq6Uf4qd0mrfBtLPa7SIABWfdGs90w' \
         --data "uuid=$UUID" \
         --data "host[build]=false" \
      --data 'host[organization_id]=4' \
      --data 'host[location_id]=3' \
      --data 'host[hostgroup_id]=3' \
      --data 'update_packages=false' \

}

# Set up subscription-manager
# Select package manager for the OS (sets the $PKG_MANAGER* variables)
if [ -z "$PKG_MANAGER" ]; then
 
if [ -f /etc/os-release ] ; then
  . /etc/os-release
fi

if [ "${NAME%.*}" = 'FreeBSD' ]; then
  PKG_MANAGER='pkg'
  PKG_MANAGER_INSTALL="${PKG_MANAGER} install -y"
  PKG_MANAGER_REMOVE="${PKG_MANAGER} delete -y"
  PKG_MANAGER_UPGRADE="${PKG_MANAGER} install -y"
elif [ -f /etc/fedora-release -o -f /etc/redhat-release -o -f /etc/amazon-linux-release -o -f /etc/system-release ]; then
  PKG_MANAGER='dnf'
  if [ -f /etc/redhat-release -a "${VERSION_ID%.*}" -le 7 ]; then
    PKG_MANAGER='yum'
  elif [ -f /etc/system-release ]; then
    PKG_MANAGER='yum'
  fi
  PKG_MANAGER_INSTALL="${PKG_MANAGER} install -y"
  PKG_MANAGER_REMOVE="${PKG_MANAGER} remove -y"
  PKG_MANAGER_UPGRADE="${PKG_MANAGER} upgrade -y"
elif [ -f /etc/debian_version ]; then
  PKG_MANAGER='apt-get'
  PKG_MANAGER_INSTALL="${PKG_MANAGER} install -y"
  PKG_MANAGER_REMOVE="${PKG_MANAGER} remove -y"
  PKG_MANAGER_UPGRADE="${PKG_MANAGER} -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' -o APT::Get::Upgrade-Allow-New='true' upgrade -y"
elif [ -f /etc/arch-release ]; then
  PKG_MANAGER='pacman'
  PKG_MANAGER_INSTALL="${PKG_MANAGER} --noconfirm -S"
  PKG_MANAGER_REMOVE="${PKG_MANAGER} --noconfirm -R"
  PKG_MANAGER_UPGRADE="${PKG_MANAGER} --noconfirm -S"
elif [ x$ID = xopensuse-tumbleweed -o x$ID = xsles ]; then
  PKG_MANAGER='zypper'
  PKG_MANAGER_INSTALL="${PKG_MANAGER} --non-interactive install --auto-agree-with-licenses"
  PKG_MANAGER_REMOVE="${PKG_MANAGER} --non-interactive remove"
  PKG_MANAGER_UPGRADE="${PKG_MANAGER} --non-interactive update"
fi
fi

# Define the path to rhsm.conf
RHSM_CFG=/etc/rhsm/rhsm.conf

  # Backup the original rhsm.conf file
  if [ -f $RHSM_CFG ] ; then
    test -f $RHSM_CFG.bak || cp $RHSM_CFG $RHSM_CFG.bak
  fi

  # Define the path to the Katello server CA certificate
  KATELLO_SERVER_CA_CERT=/etc/rhsm/ca/katello-server-ca.pem

  # If SSL_CA_CERT is not set, create a temporary file for it
  if [ -z "$SSL_CA_CERT" ]; then
    SSL_CA_CERT=$(mktemp)
    cat << EOF > "$SSL_CA_CERT"
-----BEGIN CERTIFICATE-----
xxxxx==
-----END CERTIFICATE-----

EOF
  fi

      # rhn-client-tools conflicts with subscription-manager package
    # since rhn tools replaces subscription-manager, we need to explicitly
    # install subscription-manager after the rhn tools cleanup
    if [ x$ID = xol ]; then
      $PKG_MANAGER_REMOVE rhn-client-tools
      $PKG_MANAGER_INSTALL --setopt=obsoletes=0 subscription-manager
    fi

      
  # Prepare the SSL certificate
  mkdir -p /etc/rhsm/ca
  cp -f $SSL_CA_CERT $KATELLO_SERVER_CA_CERT
  chmod 644 $KATELLO_SERVER_CA_CERT

# Prepare subscription-manager
if ! [ -x "$(command -v subscription-manager)" ] ; then
  $PKG_MANAGER_INSTALL subscription-manager
else
  echo "subscription-manager is already installed!"
      $PKG_MANAGER_UPGRADE subscription-manager > /dev/null 2>&1
  
fi

# Check if rhsm.conf exists
if ! [ -f $RHSM_CFG ] ; then
  echo "'$RHSM_CFG' not found, cannot configure subscription-manager"
      rm -f $SSL_CA_CERT
    exit 1
fi



# Configure subscription-manager
test -f $RHSM_CFG.bak || cp $RHSM_CFG $RHSM_CFG.bak
subscription-manager config \
  --server.hostname="sv-xxxx-xxx.xxxx.xxx" \
  --server.port="443" \
  --server.prefix="/rhsm" \
  --rhsm.repo_ca_cert="$KATELLO_SERVER_CA_CERT" \
  --rhsm.baseurl="https://sv-xxxx-xxx.xxxx.xxx/pulp/content"

# Older versions of subscription manager may not recognize
# report_package_profile and package_profile_on_trans options.
# So set them separately and redirect out & error to /dev/null
# to fail silently.
subscription-manager config --rhsm.package_profile_on_trans=1 > /dev/null 2>&1 || true
subscription-manager config --rhsm.report_package_profile=1 > /dev/null 2>&1 || true

# Configuration for EL6
if grep --quiet full_refresh_on_yum $RHSM_CFG; then
  sed -i "s/full_refresh_on_yum\s*=.*$/full_refresh_on_yum = 1/g" $RHSM_CFG
else
  full_refresh_config="#config for on-premise management\nfull_refresh_on_yum = 1"
  sed -i "/baseurl/a $full_refresh_config" $RHSM_CFG
fi


# Restart yggdrasild if installed and running
systemctl try-restart yggdrasil >/dev/null 2>&1 || true
subscription-manager register  \
  --org='xxxx' \
  --activationkey='ak_xxxxxx_centos,ak_xxxxxx_centos' || cleanup_and_exit 1

register_katello_host | bash

cleanup_and_exit

I suspect it’s one of these, probably enable-puppetlabs-repo.

1 Like

That’s right, by assigning the value false to the enable-puppetlabs-repo global parameter the error stopped occurring.
Now I need to find out the cause of the “initial configuration failed” error, see more details below.

#
# Running registration
#
subscription-manager is already installed!
The system has been registered with ID: xxx-xxx-xxx-xxx-7c5de28cb3bb
The registered system name is: sv-xxx-xxx.xxx.xxx
# Running [sv-xxx-xxx.xxx.xxx] host initial configuration
Loaded plugins: enabled_repos_upload, fastestmirror, langpacks, package_upload,
              : product-id, search-disabled-repos, subscription-manager
Loading mirror speeds from cached hostfile
Package puppet-agent-7.29.1-1.el7.x86_64 already installed and latest version
Nothing to do
Uploading Enabled Repositories Report
Loaded plugins: fastestmirror, langpacks, product-id, subscription-manager
Performing initial puppet run for --tags no_such_tag
Host [sv-xxx-xxx.xxx.xxx] initial configuration failed

It’s from the host parameters, in the host_init_config template, exactly here

1 Like

I am using Foreman’s default provisioning model for the kind Host initial configuration template.
The model name is Linux host_init_config default and has the same content as this link you provided.
Analyzing the code present in the model, and the code present in the registration script, I do not find any reference to TAGS, as shown in the error Performing initial puppet run for --tags no_such_tag.

Looking at the log on the Foreman server /var/log/foreman/production.log

2024-04-03T14:55:47 [I|app|92693376] Started GET "/api/hosts/36/vm_compute_attributes" for 100.65.11.184 at 2024-04-03 14:55:47 -0300
2024-04-03T14:55:47 [I|app|3d468b68] Started GET "/api/hosts/sv-xxx-xxx.xxx.xxx/templates" for 100.65.11.184 at 2024-04-03 14:55:47 -0300
2024-04-03T14:55:47 [I|app|92693376] Processing by Api::V2::HostsController#vm_compute_attributes as JSON
2024-04-03T14:55:47 [I|app|92693376]   Parameters: {"apiv"=>"v2", "id"=>"36"}
2024-04-03T14:55:47 [I|app|3d468b68] Processing by Api::V2::HostsController#templates as JSON
2024-04-03T14:55:47 [I|app|3d468b68]   Parameters: {"apiv"=>"v2", "id"=>"sv-xxx-xxx.xxx.xxx"}
2024-04-03T14:55:47 [W|app|92693376] Action failed
2024-04-03T14:55:47 [I|app|92693376] Backtrace for 'Action failed' error (NoMethodError): undefined method `include?' for nil:NilClass
 92693376 | /usr/share/gems/gems/fog-vsphere-3.6.4/lib/fog/vsphere/requests/compute/get_virtual_machine.rb:40:in `get_vm_by_name'
 92693376 | /usr/share/gems/gems/fog-vsphere-3.6.4/lib/fog/vsphere/requests/compute/get_virtual_machine.rb:25:in `block in get_vm_ref'
 92693376 | /usr/share/gems/gems/fog-vsphere-3.6.4/lib/fog/vsphere/requests/compute/get_virtual_machine.rb:25:in `map'
 92693376 | /usr/share/gems/gems/fog-vsphere-3.6.4/lib/fog/vsphere/requests/compute/get_virtual_machine.rb:25:in `get_vm_ref'
 92693376 | /usr/share/gems/gems/fog-vsphere-3.6.4/lib/fog/vsphere/requests/compute/get_virtual_machine.rb:7:in `get_virtual_machine'
 92693376 | /usr/share/gems/gems/fog-vsphere-3.6.4/lib/fog/vsphere/models/compute/servers.rb:29:in `get'
 92693376 | /usr/share/foreman/app/models/compute_resource.rb:182:in `find_vm_by_uuid'
 92693376 | /usr/share/foreman/app/models/compute_resource.rb:365:in `vm_compute_attributes_for'
 92693376 | /usr/share/foreman/app/models/host/managed.rb:695:in `vm_compute_attributes'
 92693376 | /usr/share/foreman/app/controllers/api/v2/hosts_controller.rb:233:in `vm_compute_attributes'
 92693376 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
 92693376 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/abstract_controller/base.rb:228:in `process_action'
 92693376 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/rendering.rb:30:in `process_action'
 92693376 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
 92693376 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 92693376 | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
 92693376 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 92693376 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 92693376 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 92693376 | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
 92693376 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 92693376 | /usr/share/gems/gems/audited-5.4.3/lib/audited/sweeper.rb:16:in `around'
 92693376 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 92693376 | /usr/share/gems/gems/audited-5.4.3/lib/audited/sweeper.rb:16:in `around'
 92693376 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 92693376 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:137:in `run_callbacks'
 92693376 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/abstract_controller/callbacks.rb:41:in `process_action'
 92693376 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/rescue.rb:22:in `process_action'
 92693376 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
 92693376 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/notifications.rb:203:in `block in instrument'
 92693376 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 92693376 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/notifications.rb:203:in `instrument'
 92693376 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/instrumentation.rb:33:in `process_action'
 92693376 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
 92693376 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
 92693376 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/abstract_controller/base.rb:165:in `process'
 92693376 | /usr/share/gems/gems/actionview-6.1.7.7/lib/action_view/rendering.rb:39:in `process'
 92693376 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal.rb:190:in `dispatch'
 92693376 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal.rb:254:in `dispatch'
 92693376 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
 92693376 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/route_set.rb:33:in `serve'
 92693376 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
 92693376 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/mapper.rb:49:in `serve'
 92693376 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/journey/router.rb:50:in `block in serve'
 92693376 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/journey/router.rb:32:in `each'

Below is a more detailed excerpt from the /var/log/foreman/production.log log on the Foreman server at the time of host registration. See if we have anything that can tell us where the problem is.

2024-04-03T15:52:52 [I|app|91cb8bf7] Started GET "/register?activation_keys=ak_xxx_centos&hostgroup_id=3&location_id=3&operatingsystem_id=4&organization_id=4&update_packages=false" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:52 -0300
2024-04-03T15:52:52 [I|app|91cb8bf7] Processing by Api::V2::RegistrationController#global as */*
2024-04-03T15:52:52 [I|app|91cb8bf7]   Parameters: {"activation_keys"=>"ak_xxx_centos", "hostgroup_id"=>"3", "location_id"=>"3", "operatingsystem_id"=>"4", "organization_id"=>"4", "update_packages"=>"false"}
2024-04-03T15:52:52 [I|app|91cb8bf7] Authorized user xxx.xxx(xxx xxx xxx)
2024-04-03T15:52:52 [W|app|91cb8bf7] Scoped order is ignored, it's forced to be batch order.
2024-04-03T15:52:52 [I|app|91cb8bf7]   Rendered text template (Duration: 0.0ms | Allocations: 1)
2024-04-03T15:52:52 [I|app|91cb8bf7] Completed 200 OK in 137ms (Views: 1.2ms | ActiveRecord: 49.9ms | Allocations: 21092)
2024-04-03T15:52:52 [I|app|0575eb50] Started GET "/rhsm/status" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:52 -0300
2024-04-03T15:52:52 [I|app|0575eb50] Processing by Katello::Api::Rhsm::CandlepinProxiesController#server_status as JSON
2024-04-03T15:52:52 [I|app|0575eb50] Completed 200 OK in 28ms (Views: 0.4ms | ActiveRecord: 2.2ms | Allocations: 4623)
2024-04-03T15:52:54 [I|app|8642dc98] Started POST "/rhsm/consumers?owner=xxx&activation_keys=ak_xxx_centos%2Cak_xxx_centos" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:54 -0300
2024-04-03T15:52:54 [I|app|8642dc98] Processing by Katello::Api::Rhsm::CandlepinProxiesController#consumer_activate as JSON
2024-04-03T15:52:54 [I|app|8642dc98]   Parameters: {"name"=>"sv-xxx-xxx.xxx.xxx", "contentTags"=>[], "serviceLevel"=>"", "usage"=>"", "role"=>"", "facts"=>"[FILTERED]", "addOns"=>[], "type"=>"system", "owner"=>"xxx", "activation_keys"=>"ak_xxx_centos,ak_xxx_centos"}
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (35) destroy event on host_id 36
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (35) destroy event on uuid 744e23ac-9535-4dd1-8257-626e78985fc8
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (35) destroy event on service_level
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (35) destroy event on release_version
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (35) destroy event on autoheal true
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (35) destroy event on registered_at 2024-04-03 18:50:04 UTC
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (35) destroy event on registered_through sv-xxx.xxx.xxx
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (35) destroy event on user_id
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (35) destroy event on hypervisor false
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (35) destroy event on hypervisor_host_id
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (35) destroy event on purpose_usage
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (35) destroy event on purpose_role
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (35) destroy event on dmi_uuid 4209005b-ee23-59f7-0d69-aa0e43f9eb6e
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (35) destroy event on pool_ids []
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::ContentFacet (35) update event on uuid 744e23ac-9535-4dd1-8257-626e78985fc8,
2024-04-03T15:52:54 [I|app|8642dc98] generating new uuid
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::ContentFacet (35) update event on uuid , 3dfbe0e9-1018-4521-bb5f-7f38f54e7746
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (36) create event on host_id 36
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (36) create event on uuid 3dfbe0e9-1018-4521-bb5f-7f38f54e7746
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (36) create event on service_level
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (36) create event on release_version
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (36) create event on autoheal false
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (36) create event on registered_at 2024-03-04 16:30:26 UTC
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (36) create event on registered_through
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (36) create event on user_id
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (36) create event on hypervisor false
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (36) create event on hypervisor_host_id
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (36) create event on purpose_usage
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (36) create event on purpose_role
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (36) create event on dmi_uuid 4209005b-ee23-59f7-0d69-aa0e43f9eb6e
2024-04-03T15:52:54 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (36) create event on pool_ids []
2024-04-03T15:52:56 [E|kat|c709cf01] Received compliance.created event from Candlepin. Handling of this event is no longer supported.
2024-04-03T15:52:56 [I|kat|c709cf01] candlepin event handled success=true subject=compliance.created entity_id=3dfbe0e9-1018-4521-bb5f-7f38f54e7746 duration=1.15
2024-04-03T15:52:56 [E|kat|c709cf01] Received system_purpose_compliance.created event from Candlepin. Handling of this event is no longer supported.
2024-04-03T15:52:56 [I|kat|c709cf01] candlepin event handled success=true subject=system_purpose_compliance.created entity_id=3dfbe0e9-1018-4521-bb5f-7f38f54e7746 duration=0.94
2024-04-03T15:52:57 [I|app|8642dc98] Import facts for 'sv-xxx-xxx.xxx.xxx' completed. Added: 172, Updated: 0, Deleted 0 facts
2024-04-03T15:52:57 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (36) update event on autoheal false, true
2024-04-03T15:52:57 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (36) update event on registered_at 2024-03-04 16:30:26 UTC, 2024-04-03 18:52:55 UTC
2024-04-03T15:52:57 [I|aud|8642dc98] Katello::Host::SubscriptionFacet (36) update event on registered_through , sv-xxx.xxx.xxx
2024-04-03T15:52:57 [I|app|8642dc98] Completed 200 OK in 3212ms (Views: 1.9ms | ActiveRecord: 621.6ms | Allocations: 386687)
2024-04-03T15:52:57 [I|app|7d8ae6cb] Started GET "/rhsm/status" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:57 -0300
2024-04-03T15:52:57 [I|app|7d8ae6cb] Processing by Katello::Api::Rhsm::CandlepinProxiesController#server_status as JSON
2024-04-03T15:52:57 [I|app|7d8ae6cb] Completed 200 OK in 26ms (Views: 0.4ms | ActiveRecord: 2.1ms | Allocations: 4633)
2024-04-03T15:52:57 [I|app|bcdac8ff] Started GET "/rhsm/consumers/3dfbe0e9-1018-4521-bb5f-7f38f54e7746" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:57 -0300
2024-04-03T15:52:57 [I|app|bcdac8ff] Processing by Katello::Api::Rhsm::CandlepinProxiesController#consumer_show as JSON
2024-04-03T15:52:57 [I|app|bcdac8ff]   Parameters: {"id"=>"3dfbe0e9-1018-4521-bb5f-7f38f54e7746"}
2024-04-03T15:52:57 [I|app|bcdac8ff] Completed 200 OK in 57ms (Views: 2.7ms | ActiveRecord: 6.1ms | Allocations: 8794)
2024-04-03T15:52:57 [I|app|1c289f61] Started GET "/rhsm/" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:57 -0300
2024-04-03T15:52:57 [I|app|1c289f61] Processing by Katello::Api::V2::RootController#rhsm_resource_list as JSON
2024-04-03T15:52:57 [I|app|1c289f61]   Parameters: {"root"=>{}}
2024-04-03T15:52:57 [I|app|1c289f61] Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 1.5ms | Allocations: 1581)
2024-04-03T15:52:57 [I|app|ed062ee7] Started GET "/rhsm/status" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:57 -0300
2024-04-03T15:52:57 [I|app|ed062ee7] Processing by Katello::Api::Rhsm::CandlepinProxiesController#server_status as JSON
2024-04-03T15:52:57 [I|app|ed062ee7] Completed 200 OK in 28ms (Views: 0.5ms | ActiveRecord: 2.0ms | Allocations: 4628)
2024-04-03T15:52:57 [I|app|60a5de05] Started GET "/rhsm/consumers/3dfbe0e9-1018-4521-bb5f-7f38f54e7746/certificates/serials" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:57 -0300
2024-04-03T15:52:57 [I|app|60a5de05] Processing by Katello::Api::Rhsm::CandlepinProxiesController#serials as JSON
2024-04-03T15:52:57 [I|app|60a5de05]   Parameters: {"id"=>"3dfbe0e9-1018-4521-bb5f-7f38f54e7746"}
2024-04-03T15:52:58 [I|app|60a5de05] Completed 200 OK in 124ms (Views: 0.2ms | ActiveRecord: 4.6ms | Allocations: 5797)
2024-04-03T15:52:58 [I|app|6752f6ce] Started GET "/rhsm/consumers/3dfbe0e9-1018-4521-bb5f-7f38f54e7746/certificates?serials=3680264734505265526" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:58 -0300
2024-04-03T15:52:58 [I|app|6752f6ce] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2024-04-03T15:52:58 [I|app|6752f6ce]   Parameters: {"serials"=>"3680264734505265526", "id"=>"3dfbe0e9-1018-4521-bb5f-7f38f54e7746"}
2024-04-03T15:52:58 [I|app|6752f6ce] Completed 200 OK in 58ms (Views: 0.2ms | ActiveRecord: 1.9ms | Allocations: 4810)
2024-04-03T15:52:58 [I|app|6ce9dc97] Started GET "/rhsm/consumers/3dfbe0e9-1018-4521-bb5f-7f38f54e7746/accessible_content" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:58 -0300
2024-04-03T15:52:58 [I|app|6ce9dc97] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2024-04-03T15:52:58 [I|app|6ce9dc97]   Parameters: {"id"=>"3dfbe0e9-1018-4521-bb5f-7f38f54e7746"}
2024-04-03T15:52:58 [I|app|6ce9dc97] Completed 200 OK in 34ms (Views: 0.2ms | ActiveRecord: 1.9ms | Allocations: 4749)
2024-04-03T15:52:58 [I|app|bfb62342] Started GET "/rhsm/" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:58 -0300
2024-04-03T15:52:58 [I|app|bfb62342] Processing by Katello::Api::V2::RootController#rhsm_resource_list as JSON
2024-04-03T15:52:58 [I|app|bfb62342]   Parameters: {"root"=>{}}
2024-04-03T15:52:58 [I|app|bfb62342] Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.4ms | Allocations: 1581)
2024-04-03T15:52:58 [I|app|fd319e13] Started GET "/rhsm/consumers/3dfbe0e9-1018-4521-bb5f-7f38f54e7746/content_overrides" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:58 -0300
2024-04-03T15:52:58 [I|app|fd319e13] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2024-04-03T15:52:58 [I|app|fd319e13]   Parameters: {"id"=>"3dfbe0e9-1018-4521-bb5f-7f38f54e7746"}
2024-04-03T15:52:58 [I|app|fd319e13] Completed 200 OK in 30ms (Views: 0.2ms | ActiveRecord: 2.1ms | Allocations: 4850)
2024-04-03T15:52:58 [I|app|7d788afd] Started GET "/rhsm/consumers/3dfbe0e9-1018-4521-bb5f-7f38f54e7746/certificates/serials" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:58 -0300
2024-04-03T15:52:58 [I|app|7d788afd] Processing by Katello::Api::Rhsm::CandlepinProxiesController#serials as JSON
2024-04-03T15:52:58 [I|app|7d788afd]   Parameters: {"id"=>"3dfbe0e9-1018-4521-bb5f-7f38f54e7746"}
2024-04-03T15:52:58 [I|app|7d788afd] Completed 200 OK in 55ms (Views: 0.3ms | ActiveRecord: 5.6ms | Allocations: 5793)
2024-04-03T15:52:58 [I|app|bdfaa07b] Started GET "/rhsm/status" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:58 -0300
2024-04-03T15:52:58 [I|app|bdfaa07b] Processing by Katello::Api::Rhsm::CandlepinProxiesController#server_status as JSON
2024-04-03T15:52:58 [I|app|bdfaa07b] Completed 200 OK in 33ms (Views: 0.5ms | ActiveRecord: 2.1ms | Allocations: 4631)
2024-04-03T15:52:58 [I|app|bb30b716] Started GET "/rhsm/consumers/3dfbe0e9-1018-4521-bb5f-7f38f54e7746/accessible_content" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:58 -0300
2024-04-03T15:52:58 [I|app|bb30b716] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2024-04-03T15:52:58 [I|app|bb30b716]   Parameters: {"id"=>"3dfbe0e9-1018-4521-bb5f-7f38f54e7746"}
2024-04-03T15:52:58 [I|app|bb30b716] Completed 304 Not Modified in 33ms (Views: 0.2ms | ActiveRecord: 2.4ms | Allocations: 4652)
2024-04-03T15:52:58 [I|app|c1ece6ba] Started GET "/rhsm/consumers/3dfbe0e9-1018-4521-bb5f-7f38f54e7746/content_overrides" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:58 -0300
2024-04-03T15:52:58 [I|app|c1ece6ba] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2024-04-03T15:52:58 [I|app|c1ece6ba]   Parameters: {"id"=>"3dfbe0e9-1018-4521-bb5f-7f38f54e7746"}
2024-04-03T15:52:58 [I|app|c1ece6ba] Completed 200 OK in 33ms (Views: 0.2ms | ActiveRecord: 2.2ms | Allocations: 4835)
2024-04-03T15:52:58 [I|app|a55566ab] Started GET "/rhsm/consumers/3dfbe0e9-1018-4521-bb5f-7f38f54e7746/owner" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:58 -0300
2024-04-03T15:52:58 [I|app|a55566ab] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2024-04-03T15:52:58 [I|app|a55566ab]   Parameters: {"id"=>"3dfbe0e9-1018-4521-bb5f-7f38f54e7746"}
2024-04-03T15:52:58 [I|app|a55566ab] Completed 200 OK in 35ms (Views: 0.2ms | ActiveRecord: 2.0ms | Allocations: 4761)
2024-04-03T15:52:58 [I|app|fe6e5c83] Started PUT "/rhsm/consumers/3dfbe0e9-1018-4521-bb5f-7f38f54e7746/profiles" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:58 -0300
2024-04-03T15:52:58 [I|app|fe6e5c83] Processing by Katello::Api::Rhsm::CandlepinDynflowProxyController#upload_profiles as JSON
2024-04-03T15:52:58 [I|app|fe6e5c83]   Parameters: {"id"=>"3dfbe0e9-1018-4521-bb5f-7f38f54e7746"}
2024-04-03T15:52:59 [I|app|fe6e5c83] Completed 200 OK in 246ms (Views: 2.7ms | ActiveRecord: 86.6ms | Allocations: 75592)
2024-04-03T15:52:59 [I|app|0ef47f8a] Started GET "/rhsm/consumers/3dfbe0e9-1018-4521-bb5f-7f38f54e7746/compliance" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:59 -0300
2024-04-03T15:52:59 [I|app|0ef47f8a] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2024-04-03T15:52:59 [I|app|0ef47f8a]   Parameters: {"id"=>"3dfbe0e9-1018-4521-bb5f-7f38f54e7746"}
2024-04-03T15:52:59 [I|app|0ef47f8a] Completed 200 OK in 35ms (Views: 0.2ms | ActiveRecord: 2.0ms | Allocations: 4733)
2024-04-03T15:52:59 [I|app|282b502c] Started GET "/rhsm/consumers/3dfbe0e9-1018-4521-bb5f-7f38f54e7746/owner" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:59 -0300
2024-04-03T15:52:59 [I|app|282b502c] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2024-04-03T15:52:59 [I|app|282b502c]   Parameters: {"id"=>"3dfbe0e9-1018-4521-bb5f-7f38f54e7746"}
2024-04-03T15:52:59 [I|app|282b502c] Completed 200 OK in 31ms (Views: 0.2ms | ActiveRecord: 2.2ms | Allocations: 4734)
2024-04-03T15:52:59 [I|app|c4d101fa] Started GET "/rhsm/" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:59 -0300
2024-04-03T15:52:59 [I|app|c4d101fa] Processing by Katello::Api::V2::RootController#rhsm_resource_list as JSON
2024-04-03T15:52:59 [I|app|c4d101fa]   Parameters: {"root"=>{}}
2024-04-03T15:52:59 [I|app|c4d101fa] Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 1.6ms | Allocations: 1581)
2024-04-03T15:52:59 [I|app|9a56df58] Started GET "/rhsm/consumers/3dfbe0e9-1018-4521-bb5f-7f38f54e7746" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:59 -0300
2024-04-03T15:52:59 [I|app|9a56df58] Processing by Katello::Api::Rhsm::CandlepinProxiesController#consumer_show as JSON
2024-04-03T15:52:59 [I|app|9a56df58]   Parameters: {"id"=>"3dfbe0e9-1018-4521-bb5f-7f38f54e7746"}
2024-04-03T15:52:59 [I|app|9a56df58] Completed 200 OK in 46ms (Views: 2.6ms | ActiveRecord: 4.1ms | Allocations: 8630)
2024-04-03T15:52:59 [I|app|8fa20392] Started POST "/register" for 2801:80:2250:67:a::c8 at 2024-04-03 15:52:59 -0300
2024-04-03T15:52:59 [I|app|8fa20392] Processing by Api::V2::RegistrationController#host as */*
2024-04-03T15:52:59 [I|app|8fa20392]   Parameters: {"uuid"=>"3dfbe0e9-1018-4521-bb5f-7f38f54e7746", "host"=>{"build"=>"false", "organization_id"=>"4", "location_id"=>"3", "hostgroup_id"=>"3"}, "update_packages"=>"false"}
2024-04-03T15:52:59 [I|app|8fa20392] Authorized user xxx.xxx(xxx Antonio xxx)
2024-04-03T15:52:59 [I|aud|8fa20392] Parameter (44) destroy event on name host_update_packages
2024-04-03T15:52:59 [I|aud|8fa20392] Parameter (44) destroy event on value false
2024-04-03T15:52:59 [I|aud|8fa20392] Parameter (44) destroy event on reference_id 36
2024-04-03T15:52:59 [I|aud|8fa20392] Parameter (44) destroy event on hidden_value false
2024-04-03T15:52:59 [I|aud|8fa20392] Parameter (44) destroy event on key_type boolean
2024-04-03T15:52:59 [I|aud|8fa20392] Parameter (45) create event on name host_update_packages
2024-04-03T15:52:59 [I|aud|8fa20392] Parameter (45) create event on value false
2024-04-03T15:52:59 [I|aud|8fa20392] Parameter (45) create event on reference_id 36
2024-04-03T15:52:59 [I|aud|8fa20392] Parameter (45) create event on hidden_value false
2024-04-03T15:52:59 [I|aud|8fa20392] Parameter (45) create event on key_type boolean
2024-04-03T15:53:00 [I|app|8fa20392] Processed 1 tasks from queue 'Host::Managed Main', completed 1/1
2024-04-03T15:53:00 [I|aud|8fa20392] Host::Base (36) update event on build false, true
2024-04-03T15:53:00 [I|aud|8fa20392] Host::Base (36) update event on initiated_at 2024-04-03 15:50:09 -0300, 2024-04-03 15:53:00 -0300
2024-04-03T15:53:00 [I|aud|8fa20392] Host::Base (36) update event on build_errors Host initial configuration failed, please see the registration log for more details.,
2024-04-03T15:53:00 [W|app|8fa20392] Could not find a provider for sv-xxx-xxx.xxx.xxx. Providers returned {"Katello::ManagedContentMediumProvider"=>["Kickstart repository was not set for host 'sv-xxx-xxx.xxx.xxx'"], "MediumProviders::Default"=>["CentOS 7 medium was not set for host 'sv-xxx-xxx.xxx.xxx'", "Invalid medium '' for 'CentOS 7'"]}
2024-04-03T15:53:00 [W|app|8fa20392] Could not find a provider for sv-xxx-xxx.xxx.xxx. Providers returned {"Katello::ManagedContentMediumProvider"=>["Kickstart repository was not set for host 'sv-xxx-xxx.xxx.xxx'"], "MediumProviders::Default"=>["CentOS 7 medium was not set for host 'sv-xxx-xxx.xxx.xxx'", "Invalid medium '' for 'CentOS 7'"]}
2024-04-03T15:53:00 [W|app|8fa20392] Could not find a provider for sv-xxx-xxx.xxx.xxx. Providers returned {"Katello::ManagedContentMediumProvider"=>["Kickstart repository was not set for host 'sv-xxx-xxx.xxx.xxx'"], "MediumProviders::Default"=>["CentOS 7 medium was not set for host 'sv-xxx-xxx.xxx.xxx'", "Invalid medium '' for 'CentOS 7'"]}
2024-04-03T15:53:00 [W|app|8fa20392] Could not find a provider for sv-xxx-xxx.xxx.xxx. Providers returned {"Katello::ManagedContentMediumProvider"=>["Kickstart repository was not set for host 'sv-xxx-xxx.xxx.xxx'"], "MediumProviders::Default"=>["CentOS 7 medium was not set for host 'sv-xxx-xxx.xxx.xxx'", "Invalid medium '' for 'CentOS 7'"]}
2024-04-03T15:53:00 [W|app|8fa20392] Could not find a provider for sv-xxx-xxx.xxx.xxx. Providers returned {"Katello::ManagedContentMediumProvider"=>["Kickstart repository was not set for host 'sv-xxx-xxx.xxx.xxx'"], "MediumProviders::Default"=>["CentOS 7 medium was not set for host 'sv-xxx-xxx.xxx.xxx'", "Invalid medium '' for 'CentOS 7'"]}
2024-04-03T15:53:00 [I|app|8fa20392]   Rendered text template (Duration: 0.0ms | Allocations: 1)
2024-04-03T15:53:00 [I|app|8fa20392] Completed 200 OK in 280ms (Views: 0.4ms | ActiveRecord: 94.7ms | Allocations: 75939)
2024-04-03T15:53:00 [I|app|9382999d] Started GET "/rhsm/consumers/3dfbe0e9-1018-4521-bb5f-7f38f54e7746/certificates/serials" for 2801:80:2250:67:a::c8 at 2024-04-03 15:53:00 -0300
2024-04-03T15:53:00 [I|app|9382999d] Processing by Katello::Api::Rhsm::CandlepinProxiesController#serials as JSON
2024-04-03T15:53:00 [I|app|9382999d]   Parameters: {"id"=>"3dfbe0e9-1018-4521-bb5f-7f38f54e7746"}
2024-04-03T15:53:00 [I|app|9382999d] Completed 200 OK in 47ms (Views: 0.2ms | ActiveRecord: 4.7ms | Allocations: 5794)
2024-04-03T15:53:00 [I|app|4b9b5318] Started GET "/rhsm/status" for 2801:80:2250:67:a::c8 at 2024-04-03 15:53:00 -0300
2024-04-03T15:53:00 [I|app|4b9b5318] Processing by Katello::Api::Rhsm::CandlepinProxiesController#server_status as JSON
2024-04-03T15:53:00 [I|app|4b9b5318] Completed 200 OK in 23ms (Views: 0.3ms | ActiveRecord: 2.4ms | Allocations: 4638)
2024-04-03T15:53:00 [I|bac|c709cf01] Task {label: , execution_plan_id: 6fccd2cb-dd94-42aa-93df-36690bcdc9ce} state changed: pending
2024-04-03T15:53:00 [I|bac|c709cf01] Task {label: Actions::Katello::Applicability::Hosts::BulkGenerate, id: 3bd99f45-56ed-412a-9255-41a3de978780, execution_plan_id: 6fccd2cb-dd94-42aa-93df-36690bcdc9ce} state changed: planning
2024-04-03T15:53:00 [I|app|492a7695] Started GET "/rhsm/consumers/3dfbe0e9-1018-4521-bb5f-7f38f54e7746/accessible_content" for 2801:80:2250:67:a::c8 at 2024-04-03 15:53:00 -0300
2024-04-03T15:53:00 [I|app|492a7695] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2024-04-03T15:53:00 [I|app|492a7695]   Parameters: {"id"=>"3dfbe0e9-1018-4521-bb5f-7f38f54e7746"}
2024-04-03T15:53:00 [I|bac|c709cf01] Task {label: Actions::Katello::Applicability::Hosts::BulkGenerate, id: 3bd99f45-56ed-412a-9255-41a3de978780, execution_plan_id: 6fccd2cb-dd94-42aa-93df-36690bcdc9ce} state changed: planned
2024-04-03T15:53:00 [I|app|c709cf01] katello event handled success=true type=generate_host_applicability object_id=0 expired=false rescheduled=false duration=67.4
2024-04-03T15:53:00 [I|app|492a7695] Completed 304 Not Modified in 30ms (Views: 0.2ms | ActiveRecord: 1.9ms | Allocations: 4654)
2024-04-03T15:53:00 [I|bac|c709cf01] Task {label: Actions::Katello::Applicability::Hosts::BulkGenerate, id: 3bd99f45-56ed-412a-9255-41a3de978780, execution_plan_id: 6fccd2cb-dd94-42aa-93df-36690bcdc9ce} state changed: running
2024-04-03T15:53:00 [I|app|5fd82f79] Started GET "/rhsm/consumers/3dfbe0e9-1018-4521-bb5f-7f38f54e7746/content_overrides" for 2801:80:2250:67:a::c8 at 2024-04-03 15:53:00 -0300
2024-04-03T15:53:00 [I|app|5fd82f79] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2024-04-03T15:53:00 [I|app|5fd82f79]   Parameters: {"id"=>"3dfbe0e9-1018-4521-bb5f-7f38f54e7746"}
2024-04-03T15:53:00 [I|app|5fd82f79] Completed 200 OK in 27ms (Views: 0.2ms | ActiveRecord: 2.1ms | Allocations: 4836)
2024-04-03T15:53:00 [I|bac|c709cf01] Task {label: Actions::Katello::Applicability::Hosts::BulkGenerate, id: 3bd99f45-56ed-412a-9255-41a3de978780, execution_plan_id: 6fccd2cb-dd94-42aa-93df-36690bcdc9ce} state changed: stopped  result: success
2024-04-03T15:53:01 [I|app|95570d6f] Started GET "/rhsm/consumers/3dfbe0e9-1018-4521-bb5f-7f38f54e7746/certificates/serials" for 2801:80:2250:67:a::c8 at 2024-04-03 15:53:01 -0300
2024-04-03T15:53:01 [I|app|95570d6f] Processing by Katello::Api::Rhsm::CandlepinProxiesController#serials as JSON
2024-04-03T15:53:01 [I|app|95570d6f]   Parameters: {"id"=>"3dfbe0e9-1018-4521-bb5f-7f38f54e7746"}
2024-04-03T15:53:01 [I|app|95570d6f] Completed 200 OK in 49ms (Views: 0.2ms | ActiveRecord: 4.9ms | Allocations: 5794)
2024-04-03T15:53:01 [I|app|774d9173] Started GET "/rhsm/status" for 2801:80:2250:67:a::c8 at 2024-04-03 15:53:01 -0300
2024-04-03T15:53:01 [I|app|774d9173] Processing by Katello::Api::Rhsm::CandlepinProxiesController#server_status as JSON
2024-04-03T15:53:01 [I|app|774d9173] Completed 200 OK in 23ms (Views: 0.3ms | ActiveRecord: 1.9ms | Allocations: 4642)
2024-04-03T15:53:01 [I|app|86516d73] Started GET "/rhsm/consumers/3dfbe0e9-1018-4521-bb5f-7f38f54e7746/accessible_content" for 2801:80:2250:67:a::c8 at 2024-04-03 15:53:01 -0300
2024-04-03T15:53:01 [I|app|86516d73] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2024-04-03T15:53:01 [I|app|86516d73]   Parameters: {"id"=>"3dfbe0e9-1018-4521-bb5f-7f38f54e7746"}
2024-04-03T15:53:01 [I|app|86516d73] Completed 304 Not Modified in 30ms (Views: 0.2ms | ActiveRecord: 1.9ms | Allocations: 4658)
2024-04-03T15:53:01 [I|app|7c2ec8a4] Started GET "/rhsm/consumers/3dfbe0e9-1018-4521-bb5f-7f38f54e7746/content_overrides" for 2801:80:2250:67:a::c8 at 2024-04-03 15:53:01 -0300
2024-04-03T15:53:01 [I|app|7c2ec8a4] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2024-04-03T15:53:01 [I|app|7c2ec8a4]   Parameters: {"id"=>"3dfbe0e9-1018-4521-bb5f-7f38f54e7746"}
2024-04-03T15:53:01 [I|app|7c2ec8a4] Completed 200 OK in 30ms (Views: 0.1ms | ActiveRecord: 2.1ms | Allocations: 4843)
2024-04-03T15:53:03 [I|app|0313170b] Started POST "/unattended/failed?token=e61e6b0b-e75d-4328-a3f8-ca26d1524219" for 2801:80:2250:67:a::c8 at 2024-04-03 15:53:03 -0300
2024-04-03T15:53:03 [I|app|0313170b] Processing by UnattendedController#failed as TEXT
2024-04-03T15:53:03 [I|app|0313170b]   Parameters: {"Host initial configuration failed, please see the registration log for more details."=>nil, "token"=>"e61e6b0b-e75d-4328-a3f8-ca26d1524219"}
2024-04-03T15:53:03 [W|app|0313170b] unattended: sv-xxx-xxx.xxx.xxx build failed!
2024-04-03T15:53:03 [W|app|0313170b] Log lines from the OS installer:
 0313170b | Host initial configuration failed, please see the registration log for more details.
2024-04-03T15:53:03 [I|app|0313170b] Processed 1 tasks from queue 'Host::Managed Main', completed 1/1
2024-04-03T15:53:03 [I|aud|0313170b] Host::Base (36) update event on build true, false
2024-04-03T15:53:03 [I|aud|0313170b] Host::Base (36) update event on installed_at 2024-04-03 18:50:13 UTC, 2024-04-03 18:53:03 UTC
2024-04-03T15:53:03 [I|aud|0313170b] Host::Base (36) update event on build_errors , Host initial configuration failed, please see the registration log for more details.
2024-04-03T15:53:03 [I|app|0313170b] Completed 201 Created in 97ms (ActiveRecord: 33.4ms | Allocations: 24124)


2024-04-03T15:53:00 [W|app|8fa20392] Could not find a provider for sv-xxx-xxx.xxx.xxx. Providers returned {"Katello::ManagedContentMediumProvider"=>["Kickstart repository was not set for host 'sv-xxx-xxx.xxx.xxx'"], "MediumProviders::Default"=>["CentOS 7 medium was not set for host 'sv-xxx-xxx.xxx.xxx'", "Invalid medium '' for 'CentOS 7'"]}
2024-04-03T15:53:00 [W|app|8fa20392] Could not find a provider for sv-xxx-xxx.xxx.xxx. Providers returned {"Katello::ManagedContentMediumProvider"=>["Kickstart repository was not set for host 'sv-xxx-xxx.xxx.xxx'"], "MediumProviders::Default"=>["CentOS 7 medium was not set for host 'sv-xxx-xxx.xxx.xxx'", "Invalid medium '' for 'CentOS 7'"]}
2024-04-03T15:53:00 [W|app|8fa20392] Could not find a provider for sv-xxx-xxx.xxx.xxx. Providers returned {"Katello::ManagedContentMediumProvider"=>["Kickstart repository was not set for host 'sv-xxx-xxx.xxx.xxx'"], "MediumProviders::Default"=>["CentOS 7 medium was not set for host 'sv-xxx-xxx.xxx.xxx'", "Invalid medium '' for 'CentOS 7'"]}
2024-04-03T15:53:00 [W|app|8fa20392] Could not find a provider for sv-xxx-xxx.xxx.xxx. Providers returned {"Katello::ManagedContentMediumProvider"=>["Kickstart repository was not set for host 'sv-xxx-xxx.xxx.xxx'"], "MediumProviders::Default"=>["CentOS 7 medium was not set for host 'sv-xxx-xxx.xxx.xxx'", "Invalid medium '' for 'CentOS 7'"]}
2024-04-03T15:53:00 [W|app|8fa20392] Could not find a provider for sv-xxx-xxx.xxx.xxx. Providers returned {"Katello::ManagedContentMediumProvider"=>["Kickstart repository was not set for host 'sv-xxx-xxx.xxx.xxx'"], "MediumProviders::Default"=>["CentOS 7 medium was not set for host 'sv-xxx-xxx.xxx.xxx'", "Invalid medium '' for 'CentOS 7'"]}

Does the hostgroup have a kickstart repository assigned? If this is an existing host I don’t think you will need a kickstart repository.