Project

General

Profile

Actions

Bug #2342

closed

Installer doesn't recognize OracleLinux as an RHEL based distro

Added by Byron Miller over 11 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Difficulty:
trivial
Triaged:
Fixed in Releases:
Found in Releases:

Description

The Installer doesn't recognize OracleLinux as an RHEL based distro and won't install correctly. There are multiple warnings in several install.pp files and a bug in the Yum rep build that causes it to not see it as an "EL" based system.

Actions #1

Updated by Byron Miller over 11 years ago

/usr/share/foreman-installer/apache/manifests/install.php
/usr/share/foreman-installer/passenger/manifests/install.pp
/usr/share/foreman-installer/tftp/manifests/install.pp

and

/usr/share/foreman-installer/foreman/manifests/install/repos.pp

add

"OracleLinux" (case sensitive) to the $::operatingsystem case statement, or you may be able to switch to "osfamily" which facter sees as RedHat correctly for all redhat based systems (at least for the ones I have)

also need to change this file:

/usr/share/foreman-installer/foreman/spec/defines/foreman_install_repos_spec.rb

context 'on EL' do
let (:facts) do {
:operatingsystem => 'RedHat',
:operatingsystemrelease => '6.3'
}
end

to possibly

context 'on EL' do
let (:facts) do {
:osfamily => 'RedHat',
:operatingsystemrelease => '6.3'
}
end

facter output:
[root@puppet defines]# facter | grep RedHat
osfamily => RedHat

[root@puppet defines]# facter | grep operatingsystem
operatingsystem => OracleLinux
operatingsystemrelease => 6.4
[root@puppet defines]#

technically they should all be able to use osfamily should they not to simplify it so you don't need to edit them all?

I tried pulling the foreman git repo, but I couldn't make sense of where these files were. I'll study a bit more and learn some git to submit a patch if needbe and i'll look for other files that may need updating.

Actions #2

Updated by Byron Miller over 11 years ago

And I think lastly, this file

/usr/share/foreman-installer/foreman/manifests/params.pp

needs to be updated from

}
redhat,centos,Scientific: {
$puppet_basedir = "/usr/lib/ruby/site_ruby/${ruby_major}/puppet"
$apache_conf_dir = '/etc/httpd/conf.d'
$osmajor = regsubst($::operatingsystemrelease, '\..*', '')
$yumcode = "el${osmajor}"
}

to

}
redhat,OracleLinux,centos,Scientific: {
$puppet_basedir = "/usr/lib/ruby/site_ruby/${ruby_major}/puppet"
$apache_conf_dir = '/etc/httpd/conf.d'
$osmajor = regsubst($::operatingsystemrelease, '\..*', '')
$yumcode = "el${osmajor}"
}
Actions #3

Updated by Dominic Cleal over 11 years ago

  • Project changed from Foreman to Installer
Actions #4

Updated by Dominic Cleal over 11 years ago

Pull requests to the individual repos is probably the best way forward - you'll find them as puppet-foreman, puppet-apache etc under the GitHub org: https://github.com/theforeman/

I'd prefer to move to using $osfamily, but there's an issue that Debian Squeeze's version of Facter doesn't support it. Maybe we can include the $osfamily code from here: https://github.com/puppetlabs/puppetlabs-mysql#description

Actions #5

Updated by Byron Miller over 11 years ago

Is there any problem with putting that $osfamily code in the init.pp for each module? I see how the structure is now on github and can submit patches to do:

class apache {

if ! $::osfamily {
case $::operatingsystem {
'RedHat', 'Fedora', 'CentOS', 'Scientific', 'SLC', 'Ascendos', 'CloudLinux',
'PSBM', 'OracleLinux', 'OVS', 'OEL': {
$osfamily = 'RedHat'
}
'ubuntu', 'debian': {
$osfamily = 'Debian'
}
'SLES', 'SLED', 'OpenSuSE', 'SuSE': {
$osfamily = 'Suse'
}
'Solaris', 'Nexenta': {
$osfamily = 'Solaris'
}
default: {
$osfamily = $::operatingsystem
}
}
}
include apache::params
include apache::install
include apache::config
include apache::service
}

And

class apache::install {
case $::osfamily {
RedHat: {
$http_package = 'httpd'
}
Debian,Ubuntu: {
$http_package = 'apache2'
}
default: {
fail("${::hostname}: This module does not support operatingsystem ${::oper
atingsystem}")
}
}

Actions #6

Updated by Byron Miller over 11 years ago

Going to just update to use $::osfamily for the install.pp's and check that foreman-installer has right version level required to properly set osfmaily.

Actions #7

Updated by Dominic Cleal over 11 years ago

  • Status changed from New to Resolved
  • Target version set to 27

This was merged in across all modules, will be released as part of Foreman 1.2. Thanks for the patches!

Actions #8

Updated by Dominic Cleal over 11 years ago

  • Target version changed from 27 to 1.2.0
Actions #9

Updated by Greg Sutcliffe about 6 years ago

  • Target version deleted (1.2.0)
Actions

Also available in: Atom PDF