Bug #13104
closedCentOS minor version numbering issue - preventing build
Description
Foreman is providing an incorrect installation media url to the unattended installer for CentOS installations.
Current Behavior:
Installation media URL:
http://mirror.example.com/centos/$version/os/$arch where it seems $version is evaluated at $major.$minor (as reported facter).
Related issue: #6884
Example OS: CentOS 7.2.1511
This causes problems with CentOS installs as facter reports $minor as "2", rather than "2.1511". The resulting URL does not exist on a CentOS Mirror:
http://mirror.example.com/centos/7.2/os/x86_64
Workaround - Create a sym-link in the mirror from 7.2 to 7.2.1511. This is only viable for administrators who run a mirror locally (or one they otherwise control).
Workaround 2 - change the installation URL to http://mirror.example.com/centos/$major/os/$arch. While this works, it will provision whatever the most recent release is, regardless of what was selected for the host.
Possible Solutions
1. Rather than manually creating the $version by concatenating $major and $minor, why not just map $version in the installation url the full version number as reported by factor?
Example factor OS hash pulled from foreman:
{"name"=>"CentOS", "family"=>"RedHat", "release"=>{"major"=>"7", "minor"=>"2", "full"=>"7.2.1511"}, "lsb"=>{"distcodename"=>"Core", "distid"=>"CentOS", "distdescription"=>"CentOS Linux release 7.2.1511 (Core) ", "release"=>":core-4.1-amd64:core-4.1-noarch", "distrelease"=>"7.2.1511", "majdistrelease"=>"7", "minordistrelease"=>"2"}}
1a) make this a separate field supported within the operating system definition menu in the Foreman UI - and have the value pulled from facter (fact os.release.full) rather than recalculating it internally in foreman
2) Make this an issue for facter; should $minor be reporting as $full less $major?
It should be noted, this is assuming some nodes all ready exist, and are reporting facts. Initially an Operating System could be defined just as
Major = 7
Minor = 2.1511
But the moment the first host reports in, Minor gets overwritten and provisioning stops working