mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-04 05:12:30 +00:00 
			
		
		
		
	Support Rocky Linux on service nodes
This commit is contained in:
		@@ -14,7 +14,6 @@ require Exporter;
 | 
			
		||||
use strict;
 | 
			
		||||
 | 
			
		||||
our %distnames = (
 | 
			
		||||
    "1624205633.869423" => "rocky8.4",      #x86_64
 | 
			
		||||
    "1578087695.538488" => "centos8.1",     #x86_64
 | 
			
		||||
    "1578087695.537220" => "centos8.1",     #ppc64le
 | 
			
		||||
    "1480943823.812754" => "centos7.3",     #x86_64
 | 
			
		||||
 
 | 
			
		||||
@@ -299,7 +299,7 @@ sub subvars {
 | 
			
		||||
            my $writerepo;
 | 
			
		||||
            my $c = 0;
 | 
			
		||||
            foreach my $pkgdir (@pkgdirs) {
 | 
			
		||||
                if ($platform =~ /^(rh|SL|centos|ol|fedora)$/) {
 | 
			
		||||
                if ($platform =~ /^(rh|SL|centos|ol|fedora|rocky)$/) {
 | 
			
		||||
                    if ($c == 0) {
 | 
			
		||||
                        # After some tests, if we put the repo in  pre scripts in the kickstart like for rhels6.x
 | 
			
		||||
                        # the rhels5.9 will not be installed successfully. So put in kickstart directly.
 | 
			
		||||
 
 | 
			
		||||
@@ -2132,6 +2132,16 @@ sub copycd
 | 
			
		||||
            my @ol_version = split /[- ]/, $desc;
 | 
			
		||||
            $distname = "ol" . $ol_version[1];
 | 
			
		||||
        }
 | 
			
		||||
        elsif ($desc =~ /Rocky Linux/)
 | 
			
		||||
        {
 | 
			
		||||
            #
 | 
			
		||||
            # Attempt to auto-detect for Rocky Linux OS, the last element 
 | 
			
		||||
            # (accessed with [-1] array index) has typically been the version
 | 
			
		||||
            # ex: "Rocky Linux 8"
 | 
			
		||||
            #
 | 
			
		||||
            my @rl_version = split / /, $desc;
 | 
			
		||||
            $distname = "rocky" . $ol_version[-1];
 | 
			
		||||
        }
 | 
			
		||||
        elsif ($desc =~ /^[\d\.]+$/)
 | 
			
		||||
        {
 | 
			
		||||
            open($dinfo, $mntpath . "/.treeinfo");
 | 
			
		||||
 
 | 
			
		||||
@@ -1,12 +0,0 @@
 | 
			
		||||
@^minimal-environment
 | 
			
		||||
chrony
 | 
			
		||||
net-tools
 | 
			
		||||
nfs-utils
 | 
			
		||||
openssh-server
 | 
			
		||||
rsync
 | 
			
		||||
util-linux
 | 
			
		||||
wget
 | 
			
		||||
python3
 | 
			
		||||
tar
 | 
			
		||||
bzip2
 | 
			
		||||
perl-interpreter
 | 
			
		||||
							
								
								
									
										1
									
								
								xCAT-server/share/xcat/install/rocky/compute.rocky8.pkglist
									
									
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								xCAT-server/share/xcat/install/rocky/compute.rocky8.pkglist
									
									
									
									
									
										Symbolic link
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
../rh/compute.rhels8.pkglist
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
#version=CentOS8
 | 
			
		||||
#version=Rocky8
 | 
			
		||||
# Use text install
 | 
			
		||||
text
 | 
			
		||||
# Use network installation
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1 @@
 | 
			
		||||
../rh/service.rhels8.x86_64.otherpkgs.pkglist
 | 
			
		||||
							
								
								
									
										1
									
								
								xCAT-server/share/xcat/install/rocky/service.rocky8.pkglist
									
									
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								xCAT-server/share/xcat/install/rocky/service.rocky8.pkglist
									
									
									
									
									
										Symbolic link
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
../rh/service.rhels8.pkglist
 | 
			
		||||
							
								
								
									
										1
									
								
								xCAT-server/share/xcat/install/rocky/service.rocky8.tmpl
									
									
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								xCAT-server/share/xcat/install/rocky/service.rocky8.tmpl
									
									
									
									
									
										Symbolic link
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
../rh/service.rhels8.tmpl
 | 
			
		||||
@@ -0,0 +1 @@
 | 
			
		||||
../rh/service.rhels8.x86_64.exlist
 | 
			
		||||
@@ -0,0 +1 @@
 | 
			
		||||
../rh/service.rhels8.x86_64.otherpkgs.pkglist
 | 
			
		||||
@@ -0,0 +1 @@
 | 
			
		||||
../rh/service.rhels8.x86_64.pkglist
 | 
			
		||||
@@ -0,0 +1 @@
 | 
			
		||||
../rh/service.rhels8.x86_64.postinstall
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
#
 | 
			
		||||
# go-xcat - Install xCAT automatically.
 | 
			
		||||
#
 | 
			
		||||
# Version 1.0.49
 | 
			
		||||
# Version 1.0.50
 | 
			
		||||
#
 | 
			
		||||
# Copyright (C) 2016 - 2021 International Business Machines
 | 
			
		||||
# Eclipse Public License, Version 1.0 (EPL-1.0)
 | 
			
		||||
@@ -38,6 +38,8 @@
 | 
			
		||||
#     - Add support for Oracle Linux
 | 
			
		||||
# 2021-07-08 Peter Wong <wpeter@us.ibm.com>
 | 
			
		||||
#     - Provide correct versions of packages to be installed 
 | 
			
		||||
# 2021-07-27 Mark Gurevich <gurevich@us.ibm.com>
 | 
			
		||||
#     - Add support for Rocky Linux
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -1589,6 +1591,7 @@ function add_xcat_dep_repo_yum_or_zypper()
 | 
			
		||||
	case "${distro}" in
 | 
			
		||||
	"centos"*)             distro="rh${distro#centos}" ;;
 | 
			
		||||
	"ol"*)                 distro="rh${distro#ol}" ;;
 | 
			
		||||
	"rocky"*)              distro="rh${distro#rocky}" ;;
 | 
			
		||||
	"fedora10"|"fedora11") distro="fedora9" ;;
 | 
			
		||||
	"fedora1"[678])        distro="rh6" ;;
 | 
			
		||||
	"fedora19"|"fedora2"?) distro="rh7" ;;
 | 
			
		||||
@@ -2288,7 +2291,7 @@ Version:            ${GO_XCAT_LINUX_VERSION}
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
case "${GO_XCAT_LINUX_DISTRO}" in
 | 
			
		||||
"centos"|"fedora"|"rhel"|"sles"|"ubuntu"|"ol")
 | 
			
		||||
"centos"|"fedora"|"rhel"|"sles"|"ubuntu"|"ol"|"rocky")
 | 
			
		||||
	;;
 | 
			
		||||
*)
 | 
			
		||||
	warn_if_bad 1 "${GO_XCAT_LINUX_DISTRO}: unsupported Linux distro"
 | 
			
		||||
 
 | 
			
		||||
@@ -46,13 +46,13 @@ check:rc==0
 | 
			
		||||
cmd:cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-core && createrepo .
 | 
			
		||||
check:rc==0
 | 
			
		||||
 | 
			
		||||
cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";path2="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sle" ]];then path="sles";path2="sles";elif [[ "__GETNODEATTR($$SN,os)__" =~ "ol" ]];then path="ol";path2="rh";fi; ver="__GETNODEATTR($$SN,os)__"; tmp=${ver%%.*};ver=`echo "$tmp"|sed 's:[a-zA-Z]::g'`;cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-dep/$path2$ver/__GETNODEATTR($$SN,arch)__ && createrepo .;
 | 
			
		||||
cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";path2="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sle" ]];then path="sles";path2="sles";elif [[ "__GETNODEATTR($$SN,os)__" =~ "ol" ]];then path="ol";path2="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "rocky" ]];then path="rocky";path2="rh";fi; ver="__GETNODEATTR($$SN,os)__"; tmp=${ver%%.*};ver=`echo "$tmp"|sed 's:[a-zA-Z]::g'`;cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-dep/$path2$ver/__GETNODEATTR($$SN,arch)__ && createrepo .;
 | 
			
		||||
check:rc==0
 | 
			
		||||
 | 
			
		||||
cmd:chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkgdir=/install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__
 | 
			
		||||
check:rc==0
 | 
			
		||||
 | 
			
		||||
cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sle" ]];then path="sles";elif [[ "__GETNODEATTR($$SN,os)__" =~ "ol" ]];then path="ol";fi; ver="__GETNODEATTR($$SN,os)__"; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/$path/service.${ver%%.*}.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist;
 | 
			
		||||
cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sle" ]];then path="sles";elif [[ "__GETNODEATTR($$SN,os)__" =~ "ol" ]];then path="ol";elif [[ "    __GETNODEATTR($$SN,os)__" =~ "rocky" ]];then path="rocky";fi; ver="__GETNODEATTR($$SN,os)__"; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/$path/service.${ver%%.*}.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist;
 | 
			
		||||
check:rc==0
 | 
			
		||||
 | 
			
		||||
#add support python in sn
 | 
			
		||||
@@ -106,7 +106,7 @@ check:rc==0
 | 
			
		||||
cmd:if rpm -qa|grep xCAT-openbmc-py 2>&1; then xdsh $$SN "rpm -qa|grep python2-greenlet"; else echo "there is no xCAT-openbmc-py installed in MN, skip check python2-greenlet installation in SN"; exit 0;fi
 | 
			
		||||
check:rc==0
 | 
			
		||||
cmd:xdsh $$SN  "cat /var/log/xcat/xcat.log"
 | 
			
		||||
cmd:if [[ "__GETNODEATTR($$SN,arch)__" =~ "x86_64" ]]; then if [[ "__GETNODEATTR($$SN,os)__" =~ "sle" ]];then xdsh $$SN "zypper -n install perl-Sys-Virt"; elif [[ "__GETNODEATTR($$SN,os)__" =~ "rh" || "__GETNODEATTR($$SN,os)__" =~ "ol" ]];then xdsh $$SN "yum install -y perl-Sys-Virt";fi;fi
 | 
			
		||||
cmd:if [[ "__GETNODEATTR($$SN,arch)__" =~ "x86_64" ]]; then if [[ "__GETNODEATTR($$SN,os)__" =~ "sle" ]];then xdsh $$SN "zypper -n install perl-Sys-Virt"; elif [[ "__GETNODEATTR($$SN,os)__" =~ "rh" || "__GETNODEATTR($$SN,os)__" =~ "ol" || "__GETNODEATTR($$SN,os)__" =~ "rocky" ]];then xdsh $$SN "yum install -y perl-Sys-Virt";fi;fi
 | 
			
		||||
check:rc==0
 | 
			
		||||
cmd:makentp -a
 | 
			
		||||
check:rc==0
 | 
			
		||||
 
 | 
			
		||||
@@ -156,8 +156,8 @@ cmd:lsdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netb
 | 
			
		||||
cmd:genimage  __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
 | 
			
		||||
check:rc==0
 | 
			
		||||
 | 
			
		||||
#Make sure squashfs-tools rpm is installed on RHEL and OL
 | 
			
		||||
cmd:if [[ "$$OS" =~ "rhel" || "$$OS" =~ "ol" ]]; then yum install -y squashfs-tools; fi
 | 
			
		||||
#Make sure squashfs-tools rpm is installed on RHEL, OL and Rocky
 | 
			
		||||
cmd:if [[ "$$OS" =~ "rhel" || "$$OS" =~ "ol" || "$$OS" =~ "rocky" ]]; then yum install -y squashfs-tools; fi
 | 
			
		||||
 | 
			
		||||
#Make sure squashfs-tools rpm is installed on Ubuntu
 | 
			
		||||
cmd:if [[ "$$OS" =~ "ubuntu" ]]; then apt-get install -y squashfs-tools; fi
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user