Project

General

Profile

Bug #13104

CentOS minor version numbering issue - preventing build

Added by Michael Deffenbaugh over 2 years ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Unattended installations
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

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


Related issues

Related to Foreman - Bug #6884: Centos mirror in "Installation Media" doesn't work for versions without $minorClosed2014-08-01
Related to Foreman - Bug #17193: Duplicated OS (CentOS) detectionNew2016-11-03
Related to Foreman - Bug #17335: puppet_fact_parser.rb does not correctly add hosts facts whos minor number does not exist or is emptyClosed2016-11-15

Associated revisions

Revision af6d54a3 (diff)
Added by Tomer Brisker almost 2 years ago

Fixes #14545, #13104 - Correctly parse y.z minor OS versions

Some OSes use y.z minor version, for example CentOS uses versions such
as 7.2.1511. Currently, the puppet fact parser will only take the 'y'
part of the version, 2 in this case, which can lead to conflicts if the
OS has been defined manually with the 2.1511 minor version (as the
description will still contain the entire version).

Revision 30d2545a (diff)
Added by Tomer Brisker almost 2 years ago

Fixes #14545, #13104 - Correctly parse y.z minor OS versions

Some OSes use y.z minor version, for example CentOS uses versions such
as 7.2.1511. Currently, the puppet fact parser will only take the 'y'
part of the version, 2 in this case, which can lead to conflicts if the
OS has been defined manually with the 2.1511 minor version (as the
description will still contain the entire version).

(cherry picked from commit af6d54a3a184846f77f5fd7ca07bcdc7de70a264)

History

#1 Updated by Michael Deffenbaugh over 2 years ago

  • Related to Bug #6884: Centos mirror in "Installation Media" doesn't work for versions without $minor added

#2 Updated by Qiong Wu over 2 years ago

thats rather annoying, so currently I cant provision a CentOS 7 host from foreman correctly?

#3 Updated by Tomer Brisker almost 2 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Tomer Brisker
  • Pull request https://github.com/theforeman/foreman/pull/3836 added

#4 Updated by Anonymous almost 2 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#5 Updated by Dominic Cleal almost 2 years ago

  • Legacy Backlogs Release (now unused) set to 190

#6 Updated by Daniel Lobato Garcia almost 2 years ago

  • Target version set to 1.5.2

#7 Updated by Davide Ferrari almost 2 years ago

Hello

this fix "broke" my foreman 1.13 installation wrt OSes: after updating now I've duplicated CentOS versions

#8 Updated by Dominic Cleal almost 2 years ago

Please file a new issue with precise details of what's happening if you're experiencing a bug. This ticket is already merged and closed.

#9 Updated by Davide Ferrari almost 2 years ago

Let me explain: before our OSes were:

- CentOS Linux 7.1.1503
- CentOS Linux 7.2.1511

now with 1.13.1, with this fix implemented, there are 2 more OSes in addition:

- CentOS 7.1.1503
- CentOS 7.2.1511

obviously with no template associated, no disk layout, nothing. And about half of our machines switched to this new OSes and the other half stayed with the old (maybe something related to LSB not being installed on the machines that remained with the original version)

#10 Updated by Davide Ferrari almost 2 years ago

Ok, created #17193

#11 Updated by Davide Ferrari almost 2 years ago

  • Related to Bug #17193: Duplicated OS (CentOS) detection added

#12 Updated by Dominic Cleal over 1 year ago

  • Related to Bug #17335: puppet_fact_parser.rb does not correctly add hosts facts whos minor number does not exist or is empty added

Also available in: Atom PDF