in relation to the RHEL 7.7 release we stumbled across the fact importer/parser for operating systems which resulted in missing relations on ~1000 of our hosts:
Imagine you have hosts using the RedHat 7Server release for packages (which in fact represent one specific minor release; e.g. 7.6). Now Red Hat publishes the next minor release (e.g. 7.7) and all the systems using 7Server will update to the latest packages (7.6 -> 7.7). On the next Puppet run, Foreman will see a new operating system release (now 7.7) and create the respective object using the Puppet fact parser (see here: https://github.com/theforeman/foreman/blob/develop/app/services/puppet_fact_parser.rb#L39).
Now we have a problem: the newly created operating system has no templates/ installation media/ partition tables and so on attached and all updated hosts loose their relation to these items. At least that’s what seems to be happening for us.
We would like to implement a workaround/fix for that. For example use the next lower minor release as a starting point for the newly created operating system.
What do you think about such an implementation? Do you have other ideas or recommendations?
Hello, this is the well known issue of Foreman mixing provisioning and reprted OS. We haven’t been able to come up with a good solution so far. There’s a global setting to disable OS creation/assignment based on facts. You could disable that and when you know there’s a new release, just clone existing OS, which should keep copy of the OS attributes.
First of all, I’m happy that I correctly predicted, that Marek will be the first to answer to this post. Cheers.
That’s why we wanted to start the discussion on this again.
Yeah, but that has some downsides as well. We’d rather spend development time to fix this properly.
That’s not possible, is it? Is there a clone option for the OSes?
I believe this is a new behavior. If I remember correctly, in previous versions the hosts did not lose their relation to the installation media and partition table. This is data we can not recover.
How about this:
We make the creation of the new OS models more intelligent. If a new minor version of an OS is created, the associations from the old version are copied. We can hide this behind a feature flag if this is something people might not want to have. I can’t think of a use case, where this would not be desired. Something like this.