From 3c643e6598243b2fb4148033ef1d97680318352c Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Oct 2021 16:52:10 -0400 Subject: [PATCH] Genesis base based on Fedora 28 --- .../references/coral/known_issues/genesis_base.rst | 6 +++--- xCAT-genesis-builder/README.md | 4 ++-- xCAT-genesis-builder/buildrpm | 2 +- xCAT-genesis-builder/xCAT-genesis-base.spec | 2 -- xCAT-genesis-builder/xCAT-genesis-builder.spec | 2 +- xCAT-genesis-builder/xcat-cmdline.sh | 5 +++++ xCAT-server/lib/xcat/plugins/anaconda.pm | 2 +- .../xcat/install/fedora/compute.fedora28.pkglist | 11 +++++++++++ .../share/xcat/install/fedora/compute.fedora28.tmpl | 1 + .../xcat/netboot/fedora/compute.fedora28.pkglist | 1 + xCAT-server/share/xcat/netboot/fedora/dracut_047 | 1 + xCAT-test/autotest/testcase/genesis/genesistest.pl | 2 +- 12 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 xCAT-server/share/xcat/install/fedora/compute.fedora28.pkglist create mode 120000 xCAT-server/share/xcat/install/fedora/compute.fedora28.tmpl create mode 120000 xCAT-server/share/xcat/netboot/fedora/compute.fedora28.pkglist create mode 120000 xCAT-server/share/xcat/netboot/fedora/dracut_047 diff --git a/docs/source/references/coral/known_issues/genesis_base.rst b/docs/source/references/coral/known_issues/genesis_base.rst index 80d616651..8476841cd 100644 --- a/docs/source/references/coral/known_issues/genesis_base.rst +++ b/docs/source/references/coral/known_issues/genesis_base.rst @@ -1,13 +1,13 @@ xCAT Genesis Base ================= -xCAT ships a ``xCAT-genesis-base`` package as part of xcat-deps. This is a light-weight diskless linux image based currently on Fedora34, that is used by xCAT to do hardware discovery. +xCAT ships a ``xCAT-genesis-base`` package as part of xcat-deps. This is a light-weight diskless linux image based currently on Fedora28, that is used by xCAT to do hardware discovery. -To build your own version of the ``xCAT-genesis-base`` on-site using a server running OS other than Fedora34, like Red Hat Enterprise Linux 8, follow the steps below. Building ``xCAT-genesis-base`` on a server running Red Hat Enterprise Linux 7 or earlier, is no longer supported. +To build your own version of the ``xCAT-genesis-base`` on-site using a server running OS other than Fedora28, like Red Hat Enterprise Linux 8, follow the steps below. Building ``xCAT-genesis-base`` on a server running Red Hat Enterprise Linux 7 or earlier, is no longer supported. 1. Download the latest timestamp version of the ``xCAT-genesis-builder`` RPM provided here: http://xcat.org/files/xcat/xcat-dep/2.x_Linux/beta/ -2. Install the ``xCAT-genesis-builder`` RPM on a node installed with desired OS (currently verified with Fedora34 and Red Hat Enterprise Linux 8). For more details: https://github.com/xcat2/xcat-core/tree/master/xCAT-genesis-builder#readme +2. Install the ``xCAT-genesis-builder`` RPM on a node installed with desired OS (currently verified with Fedora28 and Red Hat Enterprise Linux 8). For more details: https://github.com/xcat2/xcat-core/tree/master/xCAT-genesis-builder#readme 3. Build the ``xCAT-genesis-base`` RPM: :: diff --git a/xCAT-genesis-builder/README.md b/xCAT-genesis-builder/README.md index 58a52c1a7..b454cf9dd 100644 --- a/xCAT-genesis-builder/README.md +++ b/xCAT-genesis-builder/README.md @@ -1,6 +1,6 @@ # xCAT-genesis-builder -`xCAT-genesis-builder` is a utility for building base initrd images for deploying diskless nodes in your cluster for discovery. This tool is required only if you have the intention of building your own version of `xCAT-genesis-base` RPM which is available in `xcat-dep` (latest version was built on Fedora34). +`xCAT-genesis-builder` is a utility for building base initrd images for deploying diskless nodes in your cluster for discovery. This tool is required only if you have the intention of building your own version of `xCAT-genesis-base` RPM which is available in `xcat-dep` (latest version was built on Fedora28). # Background @@ -19,7 +19,7 @@ that support the Red Hat Package Manager (rpm) development tools. The script `b attempt to install some of these core packages if they are not already present. ## Instructions for buiding `xCAT-genesis-builder` RPM -Latest version 2.16.3 of `xCAT-genesis-builder` RPM available at https://www.xcat.org/files/xcat/xcat-dep/2.x_Linux/beta and was verified to install and run on Fedora34 and Red Hat 8. Earlier version 2.14.5 of `xCAT-genesis-builder` RPM available at https://www.xcat.org/files/xcat/xcat-dep/2.x_Linux/beta and was verified to install and run on Fedora26 and Red Hat 7. +Latest version 2.16.3 of `xCAT-genesis-builder` RPM available at https://www.xcat.org/files/xcat/xcat-dep/2.x_Linux/beta and was verified to install and run on Fedora28 and Red Hat 8. Earlier version 2.14.5 of `xCAT-genesis-builder` RPM available at https://www.xcat.org/files/xcat/xcat-dep/2.x_Linux/beta and was verified to install and run on Fedora26 and Red Hat 7. If a new version of `xCAT-genesis-builder` RPM needs to be built: 1. Clone `xcat-core` git repository: diff --git a/xCAT-genesis-builder/buildrpm b/xCAT-genesis-builder/buildrpm index b1ee2d3c3..b0bc336b4 100755 --- a/xCAT-genesis-builder/buildrpm +++ b/xCAT-genesis-builder/buildrpm @@ -5,7 +5,7 @@ # this whole dir into it somewhere (like /tmp). # Then run this script. The optional 1st arg should be mcp if you are building against mcp. -# Currently, *Fedora 34* and *RedHat 8* are the only OSes supported to build genesis-base for ppc64, and Centos 6.5 for x86_64 +# Currently, *Fedora 28* and *RedHat 8* are the only OSes supported to build genesis-base for ppc64, and Centos 6.5 for x86_64 HOSTOS="$1" DIR=`dirname $0` diff --git a/xCAT-genesis-builder/xCAT-genesis-base.spec b/xCAT-genesis-builder/xCAT-genesis-base.spec index 17f780230..831008d41 100644 --- a/xCAT-genesis-builder/xCAT-genesis-base.spec +++ b/xCAT-genesis-builder/xCAT-genesis-base.spec @@ -12,8 +12,6 @@ Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")} %endif BuildArch: noarch %define name xCAT-genesis-base-%{tarch} -# Use xz compression instead of default gzip on Fedora34 -%define _binary_payload w7.xzdio %define __spec_install_post : %define debug_package %{nil} %define __prelink_undo_cmd %{nil} diff --git a/xCAT-genesis-builder/xCAT-genesis-builder.spec b/xCAT-genesis-builder/xCAT-genesis-builder.spec index c73c3cdb5..9e6920dbe 100644 --- a/xCAT-genesis-builder/xCAT-genesis-builder.spec +++ b/xCAT-genesis-builder/xCAT-genesis-builder.spec @@ -4,7 +4,7 @@ Version: %{?version:%{version}}%{!?version:%(cat Version)} Release: %{?release:%{release}}%{!?release:%(cat Release)} Epoch: 1 AutoReq: false -Requires: ipmitool screen lldpad rpm-build mstflint xfsprogs nc rpmdevtools libstdc++-devel pciutils bridge-utils iprutils psmisc mdadm bind-utils dosfstools usbutils libusbx bc rpmdevtools +Requires: ipmitool screen lldpad rpm-build mstflint xfsprogs nc rpmdevtools libstdc++-devel pciutils bridge-utils iprutils psmisc mdadm bind-utils dosfstools usbutils libusbx bc rpmdevtools rng-tools Prefix: /opt/xcat AutoProv: false diff --git a/xCAT-genesis-builder/xcat-cmdline.sh b/xCAT-genesis-builder/xcat-cmdline.sh index 6a60163e0..7c7eb7fb2 100755 --- a/xCAT-genesis-builder/xcat-cmdline.sh +++ b/xCAT-genesis-builder/xcat-cmdline.sh @@ -58,6 +58,11 @@ if [[ ${ARCH} =~ ppc64 ]]; then modprobe `basename $line` fi done + # Check if running on a VM, and load "virtio_pci" module + cat /proc/cpuinfo | grep "machine" | grep "emulated" + if [ $? -eq 0 ]; then + modprobe virtio_pci + fi waittime=2 ALL_NICS=$(ip link show | grep -v "^ " | awk '{print $2}' | sed -e 's/:$//' | grep -v lo) for tmp in $ALL_NICS; do diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index db3572b5a..b3a6f7b43 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -2138,7 +2138,7 @@ sub copycd { # Attempt to auto-detect for Fedora OS, the first element # (after " ") has typically been the version - # ex: Fedora 34 + # ex: Fedora 28 # my @fedora_version = split /[- ]/, $desc; $distname = "fedora" . $fedora_version[1]; diff --git a/xCAT-server/share/xcat/install/fedora/compute.fedora28.pkglist b/xCAT-server/share/xcat/install/fedora/compute.fedora28.pkglist new file mode 100644 index 000000000..d31e16fb1 --- /dev/null +++ b/xCAT-server/share/xcat/install/fedora/compute.fedora28.pkglist @@ -0,0 +1,11 @@ +#Please make sure there is a space between @ and group name +wget +vim-minimal +nfs-utils +rsync +net-tools +openssh-server +util-linux-ng +rsyslog +openssl +rng-tools diff --git a/xCAT-server/share/xcat/install/fedora/compute.fedora28.tmpl b/xCAT-server/share/xcat/install/fedora/compute.fedora28.tmpl new file mode 120000 index 000000000..50866c82a --- /dev/null +++ b/xCAT-server/share/xcat/install/fedora/compute.fedora28.tmpl @@ -0,0 +1 @@ +../rh/compute.rhels8.tmpl \ No newline at end of file diff --git a/xCAT-server/share/xcat/netboot/fedora/compute.fedora28.pkglist b/xCAT-server/share/xcat/netboot/fedora/compute.fedora28.pkglist new file mode 120000 index 000000000..7101667e8 --- /dev/null +++ b/xCAT-server/share/xcat/netboot/fedora/compute.fedora28.pkglist @@ -0,0 +1 @@ +compute.fedora14.pkglist \ No newline at end of file diff --git a/xCAT-server/share/xcat/netboot/fedora/dracut_047 b/xCAT-server/share/xcat/netboot/fedora/dracut_047 new file mode 120000 index 000000000..1eb4ffd28 --- /dev/null +++ b/xCAT-server/share/xcat/netboot/fedora/dracut_047 @@ -0,0 +1 @@ +../rh/dracut_047/ \ No newline at end of file diff --git a/xCAT-test/autotest/testcase/genesis/genesistest.pl b/xCAT-test/autotest/testcase/genesis/genesistest.pl index 9e3d5e300..73b30a762 100755 --- a/xCAT-test/autotest/testcase/genesis/genesistest.pl +++ b/xCAT-test/autotest/testcase/genesis/genesistest.pl @@ -254,7 +254,6 @@ sub rungenesisimg { ######################################### sub testxdsh { my $value = shift; - send_msg(2, "The input parameter for testxdsh() is $value \n"); my $checkstring; my $checkfile; my $nodestatus; @@ -273,6 +272,7 @@ sub testxdsh { return 1; } + send_msg(2, "Node $noderange has been installed with genesis shell. Checking $checkfile file on that node contains '$checkstring' \n"); my $xdsh_command="xdsh $noderange -t 2 cat $checkfile 2>&1|grep $checkstring"; if (($value == 1) || ($value == 2) || ($value == 3)) { `$xdsh_command`;