From 460409137cb1e135d899eea4fc0c095b7abf312a Mon Sep 17 00:00:00 2001 From: fangjzh <34927528+fangjzh@users.noreply.github.com> Date: Sat, 28 May 2022 21:08:31 +0800 Subject: [PATCH 1/7] Update diskinfo of Rocky Linux 8.6 add support for Rocky Linux 8.6 --- perl-xCAT/xCAT/data/discinfo.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/perl-xCAT/xCAT/data/discinfo.pm b/perl-xCAT/xCAT/data/discinfo.pm index f2af0828e..00a5cfc50 100755 --- a/perl-xCAT/xCAT/data/discinfo.pm +++ b/perl-xCAT/xCAT/data/discinfo.pm @@ -14,6 +14,7 @@ require Exporter; use strict; our %distnames = ( + "1652648703.486923" => "rocky8.6", #x86_64 "1636882174.934804" => "rocky8.5", #x86_64 "1624205633.869423" => "rocky8.4", #x86_64 "1578087695.538488" => "centos8.1", #x86_64 From b679f8f32c7b07a9ce8b1c2cd80de158871fed9c Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Tue, 31 May 2022 17:06:42 -0400 Subject: [PATCH 2/7] Genesis boot testcase verification --- xCAT-test/autotest/testcase/genesis/genesistest.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/xCAT-test/autotest/testcase/genesis/genesistest.pl b/xCAT-test/autotest/testcase/genesis/genesistest.pl index 6737292eb..19beef853 100755 --- a/xCAT-test/autotest/testcase/genesis/genesistest.pl +++ b/xCAT-test/autotest/testcase/genesis/genesistest.pl @@ -285,7 +285,15 @@ sub testxdsh { return 1; } - send_msg(2, "Node $noderange has been installed with genesis shell for test value $value \n"); + # Check shell prompt on the node to verify it is running Genesis + `xdsh $noderange -t 2 "echo \\\$PS1" | grep "Genesis"`; + if ($?) { + send_msg(2, "Failed to install node $noderange with genesis shell for test value $value \n"); + return 1; + } else { + send_msg(2, "Node $noderange has been installed with genesis shell for test value $value \n"); + } + send_msg(2, "Checking $checkfile file on that node contains '$checkstring' \n"); my $xdsh_command="xdsh $noderange -t 2 cat $checkfile 2>&1"; if (($value == 1) || ($value == 2) || ($value == 3)) { From 47ec9264a1bc0cf1ea372c18568b7039f38f20db Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Mon, 6 Jun 2022 10:06:44 -0400 Subject: [PATCH 3/7] Better formatting fox xcatprobe output --- xCAT-probe/xcatprobe | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xCAT-probe/xcatprobe b/xCAT-probe/xcatprobe index a686a3251..4116164a4 100755 --- a/xCAT-probe/xcatprobe +++ b/xCAT-probe/xcatprobe @@ -100,7 +100,10 @@ sub format_cmd_output { $msg =~ s/\t/ /g; my $flaglen = 6; my $desiredwidth = 120; - my $screenwidth = (`tput cols` + 0); + my $screenwidth = 80; + if ($ENV{'TERM'}) { + $screenwidth = (`tput cols` + 0); + } my $maxlen = ($screenwidth > $desiredwidth ? $desiredwidth : $screenwidth); my @finalmsg = (); @@ -194,7 +197,10 @@ sub listvalidsubcmd { $maxlen += 4; my $desiredwidth = 120; - my $screenwidth = (`tput cols` + 0); + my $screenwidth = 80; + if ($ENV{'TERM'}) { + $screenwidth = (`tput cols` + 0); + } my $finallen = ($screenwidth > $desiredwidth ? $desiredwidth : $screenwidth); print "Supported sub commands are:\n"; From 2fa4dbe394ed7223ec4129b682291f00fd0a805c Mon Sep 17 00:00:00 2001 From: Wai Yee Wong Date: Tue, 7 Jun 2022 15:17:24 -0400 Subject: [PATCH 4/7] Check host keys supported by operating systems and report new ones --- .../autotest/testcase/install_xCAT/case0 | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/xCAT-test/autotest/testcase/install_xCAT/case0 b/xCAT-test/autotest/testcase/install_xCAT/case0 index 35183600a..77246b166 100644 --- a/xCAT-test/autotest/testcase/install_xCAT/case0 +++ b/xCAT-test/autotest/testcase/install_xCAT/case0 @@ -20,6 +20,16 @@ cmd:service xcatd status check:rc==0 check:output=~running cmd:rm -rf /install_xCAT_xcat-core.tar.bz2 /install_xCAT_xcat-dep.tar.bz2 + +# Check host keys supported by the current OS. +cmd:echo -e "dsa\necdsa\ned25519\nrsa\nrsa1" > /tmp/known_host_keys +check:rc==0 +cmd:ssh-keygen --help 2>&1 | grep "\[-t" | cut -d "[" -f4 | cut -d "]" -f1 | sed 's/-t//' | sed 's/|//g' | xargs -n 1 > /tmp/current_os_host_keys +check:rc==0 +cmd:diff /tmp/known_host_keys /tmp/current_os_host_keys +check:output!~> +cmd:rm -f /tmp/known_host_keys /tmp/current_os_host_keys +check:rc==0 end @@ -57,6 +67,16 @@ cmd:service conserver stop cmd:sleep 5 cmd:service goconserver status cmd:service conserver status + +# Check host keys supported by the current OS. +cmd:echo -e "dsa\necdsa\ned25519\nrsa\nrsa1" > /tmp/known_host_keys +check:rc==0 +cmd:ssh-keygen --help 2>&1 | grep "\[-t" | cut -d "[" -f4 | cut -d "]" -f1 | sed 's/-t//' | sed 's/|//g' | xargs -n 1 > /tmp/current_os_host_keys +check:rc==0 +cmd:diff /tmp/known_host_keys /tmp/current_os_host_keys +check:output!~> +cmd:rm -f /tmp/known_host_keys /tmp/current_os_host_keys +check:rc==0 end From 38f83851c41d8cb0535211e4822f464f725b71c1 Mon Sep 17 00:00:00 2001 From: Wai Yee Wong Date: Tue, 7 Jun 2022 15:18:44 -0400 Subject: [PATCH 5/7] Revert "Check host keys supported by operating systems and report new ones" This reverts commit 2fa4dbe394ed7223ec4129b682291f00fd0a805c. --- .../autotest/testcase/install_xCAT/case0 | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/xCAT-test/autotest/testcase/install_xCAT/case0 b/xCAT-test/autotest/testcase/install_xCAT/case0 index 77246b166..35183600a 100644 --- a/xCAT-test/autotest/testcase/install_xCAT/case0 +++ b/xCAT-test/autotest/testcase/install_xCAT/case0 @@ -20,16 +20,6 @@ cmd:service xcatd status check:rc==0 check:output=~running cmd:rm -rf /install_xCAT_xcat-core.tar.bz2 /install_xCAT_xcat-dep.tar.bz2 - -# Check host keys supported by the current OS. -cmd:echo -e "dsa\necdsa\ned25519\nrsa\nrsa1" > /tmp/known_host_keys -check:rc==0 -cmd:ssh-keygen --help 2>&1 | grep "\[-t" | cut -d "[" -f4 | cut -d "]" -f1 | sed 's/-t//' | sed 's/|//g' | xargs -n 1 > /tmp/current_os_host_keys -check:rc==0 -cmd:diff /tmp/known_host_keys /tmp/current_os_host_keys -check:output!~> -cmd:rm -f /tmp/known_host_keys /tmp/current_os_host_keys -check:rc==0 end @@ -67,16 +57,6 @@ cmd:service conserver stop cmd:sleep 5 cmd:service goconserver status cmd:service conserver status - -# Check host keys supported by the current OS. -cmd:echo -e "dsa\necdsa\ned25519\nrsa\nrsa1" > /tmp/known_host_keys -check:rc==0 -cmd:ssh-keygen --help 2>&1 | grep "\[-t" | cut -d "[" -f4 | cut -d "]" -f1 | sed 's/-t//' | sed 's/|//g' | xargs -n 1 > /tmp/current_os_host_keys -check:rc==0 -cmd:diff /tmp/known_host_keys /tmp/current_os_host_keys -check:output!~> -cmd:rm -f /tmp/known_host_keys /tmp/current_os_host_keys -check:rc==0 end From ded4a006b2f5c5540e6e245f39770558f5de47c0 Mon Sep 17 00:00:00 2001 From: Wai Yee Wong Date: Tue, 7 Jun 2022 15:55:26 -0400 Subject: [PATCH 6/7] Check host keys supported by the operating system and report new ones if any --- .../autotest/testcase/install_xCAT/case0 | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/xCAT-test/autotest/testcase/install_xCAT/case0 b/xCAT-test/autotest/testcase/install_xCAT/case0 index 35183600a..e41499802 100644 --- a/xCAT-test/autotest/testcase/install_xCAT/case0 +++ b/xCAT-test/autotest/testcase/install_xCAT/case0 @@ -20,8 +20,17 @@ cmd:service xcatd status check:rc==0 check:output=~running cmd:rm -rf /install_xCAT_xcat-core.tar.bz2 /install_xCAT_xcat-dep.tar.bz2 -end +# Check host keys supported by the operating system and report new ones, if any. +cmd:echo -e "dsa\necdsa\ned25519\nrsa\nrsa1" > /tmp/known_host_keys +check:rc==0 +cmd:ssh-keygen --help 2>&1 | grep "\[-t" | cut -d "[" -f4 | cut -d "]" -f1 | sed 's/-t//' | sed 's/|//g' | xargs -n 1 > /tmp/current_os_host_keys +check:rc==0 +cmd:diff /tmp/known_host_keys /tmp/current_os_host_keys +check:output!~> +cmd:rm -f /tmp/known_host_keys /tmp/current_os_host_keys +check:rc==0 +end start:install_xCAT_on_ubuntu description:install xCAT with go-xcat tool in a fresh environment for ubuntu @@ -57,6 +66,14 @@ cmd:service conserver stop cmd:sleep 5 cmd:service goconserver status cmd:service conserver status + +# Check host keys supported by the operating system and report new ones, if any. +cmd:echo -e "dsa\necdsa\ned25519\nrsa\nrsa1" > /tmp/known_host_keys +check:rc==0 +cmd:ssh-keygen --help 2>&1 | grep "\[-t" | cut -d "[" -f4 | cut -d "]" -f1 | sed 's/-t//' | sed 's/|//g' | xargs -n 1 > /tmp/current_os_host_keys +check:rc==0 +cmd:diff /tmp/known_host_keys /tmp/current_os_host_keys +check:output!~> +cmd:rm -f /tmp/known_host_keys /tmp/current_os_host_keys +check:rc==0 end - - From 7fcd6aef759382b63b2d4b88530f2261b9c1d85d Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Tue, 7 Jun 2022 16:14:36 -0400 Subject: [PATCH 7/7] Update /etc/kdump.conf --- xCAT/postscripts/enablekdump | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xCAT/postscripts/enablekdump b/xCAT/postscripts/enablekdump index 7ec182dd4..7c1282240 100755 --- a/xCAT/postscripts/enablekdump +++ b/xCAT/postscripts/enablekdump @@ -247,6 +247,8 @@ EOF echo "nfs $KDIP:$KDPATH" > /etc/kdump.conf echo "default shell" >> /etc/kdump.conf + echo "path /var/crash" >> /etc/kdump.conf + echo "core_collector makedumpfile -c --message-level 1 -d 31" >> /etc/kdump.conf #strip "xcat" out of the initramfs for kdump echo "dracut_args --omit \"xcat\"" >> /etc/kdump.conf #strip the unnecessary kernel options from /proc/cmdline