Bug #6884

Centos mirror in "Installation Media" doesn't work for versions without $minor

Added by Jorick Astrego over 3 years ago. Updated almost 3 years ago.

Status:Closed
Priority:Low
Assigned To:Daniel Lobato Garcia
Category:Unattended installations
Target version:-
Difficulty: Bugzilla link:
Found in release: Pull request:https://github.com/theforeman/foreman/pull/2107
Story points-
Velocity based estimate-
Release1.7.3Release relationshipAuto

Description

http://mirror.centos.org/centos/$major.$minor/os/$arch, doesn't work for Centos 7 (or 6, or 5)

D, [2014-08-01T14:41:13.820310 #3745] DEBUG -- : Starting task (total: 0): /usr/bin/wget --timeout=10 --tries=3 --no-check-certificate -nv -c "http://mirror.centos.org/centos/7./os/x86_64/images/pxeboot/vmlinuz" -O "/var/lib/tftpboot/boot/Centos7-7-x86_64-vmlinuz" 
D, [2014-08-01T14:41:13.914386 #3745] DEBUG -- : Starting task (total: 0): /usr/bin/wget --timeout=10 --tries=3 --no-check-certificate -nv -c "http://mirror.centos.org/centos/7./os/x86_64/images/pxeboot/initrd.img" -O "/var/lib/tftpboot/boot/Centos7-7-x86_64-initrd.img" 
E, [2014-08-01T14:41:14.053902 #3745] ERROR -- : [4851] http://mirror.centos.org/centos/7./os/x86_64/images/pxeboot/vmlinuz:

E, [2014-08-01T14:41:14.054012 #3745] ERROR -- : [4851] 2014-08-01 14:41:14 ERROR 404: Not Found.

E, [2014-08-01T14:41:14.066278 #3745] ERROR -- : [5334] http://mirror.centos.org/centos/7./os/x86_64/images/pxeboot/initrd.img:

E, [2014-08-01T14:41:14.066342 #3745] ERROR -- : [5334] 2014-08-01 14:41:14 ERROR 404: Not Found.

So created a new Centos 7 mirror with:
http://mirror.centos.org/centos/$major/os/$arch

But there must be some cleaner way.


Related issues

Related to Foreman - Bug #10841: Foreman adds Operating systems no matter what Resolved 06/16/2015
Related to Foreman - Refactor #11019: Operatingsystem model limitations New 07/06/2015
Related to Foreman - Bug #13104: CentOS minor version numbering issue - preventing build Closed 01/10/2016

Associated revisions

Revision 7560679b
Added by Daniel Lobato Garcia about 3 years ago

Fixes #6884 - Installation media without $minor generate broken $version

$version is generated with the major version and a dot, producing paths
like foo.bar/x64/7. which don't exist. For CentOS at least we want to generate
a path without the dot. The default values for these media have been changed too.

Revision 33d3ee13
Added by Daniel Lobato Garcia almost 3 years ago

Fixes #6884 - Installation media without $minor generate broken $version

$version is generated with the major version and a dot, producing paths
like foo.bar/x64/7. which don't exist. For CentOS at least we want to generate
a path without the dot. The default values for these media have been changed too.

(cherry picked from commit 7560679b9849b0fc5c168d5047bd3469d719b45a)

Conflicts:
db/seeds.d/10-installation_media.rb

History

#1 Updated by Dominic Cleal over 3 years ago

  • Description updated (diff)
  • Category set to Unattended installations

#2 Updated by Marek Hulán over 3 years ago

Confirming, for some reason they don't have 7.0/ directory but either 7 or 7.0.1406 (see http://mirror.centos.org/centos/)

#3 Updated by Ronald van Zantvoort over 3 years ago

Wouldn't it be nicer to fill $release with "#{major}#{('.' + minor) unless minor.empty?}" (which is already in the code anyway, just disabled for RedHat family)?

#4 Updated by Pasi Karkkainen about 3 years ago

Ronald van Zantvoort wrote:

Wouldn't it be nicer to fill $release with "#{major}#{('.' + minor) unless minor.empty?}" (which is already in the code anyway, just disabled for RedHat family)?

Yes, indeed.

This bug is still a problem.. in a fresh install of Foreman 1.7.0 you still have the broken CentOS 7.0 install media url specified as a default.

#5 Updated by The Foreman Bot about 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2107 added

#6 Updated by Daniel Lobato Garcia about 3 years ago

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

#7 Updated by Dominic Cleal about 3 years ago

  • Assigned To set to Daniel Lobato Garcia
  • Release set to 1.8.0

#8 Updated by Mathieu Parent almost 3 years ago

Couldn't this be fixed in 1.7 too?

#9 Updated by Dominic Cleal almost 3 years ago

  • Release changed from 1.8.0 to 1.7.3

#10 Updated by Marek Hulán over 2 years ago

  • Related to Bug #10841: Foreman adds Operating systems no matter what added

#11 Updated by Dominic Cleal over 2 years ago

#12 Updated by Michael Deffenbaugh about 2 years ago

  • Related to Bug #13104: CentOS minor version numbering issue - preventing build added

Also available in: Atom PDF