Bug #6006
closedOS facts should not overwrite the OS selected to provision with
Description
Migrated from https://github.com/theforeman/foreman/issues/1489
We setup a specific Operatingsystem, 'Ubuntu 12.04 + 3.2.0-59 kernel', and selected this OS in the hostgroup for machines that need this specific kernel.
We then built the hosts successfully.
Post-build, the Operatingsystem was set to 'Ubuntu 12.04.4 LTS'. This then caused a re-build of the system to fail, as the wrong kernel was installed.
I suspect the error is around line 47 in app/services/facts_parser.rb, as for our host, the os.description field is blank, because it is filled from the hostgroup. I am unclear on what a good fix for this is, but I will try and dig into more and produce a pull request, unless someone has an easy idea on it.
Another thought of mine is that facts collection should not overwrite fields that are critical to the provisioning process.