Problem:
When registering a host to Foreman using an activation key I get the following error.
Validation failed: Medium must belong to hosts’s operating system, Ptable rhel-8-server-dynamic-xfs does not belong to RedHat 8.8 operating system, Medium rhel-8.8-x86_64-dvd-20230426 does not belong to RedHat 8.8 operating system (HTTP error code 422: Unprocessable Entity)
The Activation Key is named nagiosxi-8-latest.
The Host Group is named nagiosxi-8-latest which has a Partition Table named rhel-8-server-dynamic-xfs, an Operating System named rhel-8.8-x86_64-20230426, a Media named rhel-8.8-x86_64-dvd-20230426, and other settings.
If I register a host that is not listed in Hosts > All Hosts using the activation key it will register successfully.
If I kickstart a host it will register successfully.
The problem is between the time of registration and the next day (or sometimes hours later) the OS for the host will change automatically to the built-in default “RedHat 8.8”. This happens to all of the hosts I have registered.
It does the same for RedHat 6.x, RedHat 7.x, and RedHat 8.x. I do not have RedHat 9 hosts.
To fix it I have to manually change the Operating System from “RedHat 8.8” to rhel-8.8-x86_64-dvd-20230426 in the “Edit Host > Operating System tab” and then I can successfully reregister the host using the activation key.
Also note the Media and Partition Table in the host’s Operating System tab change too, however, the Organization, Location, Host Group, Lifecycle Environment, and Content View in the host’s Host tab remain the same.
Why do the Operating System, Media, and Partition Table change in the host’s Operating System tab automatically?
Expected outcome:
I expect the settings I set to not change.
Foreman and Proxy versions:
candlepin-4.3.1-1.el8.noarch
foreman-3.7.0-1.el8.noarch
foreman-postgresql-3.7.0-1.el8.noarch
foreman-proxy-3.7.0-1.el8.noarch
katello-4.9.1-1.el8.noarch
Foreman and Proxy plugin versions:
Distribution and version:
Red Hat Enterprise Liux release 8.8 (Ootpa)
4.18.0-477.21.1.el8_8.x86_64
Other relevant data: