summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Styk <mastyk@redhat.com>2020-02-26 16:45:54 +0100
committerMartin Styk <mastyk@redhat.com>2020-03-06 11:11:22 +0000
commite914077e7da311ddd9270f2f3f511fab00c1010f (patch)
tree96149e1e28faed05b7df68154755c23cf8096647
parent323cc84fcf085f1f2d25d26a036a45a4e1fea061 (diff)
remove support for RHEL3 and RHEL4
Change-Id: I071de9e1c85453583c05f64b903e9d950b225c80 Signed-off-by: Martin Styk <mastyk@redhat.com>
-rw-r--r--IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/.composeinfo3
-rw-r--r--IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/ftp-isos/.emptydir0
-rw-r--r--IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/repo-AS-i386/repodata/.emptyfile0
-rw-r--r--IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/repo-debug-AS-i386/repodata/.emptyfile0
-rw-r--r--IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/tree/.treeinfo10
-rw-r--r--IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/tree/images/pxeboot/initrd.img0
-rw-r--r--IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/tree/images/pxeboot/vmlinuz0
-rw-r--r--IntegrationTests/src/bkr/inttest/labcontroller/test_distro_import.py37
-rw-r--r--IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux3-scheduler-defaults.expected438
-rw-r--r--IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux4-scheduler-defaults.expected418
-rw-r--r--IntegrationTests/src/bkr/inttest/server/test_kickstart.py167
-rw-r--r--IntegrationTests/src/bkr/inttest/server/test_model.py6
-rw-r--r--Server/bkr/server/kickstarts/RedHatEnterpriseLinux385
-rw-r--r--Server/bkr/server/kickstarts/RedHatEnterpriseLinux495
-rw-r--r--Server/bkr/server/model/distrolibrary.py33
15 files changed, 34 insertions, 1258 deletions
diff --git a/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/.composeinfo b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/.composeinfo
deleted file mode 100644
index 1f13dc4..0000000
--- a/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/.composeinfo
+++ /dev/null
@@ -1,3 +0,0 @@
-[tree]
-arches = i386,x86_64
-name = RHEL4-U9
diff --git a/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/ftp-isos/.emptydir b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/ftp-isos/.emptydir
deleted file mode 100644
index e69de29..0000000
--- a/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/ftp-isos/.emptydir
+++ /dev/null
diff --git a/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/repo-AS-i386/repodata/.emptyfile b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/repo-AS-i386/repodata/.emptyfile
deleted file mode 100644
index e69de29..0000000
--- a/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/repo-AS-i386/repodata/.emptyfile
+++ /dev/null
diff --git a/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/repo-debug-AS-i386/repodata/.emptyfile b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/repo-debug-AS-i386/repodata/.emptyfile
deleted file mode 100644
index e69de29..0000000
--- a/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/repo-debug-AS-i386/repodata/.emptyfile
+++ /dev/null
diff --git a/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/tree/.treeinfo b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/tree/.treeinfo
deleted file mode 100644
index 64278b7..0000000
--- a/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/tree/.treeinfo
+++ /dev/null
@@ -1,10 +0,0 @@
-[general]
-family = Red Hat Enterprise Linux
-variant = AS
-label = RELEASED
-version = 4.9
-arch = i386
-
-[images-xen]
-kernel = images/xen/vmlinuz
-initrd = images/xen/initrd.img
diff --git a/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/tree/images/pxeboot/initrd.img b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/tree/images/pxeboot/initrd.img
deleted file mode 100644
index e69de29..0000000
--- a/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/tree/images/pxeboot/initrd.img
+++ /dev/null
diff --git a/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/tree/images/pxeboot/vmlinuz b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/tree/images/pxeboot/vmlinuz
deleted file mode 100644
index e69de29..0000000
--- a/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHEL-4/U9/AS/i386/tree/images/pxeboot/vmlinuz
+++ /dev/null
diff --git a/IntegrationTests/src/bkr/inttest/labcontroller/test_distro_import.py b/IntegrationTests/src/bkr/inttest/labcontroller/test_distro_import.py
index b4240e9..f757756 100644
--- a/IntegrationTests/src/bkr/inttest/labcontroller/test_distro_import.py
+++ b/IntegrationTests/src/bkr/inttest/labcontroller/test_distro_import.py
@@ -51,29 +51,6 @@ class DistroImportTest(LabControllerTestCase):
cls.distro_server.stop()
def setUp(self):
- self.i386_rhel4 = {u'arch': u'i386',
- u'arches': [],
- u'images': [{u'path': u'images/pxeboot/vmlinuz', u'type': u'kernel'},
- {u'path': u'images/pxeboot/initrd.img', u'type': u'initrd'}],
- u'kernel_options': None,
- u'kernel_options_post': None,
- u'ks_meta': None,
- u'name': u'RHEL4-U9',
- u'osmajor': u'RedHatEnterpriseLinux4',
- u'osminor': u'9',
- u'repos': [{u'path': u'../repo-debug-AS-i386',
- u'repoid': u'AS-debuginfo',
- u'type': u'debug'},
- {u'path': u'../repo-AS-i386',
- u'repoid': u'AS',
- u'type': u'variant'}],
- u'tree_build_time': 0.0,
- u'tags': [u'RELEASED'],
- u'urls': [u'nfs://fake.example.com:/nfs/RHEL-4/U9/AS/i386/tree/',
- u'http://localhost:19998/RHEL-4/U9/AS/i386/tree/',
- u'nfs+iso://fake.example.com:/nfs/RHEL-4/U9/AS/i386/ftp-isos/'],
- u'variant': u'AS'}
-
self.x86_64_rhel5 = {u'osmajor': u'RedHatEnterpriseLinuxServer5',
u'tree_build_time': u'1352937955.19',
u'name': u'RHEL5.9-Server-20121114.2',
@@ -487,7 +464,7 @@ class DistroImportTest(LabControllerTestCase):
u'name': u'RHEL-7.0-20130930.n.0',
u'osmajor': u'RedHatEnterpriseLinux7',
u'osminor': u'0',
- u'repos': [{u'path': u'addons/HighAvailability',
+ u'repos': [{u'path': u'addons/HighAvailability',
u'repoid': u'HighAvailability',
u'type': u'addon'},
{u'path': u'addons/LoadBalancer',
@@ -1245,12 +1222,6 @@ class DistroImportTest(LabControllerTestCase):
tree['tree_build_time'] = 1366007531.817827
self.assertEquals(tree, self.x86_64_rhel6_naked)
- def test_rhel4_tree_import_compose_with_iso(self):
- trees = self.dry_run_import_trees(
- ['nfs://fake.example.com:/nfs/RHEL-4/U9/AS',
- '%sRHEL-4/U9/AS/' % self.distro_url])
- self.assertItemsEqual(trees, [self.i386_rhel4])
-
def test_rhel5_tree_import_compose(self):
trees = self.dry_run_import_trees(['%sRHEL5-Server/' % self.distro_url])
self.assertItemsEqual(trees, [self.i386_rhel5, self.x86_64_rhel5])
@@ -1465,8 +1436,8 @@ class DistroImportTest(LabControllerTestCase):
# https://bugzilla.redhat.com/show_bug.cgi?id=1140995
def test_incomplete_compose(self):
- # We are importing a compose that is only selectively synced. Only
- # x86_64 Server should be imported, and missing add-on repos (SAP and
+ # We are importing a compose that is only selectively synced. Only
+ # x86_64 Server should be imported, and missing add-on repos (SAP and
# SAPHANA) should be skipped.
trees = self.dry_run_import_trees(['%sRHEL-6.6-incomplete' % self.distro_url,
'--ignore-missing-tree-compose'])
@@ -1474,7 +1445,7 @@ class DistroImportTest(LabControllerTestCase):
# https://bugzilla.redhat.com/show_bug.cgi?id=1140999
def test_tags_from_composeinfo(self):
- # At least some RHEL6.6 composes have a label in .composeinfo but not
+ # At least some RHEL6.6 composes have a label in .composeinfo but not
# .treeinfo (whether intentionally or not).
trees = self.dry_run_import_trees(['%sRHEL-6.6-incomplete' % self.distro_url,
'--ignore-missing-tree-compose'])
diff --git a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux3-scheduler-defaults.expected b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux3-scheduler-defaults.expected
deleted file mode 100644
index 1fc201e..0000000
--- a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux3-scheduler-defaults.expected
+++ /dev/null
@@ -1,438 +0,0 @@
-nfs --server lab.test-kickstart.invalid --dir /distros/RHEL-3/U9/AS/x86_64/tree/
-#url --url=nfs://lab.test-kickstart.invalid:/distros/RHEL-3/U9/AS/x86_64/tree/
-
-text
-# System bootloader configuration
-bootloader --location=mbr
-network --bootproto=dhcp --hostname=test01.test-kickstart.invalid
-firewall --disabled
-# Run the Setup Agent on first boot
-firstboot --disable
-# System keyboard
-keyboard us
-mouse none
-# System language
-lang en_US.UTF-8
-langsupport --default en_US.UTF-8 en_US.UTF-8
-
-reboot
-#Root password
-rootpw --iscrypted $1$beaker$yMeLK4p1IVkFa80RyTkpE.
-# System timezone
-timezone America/New_York
-# Install OS instead of upgrade
-install
-
-zerombr
-clearpart --all --initlabel
-
-autopart
-# no snippet data for RedHatEnterpriseLinux3
-# no snippet data for system
-
-%packages --resolvedeps --ignoremissing
-emacs
-sendmail
-unifdef
-vim-enhanced
-# no snippet data for packages
-
-
-
-%pre
-(
-PATH=/usr/bin:$PATH
-set -x
-# Some distros have curl in their minimal install set, others have wget.
-# We define a wrapper function around the best available implementation
-# so that the rest of the script can use that for making HTTP requests.
-if command -v curl >/dev/null ; then
- # Older curl versions lack --retry
- if curl --help 2>&1 | grep -q .*--retry ; then
- function fetch() {
- curl -L --retry 20 --remote-time -o "$1" "$2"
- }
- else
- function fetch() {
- curl -L --remote-time -o "$1" "$2"
- }
- fi
-elif command -v wget >/dev/null ; then
- # In Anaconda images wget is actually busybox
- if wget --help 2>&1 | grep -q BusyBox ; then
- function fetch() {
- wget -O "$1" "$2"
- }
- else
- function fetch() {
- wget --tries 20 -O "$1" "$2"
- }
- fi
-else
- echo "No HTTP client command available!"
- function fetch() {
- false
- }
-fi
-
-# Check in with Beaker Server
-fetch - http://lab.test-kickstart.invalid:8000/install_start/@RECIPEID@
-
-if command -v python3 >/dev/null ; then
- fetch /tmp/anamon http://lab.test-kickstart.invalid/beaker/anamon3
- python_command="python3"
-elif [ -f /usr/libexec/platform-python ] && \
- /usr/libexec/platform-python --version 2>&1 | grep -q "Python 3" ; then
- fetch /tmp/anamon http://lab.test-kickstart.invalid/beaker/anamon3
- python_command="/usr/libexec/platform-python"
-else
- fetch /tmp/anamon http://lab.test-kickstart.invalid/beaker/anamon
- python_command="python"
-fi
-$python_command /tmp/anamon --recipe-id @RECIPEID@ --xmlrpc-url 'http://lab.test-kickstart.invalid:8000/RPC2'
-# no snippet data for RedHatEnterpriseLinux3_pre
-# no snippet data for system_pre
-) 2>&1 | /usr/bin/tee /dev/console
-
-%post
-(
-PATH=/usr/bin:$PATH
-set -x
-# Some distros have curl in their minimal install set, others have wget.
-# We define a wrapper function around the best available implementation
-# so that the rest of the script can use that for making HTTP requests.
-if command -v curl >/dev/null ; then
- # Older curl versions lack --retry
- if curl --help 2>&1 | grep -q .*--retry ; then
- function fetch() {
- curl -L --retry 20 --remote-time -o "$1" "$2"
- }
- else
- function fetch() {
- curl -L --remote-time -o "$1" "$2"
- }
- fi
-elif command -v wget >/dev/null ; then
- # In Anaconda images wget is actually busybox
- if wget --help 2>&1 | grep -q BusyBox ; then
- function fetch() {
- wget -O "$1" "$2"
- }
- else
- function fetch() {
- wget --tries 20 -O "$1" "$2"
- }
- fi
-else
- echo "No HTTP client command available!"
- function fetch() {
- false
- }
-fi
-
-# Check in with Beaker Server, let it know our hostname, and
-# record our install time.
-
-# We will try a number of different places to figure out the system's FQDN.
-# In all cases we will only accept a real FQDN (no "localhost", and must have
-# a domain portion). DNS is our preferred source, otherwise the installer
-# should have stored a hostname in /etc based on the kickstart or DHCP info.
-# As a last resort we will use the system's first IP address.
-function find_fqdn() {
- local fqdn=
- # hostname -f is the most future-proof approach, but it isn't always reliable
- fqdn=$(hostname -f)
- if [[ "$fqdn" == *.* && "$fqdn" != localhost.* ]] ; then echo "$fqdn" ; return ; fi
- # Preferred fallback if the OS is recent enough to provide it
- fqdn=$(cat /etc/hostname)
- if [[ "$fqdn" == *.* && "$fqdn" != localhost.* ]] ; then echo "$fqdn" ; return ; fi
- # Red Hat-based systems prior to systemd will have this
- fqdn=$(grep ^HOSTNAME= /etc/sysconfig/network | cut -f2- -d=)
- if [[ "$fqdn" == *.* && "$fqdn" != localhost.* ]] ; then echo "$fqdn" ; return ; fi
- # Getting desperate... pick the first local IP address
- ipaddr=$(hostname -i)
- if [[ "$ipaddr" != "127.0.0.1" ]] ; then echo "$ipaddr" ; return ; fi
- # Getting even more desperate (RHEL5 and earlier)
- ip addr show | grep -v ' lo' | grep -Po '(?<=inet )[0-9.]+'
-}
-REPORTED_FQDN=$(find_fqdn)
-fetch - "http://lab.test-kickstart.invalid:8000/install_done/@RECIPEID@/$REPORTED_FQDN"
-fetch - http://lab.test-kickstart.invalid:8000/nopxe/test01.test-kickstart.invalid
-echo @RECIPEID@ > /root/RECIPE.TXT
-
-# If netboot_method= is found in /proc/cmdline record it to /root
-netboot_method=$(grep -oP "(?<=netboot_method=)[^\s]+(?=)" /proc/cmdline)
-if [ -n "$netboot_method" ]; then
-echo $netboot_method >/root/NETBOOT_METHOD.TXT
-fi
-
-# Enable post-install boot notification
-
-if command -v python3 >/dev/null ; then
- fetch /usr/local/sbin/anamon http://lab.test-kickstart.invalid/beaker/anamon3
-elif [ -f /usr/libexec/platform-python ] && \
- /usr/libexec/platform-python --version 2>&1 | grep -q "Python 3" ; then
- fetch /usr/local/sbin/anamon http://lab.test-kickstart.invalid/beaker/anamon3
- sed -i 's/#!\/usr\/bin\/python3/#!\/usr\/libexec\/platform-python/' /usr/local/sbin/anamon
-else
- fetch /usr/local/sbin/anamon http://lab.test-kickstart.invalid/beaker/anamon
-fi
-chmod 755 /usr/local/sbin/anamon
-
-# OS without `initscripts` need to use systemd
-if [ -e /etc/init.d/functions ]; then
- fetch /etc/rc.d/init.d/anamon http://lab.test-kickstart.invalid/beaker/anamon.init
-
- chmod 755 /etc/rc.d/init.d/anamon
- if selinuxenabled &>/dev/null ; then
- restorecon /etc/rc.d/init.d/anamon /usr/local/sbin/anamon
- fi
-
- chkconfig --add anamon
-else
- fetch /etc/systemd/system/anamon.service http://lab.test-kickstart.invalid/beaker/anamon.service
- systemctl enable anamon
-fi
-
-cat << __EOT__ > /etc/sysconfig/anamon
-XMLRPC_URL="http://lab.test-kickstart.invalid:8000/RPC2"
-RECIPE_ID="@RECIPEID@"
-LOGFILES="/var/log/boot.log /var/log/messages /var/log/dmesg"
-__EOT__
-
-if [ -f /etc/sysconfig/readahead ] ; then
- :
- cat >>/etc/sysconfig/readahead <<EOF
-
-# readahead conflicts with auditd, see bug 561486 for detailed explanation.
-#
-# Should a task need to change these settings, it must revert to this state
-# when test is done.
-
-READAHEAD_COLLECT="no"
-READAHEAD_COLLECT_ON_RPM="no"
-EOF
-fi
-
-if [ -e /etc/sysconfig/ntpdate ] ; then
- chkconfig ntpdate on
-fi
-if [ -e "/etc/sysconfig/ntpd" ]; then
- chkconfig ntpd on
- GOT_G=$(/bin/cat /etc/sysconfig/ntpd | grep -E '^OPTIONS' | grep '\-g')
-
- if [ -z "$GOT_G" ]; then
- /bin/sed -i -r 's/(^OPTIONS\s*=\s*)(['\''|"])(.+)$/\1\2\-x \3 /' /etc/sysconfig/ntpd
- fi
-fi
-if [ -e /etc/chrony.conf ] ; then
- cp /etc/chrony.conf{,.orig}
- # use only DHCP-provided time servers, no default pool servers
- sed -i '/^server /d' /etc/chrony.conf
- cp /etc/sysconfig/network{,.orig}
- # setting iburst should speed up initial sync
- # https://bugzilla.redhat.com/show_bug.cgi?id=787042#c12
- echo NTPSERVERARGS=iburst >>/etc/sysconfig/network
- chkconfig ntpd off
- chkconfig ntpdate off
- chkconfig chronyd on
-fi
-
-if efibootmgr &>/dev/null ; then
- # The installer should have added a new boot entry for the OS
- # at the top of the boot order. We move it to the end of the order
- # and set it as BootNext instead.
- boot_order=$(efibootmgr | awk '/BootOrder/ { print $2 }')
- os_boot_entry=$(cut -d, -f1 <<<"$boot_order")
- new_boot_order=$(cut -d, -f2- <<<"$boot_order"),"$os_boot_entry"
- efibootmgr -o "$new_boot_order"
- efibootmgr -n "$os_boot_entry"
- # save the boot entry for later, so that rhts-reboot can set BootNext as well
- echo "$os_boot_entry" >/root/EFI_BOOT_ENTRY.TXT
-fi
-
-# Install Yum
-pushd /root
-fetch yum-2.2.2-1.rhts.EL3.noarch.rpm http://lab.test-kickstart.invalid/beaker/yum-2.2.2-1.rhts.EL3.noarch.rpm
-/bin/rpm -Uvh yum-2.2.2-1.rhts.EL3.noarch.rpm
-popd
-
-#Add Task Repo
-cat <<"EOF" >/etc/yum.repos.d/beaker-tasks.repo
-[beaker-tasks]
-name=beaker-tasks
-baseurl=@REPOS@@RECIPEID@
-enabled=1
-gpgcheck=0
-EOF
-
-
-# Add Harness Repo
-cat <<"EOF" >/etc/yum.repos.d/beaker-harness.repo
-[beaker-harness]
-name=beaker-harness
-baseurl=@HARNESS@RedHatEnterpriseLinux3/
-enabled=1
-gpgcheck=0
-EOF
-
-# Add distro and custom Repos
-cat <<"EOF" >/etc/yum.repos.d/beaker-repo-debug-AS-x86_64.repo
-[beaker-repo-debug-AS-x86_64]
-name=beaker-repo-debug-AS-x86_64
-baseurl=http://lab.test-kickstart.invalid/distros/RHEL-3/U9/AS/x86_64/repo-debug-AS-x86_64
-enabled=1
-gpgcheck=0
-skip_if_unavailable=1
-EOF
-cat <<"EOF" >/etc/yum.repos.d/beaker-repo-AS-x86_64.repo
-[beaker-repo-AS-x86_64]
-name=beaker-repo-AS-x86_64
-baseurl=http://lab.test-kickstart.invalid/distros/RHEL-3/U9/AS/x86_64/repo-AS-x86_64
-enabled=1
-gpgcheck=0
-skip_if_unavailable=1
-EOF
-cat <<"EOF" >/etc/yum.repos.d/beaker-repo-srpm-AS-x86_64.repo
-[beaker-repo-srpm-AS-x86_64]
-name=beaker-repo-srpm-AS-x86_64
-baseurl=http://lab.test-kickstart.invalid/distros/RHEL-3/U9/AS/x86_64/repo-srpm-AS-x86_64
-enabled=1
-gpgcheck=0
-skip_if_unavailable=1
-EOF
-
-
-if command -v dnf >/dev/null ; then
- package_command="dnf"
-else
- package_command="yum"
-fi
-# fill the yum cache and redirect output to /dev/null
-# This speeds up yum because of a bug where it will update stdout too often.
-# http://lists.baseurl.org/pipermail/yum-devel/2011-December/008857.html
-$package_command check-update > /dev/null 2>&1 || true
-if command -v dnf >/dev/null ; then
- package_command="dnf"
-else
- package_command="yum"
-fi
-$package_command -d 1 -y install beah rhts-test-env
-$package_command -d 1 -y install beakerlib
-# This may fail if you are outside of Red Hat..
-$package_command -d 1 -y install beakerlib-redhat
-
-cp /etc/beah_beaker.conf{,.default}
-cat << EOF > /etc/beah_beaker.conf
-# see /etc/beah_beaker.conf.default for commented configuration
-
-[DEFAULT]
-# LAB_CONTROLLER: URI of Beaker's XML-RPC handler
-LAB_CONTROLLER=http://lab.test-kickstart.invalid:8000
-#
-# HOSTNAME: Pretend to be machine with given name.
-# NOTE: This is mostly pointless as usually correct name is assigned by DHCP.
-HOSTNAME=test01.test-kickstart.invalid
-RECIPEID=@RECIPEID@
-
-# Turn on hard limits on upload sizes:
-FILE_SIZE_LIMIT=200000000
-TASK_SIZE_LIMIT=800000000
-
-EOF
-
-cp /etc/beah.conf{,.default}
-cat << EOF > /etc/beah.conf
-# see /etc/beah.conf.default for commented configuration
-
-[DEFAULT]
-# Turn on more verbose logging. This is useful for debugging harness' problems.
-LOG=Info
-# Also send logs to /dev/console.
-CONSOLE_LOG=Console
-# To turn on debug logging uncomment the following line. Warning: this is
-# rather verbose! This also requires LOG to be Debug.
-#DEVEL=True
-
-[TASK]
-INTERFACE=
-
-EOF
-
-chkconfig --level 345 beah-srv on
-chkconfig --level 345 beah-beaker-backend on
-chkconfig --level 345 beah-fwd-backend on
-
-# turn on rhts-compat by default (it will save us one reboot):
-chkconfig --add rhts-compat
-chkconfig --level 345 rhts-compat on
-
-#Add test user account
-useradd --password '$6$oIW3o2Mr$XbWZKaM7nA.cQqudfDJScupXOia5h1u517t6Htx/Q/MgXm82Pc/OcytatTeI4ULNWOMJzvpCigWiL4xKP9PX4.' test
-cat <<"EOF" >/etc/profile.d/beaker.sh
-export BEAKER="@BEAKER@"
-export BEAKER_JOB_WHITEBOARD=''
-export BEAKER_RECIPE_WHITEBOARD=''
-EOF
-cat <<"EOF" >/etc/profile.d/beaker.csh
-setenv BEAKER "@BEAKER@"
-setenv BEAKER_JOB_WHITEBOARD ''
-setenv BEAKER_RECIPE_WHITEBOARD ''
-EOF
-
-cat << EOF > /etc/profile.d/rh-env.sh
-export LAB_CONTROLLER=lab.test-kickstart.invalid
-export DUMPSERVER=netdump.test-kickstart.invalid
-export NFSSERVERS="RHEL3,rhel3-nfs.test-kickstart.invalid:/export/home RHEL4,rhel4-nfs.test-kickstart.invalid:/export/home RHEL5,rhel5-nfs.test-kickstart.invalid:/export/home RHEL6,rhel6-nfs.test-kickstart.invalid:/export/home NETAPP, SOLARIS,"
-export LOOKASIDE=http://download.test-kickstart.invalid/lookaside/
-export BUILDURL=http://download.test-kickstart.invalid
-EOF
-cat << EOF > /etc/profile.d/rh-env.csh
-setenv LAB_CONTROLLER lab.test-kickstart.invalid
-setenv DUMPSERVER netdump.test-kickstart.invalid
-setenv NFSSERVERS "RHEL3,rhel3-nfs.test-kickstart.invalid:/export/home RHEL4,rhel4-nfs.test-kickstart.invalid:/export/home RHEL5,rhel5-nfs.test-kickstart.invalid:/export/home RHEL6,rhel6-nfs.test-kickstart.invalid:/export/home NETAPP, SOLARIS,"
-setenv LOOKASIDE http://download.test-kickstart.invalid/lookaside/
-setenv BUILDURL http://download.test-kickstart.invalid
-EOF
-# no snippet data for RedHatEnterpriseLinux3_post
-# no snippet data for system_post
-) 2>&1 | /usr/bin/tee /dev/console
-
-
-%post
-set -x
-# Some distros have curl in their minimal install set, others have wget.
-# We define a wrapper function around the best available implementation
-# so that the rest of the script can use that for making HTTP requests.
-if command -v curl >/dev/null ; then
- # Older curl versions lack --retry
- if curl --help 2>&1 | grep -q .*--retry ; then
- function fetch() {
- curl -L --retry 20 --remote-time -o "$1" "$2"
- }
- else
- function fetch() {
- curl -L --remote-time -o "$1" "$2"
- }
- fi
-elif command -v wget >/dev/null ; then
- # In Anaconda images wget is actually busybox
- if wget --help 2>&1 | grep -q BusyBox ; then
- function fetch() {
- wget -O "$1" "$2"
- }
- else
- function fetch() {
- wget --tries 20 -O "$1" "$2"
- }
- fi
-else
- echo "No HTTP client command available!"
- function fetch() {
- false
- }
-fi
-# Check in with Beaker Server, record our postinstall time.
-fetch - http://lab.test-kickstart.invalid:8000/postinstall_done/@RECIPEID@
-# Give anamon a chance to finish collecting logs.
-sleep 10
diff --git a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux4-scheduler-defaults.expected b/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux4-scheduler-defaults.expected
deleted file mode 100644
index aadb924..0000000
--- a/IntegrationTests/src/bkr/inttest/server/kickstarts/RedHatEnterpriseLinux4-scheduler-defaults.expected
+++ /dev/null
@@ -1,418 +0,0 @@
-nfs --server lab.test-kickstart.invalid --dir /distros/RHEL-4/U9/AS/x86_64/tree/
-#url --url=nfs://lab.test-kickstart.invalid:/distros/RHEL-4/U9/AS/x86_64/tree/
-
-
-# System bootloader configuration
-bootloader --location=mbr
-network --bootproto=dhcp --hostname=test01.test-kickstart.invalid
-firewall --disabled
-# System keyboard
-keyboard us
-# System language
-lang en_US.UTF-8
-langsupport --default en_US.UTF-8 en_US.UTF-8
-
-reboot
-#Root password
-rootpw --iscrypted $1$beaker$yMeLK4p1IVkFa80RyTkpE.
-# SELinux configuration
-selinux --enforcing
-
-
-# System timezone
-timezone America/New_York
-# Install OS instead of upgrade
-install
-
-zerombr
-clearpart --all --initlabel
-
-autopart
-# no snippet data for RedHatEnterpriseLinux4
-# no snippet data for system
-
-%packages --resolvedeps --ignoremissing
-emacs
-sendmail
-unifdef
-vim-enhanced
-# no snippet data for packages
-
-
-
-%pre --log=/dev/console
-set -x
-# Some distros have curl in their minimal install set, others have wget.
-# We define a wrapper function around the best available implementation
-# so that the rest of the script can use that for making HTTP requests.
-if command -v curl >/dev/null ; then
- # Older curl versions lack --retry
- if curl --help 2>&1 | grep -q .*--retry ; then
- function fetch() {
- curl -L --retry 20 --remote-time -o "$1" "$2"
- }
- else
- function fetch() {
- curl -L --remote-time -o "$1" "$2"
- }
- fi
-elif command -v wget >/dev/null ; then
- # In Anaconda images wget is actually busybox
- if wget --help 2>&1 | grep -q BusyBox ; then
- function fetch() {
- wget -O "$1" "$2"
- }
- else
- function fetch() {
- wget --tries 20 -O "$1" "$2"
- }
- fi
-else
- echo "No HTTP client command available!"
- function fetch() {
- false
- }
-fi
-
-# Check in with Beaker Server
-fetch - http://lab.test-kickstart.invalid:8000/install_start/@RECIPEID@
-
-if command -v python3 >/dev/null ; then
- fetch /tmp/anamon http://lab.test-kickstart.invalid/beaker/anamon3
- python_command="python3"
-elif [ -f /usr/libexec/platform-python ] && \
- /usr/libexec/platform-python --version 2>&1 | grep -q "Python 3" ; then
- fetch /tmp/anamon http://lab.test-kickstart.invalid/beaker/anamon3
- python_command="/usr/libexec/platform-python"
-else
- fetch /tmp/anamon http://lab.test-kickstart.invalid/beaker/anamon
- python_command="python"
-fi
-$python_command /tmp/anamon --recipe-id @RECIPEID@ --xmlrpc-url 'http://lab.test-kickstart.invalid:8000/RPC2'
-# no snippet data for RedHatEnterpriseLinux4_pre
-# no snippet data for system_pre
-
-%post --log=/dev/console
-set -x
-# Some distros have curl in their minimal install set, others have wget.
-# We define a wrapper function around the best available implementation
-# so that the rest of the script can use that for making HTTP requests.
-if command -v curl >/dev/null ; then
- # Older curl versions lack --retry
- if curl --help 2>&1 | grep -q .*--retry ; then
- function fetch() {
- curl -L --retry 20 --remote-time -o "$1" "$2"
- }
- else
- function fetch() {
- curl -L --remote-time -o "$1" "$2"
- }
- fi
-elif command -v wget >/dev/null ; then
- # In Anaconda images wget is actually busybox
- if wget --help 2>&1 | grep -q BusyBox ; then
- function fetch() {
- wget -O "$1" "$2"
- }
- else
- function fetch() {
- wget --tries 20 -O "$1" "$2"
- }
- fi
-else
- echo "No HTTP client command available!"
- function fetch() {
- false
- }
-fi
-
-# Check in with Beaker Server, let it know our hostname, and
-# record our install time.
-
-# We will try a number of different places to figure out the system's FQDN.
-# In all cases we will only accept a real FQDN (no "localhost", and must have
-# a domain portion). DNS is our preferred source, otherwise the installer
-# should have stored a hostname in /etc based on the kickstart or DHCP info.
-# As a last resort we will use the system's first IP address.
-function find_fqdn() {
- local fqdn=
- # hostname -f is the most future-proof approach, but it isn't always reliable
- fqdn=$(hostname -f)
- if [[ "$fqdn" == *.* && "$fqdn" != localhost.* ]] ; then echo "$fqdn" ; return ; fi
- # Preferred fallback if the OS is recent enough to provide it
- fqdn=$(cat /etc/hostname)
- if [[ "$fqdn" == *.* && "$fqdn" != localhost.* ]] ; then echo "$fqdn" ; return ; fi
- # Red Hat-based systems prior to systemd will have this
- fqdn=$(grep ^HOSTNAME= /etc/sysconfig/network | cut -f2- -d=)
- if [[ "$fqdn" == *.* && "$fqdn" != localhost.* ]] ; then echo "$fqdn" ; return ; fi
- # Getting desperate... pick the first local IP address
- ipaddr=$(hostname -i)
- if [[ "$ipaddr" != "127.0.0.1" ]] ; then echo "$ipaddr" ; return ; fi
- # Getting even more desperate (RHEL5 and earlier)
- ip addr show | grep -v ' lo' | grep -Po '(?<=inet )[0-9.]+'
-}
-REPORTED_FQDN=$(find_fqdn)
-fetch - "http://lab.test-kickstart.invalid:8000/install_done/@RECIPEID@/$REPORTED_FQDN"
-fetch - http://lab.test-kickstart.invalid:8000/nopxe/test01.test-kickstart.invalid
-echo @RECIPEID@ > /root/RECIPE.TXT
-
-# If netboot_method= is found in /proc/cmdline record it to /root
-netboot_method=$(grep -oP "(?<=netboot_method=)[^\s]+(?=)" /proc/cmdline)
-if [ -n "$netboot_method" ]; then
-echo $netboot_method >/root/NETBOOT_METHOD.TXT
-fi
-
-# Enable post-install boot notification
-
-if command -v python3 >/dev/null ; then
- fetch /usr/local/sbin/anamon http://lab.test-kickstart.invalid/beaker/anamon3
-elif [ -f /usr/libexec/platform-python ] && \
- /usr/libexec/platform-python --version 2>&1 | grep -q "Python 3" ; then
- fetch /usr/local/sbin/anamon http://lab.test-kickstart.invalid/beaker/anamon3
- sed -i 's/#!\/usr\/bin\/python3/#!\/usr\/libexec\/platform-python/' /usr/local/sbin/anamon
-else
- fetch /usr/local/sbin/anamon http://lab.test-kickstart.invalid/beaker/anamon
-fi
-chmod 755 /usr/local/sbin/anamon
-
-# OS without `initscripts` need to use systemd
-if [ -e /etc/init.d/functions ]; then
- fetch /etc/rc.d/init.d/anamon http://lab.test-kickstart.invalid/beaker/anamon.init
-
- chmod 755 /etc/rc.d/init.d/anamon
- if selinuxenabled &>/dev/null ; then
- restorecon /etc/rc.d/init.d/anamon /usr/local/sbin/anamon
- fi
-
- chkconfig --add anamon
-else
- fetch /etc/systemd/system/anamon.service http://lab.test-kickstart.invalid/beaker/anamon.service
- systemctl enable anamon
-fi
-
-cat << __EOT__ > /etc/sysconfig/anamon
-XMLRPC_URL="http://lab.test-kickstart.invalid:8000/RPC2"
-RECIPE_ID="@RECIPEID@"
-LOGFILES="/var/log/boot.log /var/log/messages /var/log/dmesg"
-__EOT__
-
-if [ -f /etc/sysconfig/readahead ] ; then
- :
- cat >>/etc/sysconfig/readahead <<EOF
-
-# readahead conflicts with auditd, see bug 561486 for detailed explanation.
-#
-# Should a task need to change these settings, it must revert to this state
-# when test is done.
-
-READAHEAD_COLLECT="no"
-READAHEAD_COLLECT_ON_RPM="no"
-EOF
-fi
-
-if [ -e /etc/sysconfig/ntpdate ] ; then
- chkconfig ntpdate on
-fi
-if [ -e "/etc/sysconfig/ntpd" ]; then
- chkconfig ntpd on
- GOT_G=$(/bin/cat /etc/sysconfig/ntpd | grep -E '^OPTIONS' | grep '\-g')
-
- if [ -z "$GOT_G" ]; then
- /bin/sed -i -r 's/(^OPTIONS\s*=\s*)(['\''|"])(.+)$/\1\2\-x \3 /' /etc/sysconfig/ntpd
- fi
-fi
-if [ -e /etc/chrony.conf ] ; then
- cp /etc/chrony.conf{,.orig}
- # use only DHCP-provided time servers, no default pool servers
- sed -i '/^server /d' /etc/chrony.conf
- cp /etc/sysconfig/network{,.orig}
- # setting iburst should speed up initial sync
- # https://bugzilla.redhat.com/show_bug.cgi?id=787042#c12
- echo NTPSERVERARGS=iburst >>/etc/sysconfig/network
- chkconfig ntpd off
- chkconfig ntpdate off
- chkconfig chronyd on
-fi
-
-if efibootmgr &>/dev/null ; then
- # The installer should have added a new boot entry for the OS
- # at the top of the boot order. We move it to the end of the order
- # and set it as BootNext instead.
- boot_order=$(efibootmgr | awk '/BootOrder/ { print $2 }')
- os_boot_entry=$(cut -d, -f1 <<<"$boot_order")
- new_boot_order=$(cut -d, -f2- <<<"$boot_order"),"$os_boot_entry"
- efibootmgr -o "$new_boot_order"
- efibootmgr -n "$os_boot_entry"
- # save the boot entry for later, so that rhts-reboot can set BootNext as well
- echo "$os_boot_entry" >/root/EFI_BOOT_ENTRY.TXT
-fi
-
-# Install Yum
-pushd /root
-fetch yum-2.2.2-1.rhts.EL4.noarch.rpm http://lab.test-kickstart.invalid/beaker/yum-2.2.2-1.rhts.EL4.noarch.rpm
-/bin/rpm -Uvh yum-2.2.2-1.rhts.EL4.noarch.rpm
-popd
-
-#Add Task Repo
-cat <<"EOF" >/etc/yum.repos.d/beaker-tasks.repo
-[beaker-tasks]
-name=beaker-tasks
-baseurl=@REPOS@@RECIPEID@
-enabled=1
-gpgcheck=0
-EOF
-
-
-# Add Harness Repo
-cat <<"EOF" >/etc/yum.repos.d/beaker-harness.repo
-[beaker-harness]
-name=beaker-harness
-baseurl=@HARNESS@RedHatEnterpriseLinux4/
-enabled=1
-gpgcheck=0
-EOF
-
-# Add distro and custom Repos
-cat <<"EOF" >/etc/yum.repos.d/beaker-AS.repo
-[beaker-AS]
-name=beaker-AS
-baseurl=http://lab.test-kickstart.invalid/distros/RHEL-4/U9/AS/x86_64/repo-AS-x86_64
-enabled=1
-gpgcheck=0
-skip_if_unavailable=1
-EOF
-
-
-if command -v dnf >/dev/null ; then
- package_command="dnf"
-else
- package_command="yum"
-fi
-# fill the yum cache and redirect output to /dev/null
-# This speeds up yum because of a bug where it will update stdout too often.
-# http://lists.baseurl.org/pipermail/yum-devel/2011-December/008857.html
-$package_command check-update > /dev/null 2>&1 || true
-if command -v dnf >/dev/null ; then
- package_command="dnf"
-else
- package_command="yum"
-fi
-$package_command -d 1 -y install beah rhts-test-env
-$package_command -d 1 -y install beakerlib
-# This may fail if you are outside of Red Hat..
-$package_command -d 1 -y install beakerlib-redhat
-
-cp /etc/beah_beaker.conf{,.default}
-cat << EOF > /etc/beah_beaker.conf
-# see /etc/beah_beaker.conf.default for commented configuration
-
-[DEFAULT]
-# LAB_CONTROLLER: URI of Beaker's XML-RPC handler
-LAB_CONTROLLER=http://lab.test-kickstart.invalid:8000
-#
-# HOSTNAME: Pretend to be machine with given name.
-# NOTE: This is mostly pointless as usually correct name is assigned by DHCP.
-HOSTNAME=test01.test-kickstart.invalid
-RECIPEID=@RECIPEID@
-
-# Turn on hard limits on upload sizes:
-FILE_SIZE_LIMIT=200000000
-TASK_SIZE_LIMIT=800000000
-
-EOF
-
-cp /etc/beah.conf{,.default}
-cat << EOF > /etc/beah.conf
-# see /etc/beah.conf.default for commented configuration
-
-[DEFAULT]
-# Turn on more verbose logging. This is useful for debugging harness' problems.
-LOG=Info
-# Also send logs to /dev/console.
-CONSOLE_LOG=Console
-# To turn on debug logging uncomment the following line. Warning: this is
-# rather verbose! This also requires LOG to be Debug.
-#DEVEL=True
-
-[TASK]
-INTERFACE=
-
-EOF
-
-chkconfig --level 345 beah-srv on
-chkconfig --level 345 beah-beaker-backend on
-chkconfig --level 345 beah-fwd-backend on
-
-# turn on rhts-compat by default (it will save us one reboot):
-chkconfig --add rhts-compat
-chkconfig --level 345 rhts-compat on
-
-#Add test user account
-useradd --password '$6$oIW3o2Mr$XbWZKaM7nA.cQqudfDJScupXOia5h1u517t6Htx/Q/MgXm82Pc/OcytatTeI4ULNWOMJzvpCigWiL4xKP9PX4.' test
-cat <<"EOF" >/etc/profile.d/beaker.sh
-export BEAKER="@BEAKER@"
-export BEAKER_JOB_WHITEBOARD=''
-export BEAKER_RECIPE_WHITEBOARD=''
-EOF
-cat <<"EOF" >/etc/profile.d/beaker.csh
-setenv BEAKER "@BEAKER@"
-setenv BEAKER_JOB_WHITEBOARD ''
-setenv BEAKER_RECIPE_WHITEBOARD ''
-EOF
-
-cat << EOF > /etc/profile.d/rh-env.sh
-export LAB_CONTROLLER=lab.test-kickstart.invalid
-export DUMPSERVER=netdump.test-kickstart.invalid
-export NFSSERVERS="RHEL3,rhel3-nfs.test-kickstart.invalid:/export/home RHEL4,rhel4-nfs.test-kickstart.invalid:/export/home RHEL5,rhel5-nfs.test-kickstart.invalid:/export/home RHEL6,rhel6-nfs.test-kickstart.invalid:/export/home NETAPP, SOLARIS,"
-export LOOKASIDE=http://download.test-kickstart.invalid/lookaside/
-export BUILDURL=http://download.test-kickstart.invalid
-EOF
-cat << EOF > /etc/profile.d/rh-env.csh
-setenv LAB_CONTROLLER lab.test-kickstart.invalid
-setenv DUMPSERVER netdump.test-kickstart.invalid
-setenv NFSSERVERS "RHEL3,rhel3-nfs.test-kickstart.invalid:/export/home RHEL4,rhel4-nfs.test-kickstart.invalid:/export/home RHEL5,rhel5-nfs.test-kickstart.invalid:/export/home RHEL6,rhel6-nfs.test-kickstart.invalid:/export/home NETAPP, SOLARIS,"
-setenv LOOKASIDE http://download.test-kickstart.invalid/lookaside/
-setenv BUILDURL http://download.test-kickstart.invalid
-EOF
-# no snippet data for RedHatEnterpriseLinux4_post
-# no snippet data for system_post
-
-
-
-%post
-set -x
-# Some distros have curl in their minimal install set, others have wget.
-# We define a wrapper function around the best available implementation
-# so that the rest of the script can use that for making HTTP requests.
-if command -v curl >/dev/null ; then
- # Older curl versions lack --retry
- if curl --help 2>&1 | grep -q .*--retry ; then
- function fetch() {
- curl -L --retry 20 --remote-time -o "$1" "$2"
- }
- else
- function fetch() {
- curl -L --remote-time -o "$1" "$2"
- }
- fi
-elif command -v wget >/dev/null ; then
- # In Anaconda images wget is actually busybox
- if wget --help 2>&1 | grep -q BusyBox ; then
- function fetch() {
- wget -O "$1" "$2"
- }
- else
- function fetch() {
- wget --tries 20 -O "$1" "$2"
- }
- fi
-else
- echo "No HTTP client command available!"
- function fetch() {
- false
- }
-fi
-# Check in with Beaker Server, record our postinstall time.
-fetch - http://lab.test-kickstart.invalid:8000/postinstall_done/@RECIPEID@
-# Give anamon a chance to finish collecting logs.
-sleep 10
diff --git a/IntegrationTests/src/bkr/inttest/server/test_kickstart.py b/IntegrationTests/src/bkr/inttest/server/test_kickstart.py
index 6c27633..63b0f61 100644
--- a/IntegrationTests/src/bkr/inttest/server/test_kickstart.py
+++ b/IntegrationTests/src/bkr/inttest/server/test_kickstart.py
@@ -4,31 +4,32 @@
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-import lxml.etree
-import re
-import unittest
-import pipes
import crypt
-import sys
import os
import os.path
+import re
+import shutil
+import subprocess
+import sys
import tempfile
+import unittest
+
+import lxml.etree
import pkg_resources
-import subprocess
-import shutil
-from bkr.server import dynamic_virt
-from bkr.server.model import session, DistroTreeRepo, LabControllerDistroTree, \
- Provision, SSHPubKey, ProvisionFamily, OSMajor, Arch, \
- Key, Key_Value_String, OSMajorInstallOptions, Installation
+
+from bkr.inttest import data_setup, get_server_base, Process
+from bkr.inttest.kickstart_helpers import (
+ create_rhel62, create_rhel62_server_x86_64, create_x86_64_automated, create_lab_controller,
+ compare_expected, jinja_choice_loader, create_user
+)
+from bkr.server.jobs import Jobs
+from bkr.server.kickstart import template_env, generate_kickstart
+from bkr.server.model import (
+ session, DistroTreeRepo, LabControllerDistroTree, Provision, SSHPubKey, ProvisionFamily,
+ OSMajor, Arch, Key, Key_Value_String, OSMajorInstallOptions
+)
from bkr.server.model.distrolibrary import DistroTreeImage, KernelType
from bkr.server.model.types import ImageType
-from bkr.server.kickstart import template_env, generate_kickstart
-from bkr.server.jobs import Jobs
-from bkr.inttest import data_setup, get_server_base, with_transaction, Process
-from bkr.inttest.kickstart_helpers import create_rhel62, create_rhel62_server_x86_64, \
- create_x86_64_automated, create_lab_controller, compare_expected, \
- jinja_choice_loader, create_user
-
_snippets_dir = pkg_resources.resource_filename('bkr.server', 'snippets')
_http_server = pkg_resources.resource_filename('bkr.inttest', 'http_server.py')
@@ -104,34 +105,6 @@ class KickstartTest(unittest.TestCase):
fqdn=u'test03.test-kickstart.invalid', status=u'Automated',
lab_controller=cls.lab_controller)
- cls.rhel39 = data_setup.create_distro(name=u'RHEL3-U9',
- osmajor=u'RedHatEnterpriseLinux3', osminor=u'9')
- cls.rhel39_as_x86_64 = data_setup.create_distro_tree(
- distro=cls.rhel39, variant=u'AS', arch=u'x86_64',
- lab_controllers=[cls.lab_controller],
- urls=[u'http://lab.test-kickstart.invalid/distros/RHEL-3/U9/AS/x86_64/tree/',
- u'nfs://lab.test-kickstart.invalid:/distros/RHEL-3/U9/AS/x86_64/tree/'])
- cls.rhel39_as_x86_64.repos[:] = [
- DistroTreeRepo(repo_id=u'repo-AS-x86_64', repo_type=u'os',
- path=u'../repo-AS-x86_64'),
- DistroTreeRepo(repo_id=u'repo-debug-AS-x86_64', repo_type=u'debug',
- path=u'../repo-debug-AS-x86_64'),
- DistroTreeRepo(repo_id=u'repo-srpm-AS-x86_64', repo_type=u'source',
- path=u'../repo-srpm-AS-x86_64'),
- ]
-
- cls.rhel49 = data_setup.create_distro(name=u'RHEL4-U9',
- osmajor=u'RedHatEnterpriseLinux4', osminor=u'9')
- cls.rhel49_as_x86_64 = data_setup.create_distro_tree(
- distro=cls.rhel49, variant=u'AS', arch=u'x86_64',
- lab_controllers=[cls.lab_controller],
- urls=[u'http://lab.test-kickstart.invalid/distros/RHEL-4/U9/AS/x86_64/tree/',
- u'nfs://lab.test-kickstart.invalid:/distros/RHEL-4/U9/AS/x86_64/tree/'])
- cls.rhel49_as_x86_64.repos[:] = [
- DistroTreeRepo(repo_id=u'AS', repo_type=u'os',
- path=u'../repo-AS-x86_64'),
- ]
-
cls.rhel58server = data_setup.create_distro(name=u'RHEL5-Server-U8',
osmajor=u'RedHatEnterpriseLinuxServer5', osminor=u'8')
cls.rhel58server_x86_64 = data_setup.create_distro_tree(
@@ -577,90 +550,6 @@ class KickstartTest(unittest.TestCase):
virt=virt, lab_controller=self.lab_controller)
return recipe
- def test_rhel3_defaults(self):
- recipe = self.provision_recipe('''
- <job>
- <whiteboard/>
- <recipeSet>
- <recipe>
- <distroRequires>
- <distro_name op="=" value="RHEL3-U9" />
- <distro_variant op="=" value="AS" />
- <distro_arch op="=" value="x86_64" />
- </distroRequires>
- <hostRequires/>
- <task name="/distribution/check-install" />
- <task name="/distribution/reservesys" />
- </recipe>
- </recipeSet>
- </job>
- ''', self.system)
- compare_expected('RedHatEnterpriseLinux3-scheduler-defaults', recipe.id,
- recipe.installation.rendered_kickstart.kickstart)
-
- def test_rhel3_auth(self):
- recipe = self.provision_recipe('''
- <job>
- <whiteboard/>
- <recipeSet>
- <recipe ks_meta="auth='--enableshadow --enablemd5'">
- <distroRequires>
- <distro_name op="=" value="RHEL3-U9" />
- <distro_variant op="=" value="AS" />
- <distro_arch op="=" value="x86_64" />
- </distroRequires>
- <hostRequires/>
- <task name="/distribution/check-install" />
- <task name="/distribution/reservesys" />
- </recipe>
- </recipeSet>
- </job>
- ''', self.system)
- self.assertIn('\nauthconfig --enableshadow --enablemd5\n',
- recipe.installation.rendered_kickstart.kickstart)
-
- def test_rhel4_defaults(self):
- recipe = self.provision_recipe('''
- <job>
- <whiteboard/>
- <recipeSet>
- <recipe>
- <distroRequires>
- <distro_name op="=" value="RHEL4-U9" />
- <distro_variant op="=" value="AS" />
- <distro_arch op="=" value="x86_64" />
- </distroRequires>
- <hostRequires/>
- <task name="/distribution/check-install" />
- <task name="/distribution/reservesys" />
- </recipe>
- </recipeSet>
- </job>
- ''', self.system)
- compare_expected('RedHatEnterpriseLinux4-scheduler-defaults', recipe.id,
- recipe.installation.rendered_kickstart.kickstart)
-
- def test_rhel4_auth(self):
- recipe = self.provision_recipe('''
- <job>
- <whiteboard/>
- <recipeSet>
- <recipe ks_meta="auth='--enableshadow --enablemd5'">
- <distroRequires>
- <distro_name op="=" value="RHEL4-U9" />
- <distro_variant op="=" value="AS" />
- <distro_arch op="=" value="x86_64" />
- </distroRequires>
- <hostRequires/>
- <task name="/distribution/check-install" />
- <task name="/distribution/reservesys" />
- </recipe>
- </recipeSet>
- </job>
- ''', self.system)
- self.assertIn('\nauthconfig --enableshadow --enablemd5\n',
- recipe.installation.rendered_kickstart.kickstart)
-
def test_rhel5server_defaults(self):
recipe = self.provision_recipe('''
<job>
@@ -3699,24 +3588,6 @@ part /boot --recommended --asprimary --fstype ext4 --ondisk=vdb
''')
self.assertIn('\npart /boot --size 250 --recommended --asprimary --fstype ext3\n',
recipe.installation.rendered_kickstart.kickstart)
- recipe = self.provision_recipe('''
- <job>
- <whiteboard/>
- <recipeSet>
- <recipe ks_meta="fstype=ext3">
- <distroRequires>
- <distro_name op="=" value="RHEL4-U9" />
- <distro_variant op="=" value="AS" />
- <distro_arch op="=" value="x86_64" />
- </distroRequires>
- <hostRequires/>
- <task name="/distribution/check-install" />
- </recipe>
- </recipeSet>
- </job>
- ''')
- self.assertIn('\npart /boot --size 200 --recommended --asprimary --fstype ext3\n',
- recipe.installation.rendered_kickstart.kickstart)
# https://bugzilla.redhat.com/show_bug.cgi?id=854229
def test_swapsize(self):
diff --git a/IntegrationTests/src/bkr/inttest/server/test_model.py b/IntegrationTests/src/bkr/inttest/server/test_model.py
index d69e9e9..fc9db8a 100644
--- a/IntegrationTests/src/bkr/inttest/server/test_model.py
+++ b/IntegrationTests/src/bkr/inttest/server/test_model.py
@@ -2002,12 +2002,6 @@ class CheckDynamicVirtTest(DatabaseTestCase):
data_setup.create_job_for_recipes([recipe], owner=self.user)
self.assertVirtPrecluded(recipe, 'force="" should preclude virt')
- # https://bugzilla.redhat.com/show_bug.cgi?id=1413783
- def test_rhel4_precluded(self):
- recipe = data_setup.create_recipe(osmajor=u'RedHatEnterpriseLinux4')
- data_setup.create_job_for_recipes([recipe], owner=self.user)
- self.assertVirtPrecluded(recipe, 'RHEL4 should be precluded')
-
# https://bugzilla.redhat.com/show_bug.cgi?id=1563072
def test_recipe_with_invalid_custom_distro_should_not_provision(self):
recipe = data_setup.create_recipe(custom_distro=True)
diff --git a/Server/bkr/server/kickstarts/RedHatEnterpriseLinux3 b/Server/bkr/server/kickstarts/RedHatEnterpriseLinux3
deleted file mode 100644
index f0bf462..0000000
--- a/Server/bkr/server/kickstarts/RedHatEnterpriseLinux3
+++ /dev/null
@@ -1,85 +0,0 @@
-{% if sysprofile %}
-{% for snippet_profile in sysprofile|split(';') %}
-# Snippet Profile: {{ snippet_profile }}
-{% snippet snippet_profile %}
-{% endfor %}
-{% else %}
-{% snippet 'install_method' %}
-
-{{ mode|default('text') }}
-{% if manual is undefined %}
-{% if auth %}
-authconfig {{ auth }}
-{% endif %}
-# System bootloader configuration
-bootloader --location=mbr{% if kernel_options_post %} --append="{{ kernel_options_post }}"{% endif %}
-
-{% snippet 'network' %}
-{#
-## Firewall configuration
-## firewall in kickstart metadata will enable the firewall
-## firewall=22:tcp,80:tcp will enable the firewall with ports 22 and 80 open.
-## always allow port 12432 so that beah harness will support multihost
-#}
-firewall
-{%- if firewall|default('disabled') == 'disabled' %} --disabled
-{%- else %} --enabled --port=12432:tcp{% if firewall is defined %},{{ firewall }}{% endif %}
-{% endif %}
-
-# Run the Setup Agent on first boot
-firstboot --disable
-# System keyboard
-keyboard {{ keyboard|default('us') }}
-mouse none
-# System language
-lang {{ lang|default('en_US.UTF-8') }}
-langsupport --default {{ lang|default('en_US.UTF-8') }} {{ lang|default('en_US.UTF-8') }}
-
-reboot
-{% snippet 'password' %}
-{% if skipx is defined %}
-# Do not configure the X Window System
-skipx
-{% endif %}
-{% snippet 'timezone' %}
-# Install OS instead of upgrade
-install
-
-{% snippet 'rhts_scsi_ethdevices' %}
-{% snippet 'rhts_partitions' %}
-{% snippet 'RedHatEnterpriseLinux3' %}
-{% snippet 'system' %}
-
-%packages {{ pkgoptions|default('--resolvedeps --ignoremissing') }}
-{% if recipe or packages is defined %}
-{% snippet 'rhts_packages' %}
-{% else %}
-@development-tools
-@development-libs
-{% endif %}
-{% snippet 'packages' %}
-
-{% endif %}{# manual #}
-
-{% endif %}{# sysprofile #}
-
-%pre
-(
-PATH=/usr/bin:$PATH
-{% snippet 'rhts_pre' %}
-{% snippet 'RedHatEnterpriseLinux3_pre' %}
-{% snippet 'system_pre' %}
-) 2>&1 | /usr/bin/tee /dev/console
-
-%post
-(
-PATH=/usr/bin:$PATH
-{% snippet 'rhts_post' %}
-{% snippet 'RedHatEnterpriseLinux3_post' %}
-{% snippet 'system_post' %}
-) 2>&1 | /usr/bin/tee /dev/console
-
-{{ ks_appends|join('\n') }}
-{% snippet 'postinstall_done' %}
-{% snippet 'post_s390_reboot' %}
-{% snippet 'postreboot' %}
diff --git a/Server/bkr/server/kickstarts/RedHatEnterpriseLinux4 b/Server/bkr/server/kickstarts/RedHatEnterpriseLinux4
deleted file mode 100644
index a1dd838..0000000
--- a/Server/bkr/server/kickstarts/RedHatEnterpriseLinux4
+++ /dev/null
@@ -1,95 +0,0 @@
-{% if sysprofile %}
-{% for snippet_profile in sysprofile|split(';') %}
-# Snippet Profile: {{ snippet_profile }}
-{% snippet snippet_profile %}
-{% endfor %}
-{% else %}
-{% snippet 'install_method' %}
-
-{{ mode }}
-{% if manual is undefined %}
-{% if auth %}
-authconfig {{ auth }}
-{% endif %}
-# System bootloader configuration
-bootloader --location=mbr{% if kernel_options_post %} --append="{{ kernel_options_post }}"{% endif %}
-
-{% snippet 'network' %}
-{#
-## Firewall configuration
-## firewall in kickstart metadata will enable the firewall
-## firewall=22:tcp,80:tcp will enable the firewall with ports 22 and 80 open.
-## always allow port 12432 so that beah harness will support multihost
-#}
-firewall
-{%- if firewall|default('disabled') == 'disabled' %} --disabled
-{%- else %} --enabled --port=12432:tcp{% if firewall is defined %},{{ firewall }}{% endif %}
-{% endif %}
-
-# System keyboard
-keyboard {{ keyboard|default('us') }}
-# System language
-lang {{ lang|default('en_US.UTF-8') }}
-langsupport --default {{ lang|default('en_US.UTF-8') }} {{ lang|default('en_US.UTF-8') }}
-
-reboot
-{% snippet 'password' %}
-# SELinux configuration
-selinux --{{ selinux|default('enforcing') }}
-
-{% if skipx is defined %}
-skipx
-{% endif %}
-
-{% snippet 'timezone' %}
-# Install OS instead of upgrade
-install
-
-{% snippet 'rhts_scsi_ethdevices' %}
-{% snippet 'rhts_partitions' %}
-{% snippet 'RedHatEnterpriseLinux4' %}
-{% snippet 'system' %}
-
-%packages {{ pkgoptions|default('--resolvedeps --ignoremissing') }}
-{% if recipe or packages is defined %}
-{% snippet 'rhts_packages' %}
-{% else %}
-@development-tools
-@development-libs
-@ office
-@ dialup
-@ sound-and-video
-@ editors
-@ admin-tools
-@ printing
-@ base-x
-@ gnome-desktop
-@ graphics
-@ games
-@ text-internet
-@ graphical-internet
-@ compat-arch-support
-e2fsprogs
-lvm2
-{% endif %}
-{% snippet 'packages' %}
-
-{% endif %}{# manual #}
-
-{% endif %}{# sysprofile #}
-
-%pre --log=/dev/console
-{% snippet 'rhts_pre' %}
-{% snippet 'RedHatEnterpriseLinux4_pre' %}
-{% snippet 'system_pre' %}
-
-%post --log=/dev/console
-{% snippet 'rhts_post' %}
-{% snippet 'RedHatEnterpriseLinux4_post' %}
-{% snippet 'system_post' %}
-
-
-{{ ks_appends|join('\n') }}
-{% snippet 'postinstall_done' %}
-{% snippet 'post_s390_reboot' %}
-{% snippet 'postreboot' %}
diff --git a/Server/bkr/server/model/distrolibrary.py b/Server/bkr/server/model/distrolibrary.py
index e9b115e..56df725 100644
--- a/Server/bkr/server/model/distrolibrary.py
+++ b/Server/bkr/server/model/distrolibrary.py
@@ -70,65 +70,56 @@ def default_install_options_for_distro(osmajor_name, osminor, variant, arch):
# %end
ks_meta['end'] = '%end'
- if rhel in ('3', '4', '5'):
+ if rhel == '5':
ks_meta['end'] = ''
# key option for RHEL 5
if rhel and int(rhel) == 5:
ks_meta['has_key'] = True
# autopart --type
ks_meta['has_autopart_type'] = True
- if rhel in ('3', '4', '5', '6') or \
+ if rhel in ('5', '6') or \
(fedora and fedora != 'rawhide' and int(fedora) < 18):
del ks_meta['has_autopart_type']
# chrony
ks_meta['has_chrony'] = True
- if rhel in ('3', '4', '5', '6'):
+ if rhel in ('5', '6'):
del ks_meta['has_chrony']
# DHCP option 26
ks_meta['has_dhcp_mtu_support'] = True
- if rhel in ('3', '4'):
- del ks_meta['has_dhcp_mtu_support']
# GPT on BIOS
ks_meta['has_gpt_bios_support'] = True
- if rhel in ('3', '4', '5', '6'):
+ if rhel in ('5', '6'):
del ks_meta['has_gpt_bios_support']
# bootloader --leavebootorder
ks_meta['has_leavebootorder'] = True
- if rhel in ('3', '4', '5', '6') or \
+ if rhel in ('5', '6') or \
(fedora and fedora != 'rawhide' and int(fedora) < 18):
del ks_meta['has_leavebootorder']
# repo --cost
ks_meta['has_repo_cost'] = True
- if rhel in ('3', '4', '5'):
+ if rhel == '5':
del ks_meta['has_repo_cost']
# reqpart
ks_meta['has_reqpart'] = True
if rhel == '7' and osminor in ('0', '1'): # added in RHEL7.2
del ks_meta['has_reqpart']
- if rhel in ('3', '4', '5', '6') or \
+ if rhel in ('5', '6') or \
(fedora and fedora != 'rawhide' and int(fedora) < 23):
del ks_meta['has_reqpart']
# systemd vs. SysV init
ks_meta['has_systemd'] = True
- if rhel in ('3', '4', '5', '6') or \
+ if rhel in ('5', '6') or \
(fedora and fedora != 'rawhide' and int(fedora) < 15):
del ks_meta['has_systemd']
# unsupported_hardware
ks_meta['has_unsupported_hardware'] = True
- if rhel in ('3', '4', '5'):
+ if rhel == '5':
del ks_meta['has_unsupported_hardware']
- # yum
- if rhel == '3':
- ks_meta['yum'] = 'yum-2.2.2-1.rhts.EL3.noarch.rpm'
- elif rhel == '4':
- ks_meta['yum'] = 'yum-2.2.2-1.rhts.EL4.noarch.rpm'
- # extra options for 'yum install' invocations
- if rhel in ('3', '4'):
- ks_meta['yum_install_extra_opts'] = '-d 1'
+
# mode
if rhel == '6':
ks_meta['mode'] = 'cmdline'
- if rhel in ('4', '5'):
+ if rhel == '5':
ks_meta['mode'] = ''
# docker package name
ks_meta['docker_package'] = 'docker'
@@ -137,8 +128,6 @@ def default_install_options_for_distro(osmajor_name, osminor, variant, arch):
# recommended boot partition size
if rhel in ('5', '6'):
ks_meta['boot_partition_size'] = 250
- elif rhel in ('3', '4'):
- ks_meta['boot_partition_size'] = 200
# names of package groups containing conflicts
if name in ('RedHatEnterpriseLinux', 'RedHatEnterpriseLinuxServer',
'RedHatEnterpriseLinuxClient'):