Fixes #37744: Line up Foreman and Katello registration data
Without the interface being created within Foreman, global registration with a REX interface selected failes on Katello instaces due to the interface not existing within Foreman. Operatingsystem ID is now also included in register_katello_host to ensure data parity between both workflows.
Test failures look unrelated as far as I can tell
I think the biggest reason there was some difference is that it uses subscription-manager to register the host. That already sends facts like the OS and interfaces.
Did you notice any problems or was it only to have the 2 blocks match?
Should have probably described it here in greater depth, too, but as described in the linked issue global registration does not work on Katello instances if you use the "Remote Execution Interface" parameter without sending at least the REX interface name. Now that I read your comment and thought about it in this context, this might be caused by us disabling inteface updates from facts? I did not experience any issues with the missing OS information.
Now that I read your comment and thought about it in this context, this might be caused by us disabling inteface updates from facts?
That sounds very plausible.
I did not experience any issues with the missing OS information.
We also have a setting to disable OS updating from facts. You probably have that turned on, right? I suspect that if that's turned off, you'd have the same problem.
I did not experience any issues with the missing OS information.
We also have a setting to disable OS updating from facts. You probably have that turned on, right? I suspect that if that's turned off, you'd have the same problem.
Indeed, we have turned that setting on for our instances. I did a bit of testing in our test instance and I could not get it to break, but what I saw looked more like "Ignore facts for operating system" setting to be broken rather than registration properly working without OS info. Despite not having an OS specified in the registration or on the hostgroup, the created host ended having the correct OS set in Foreman.