From 9c6ae3ed6eec1480c3a21830f3d0f4f49b34f451 Mon Sep 17 00:00:00 2001 From: bxuxa Date: Wed, 17 Oct 2018 15:08:53 +0800 Subject: [PATCH 001/121] Handle the wrong table name when using tabch (#5151) - As a compatible, still using data to report the error message, but set exit code non-zero --- xCAT-server/lib/xcat/plugins/tabutils.pm | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/tabutils.pm b/xCAT-server/lib/xcat/plugins/tabutils.pm index c850a5814..2bc3a5c14 100644 --- a/xCAT-server/lib/xcat/plugins/tabutils.pm +++ b/xCAT-server/lib/xcat/plugins/tabutils.pm @@ -2297,6 +2297,7 @@ sub tabch { my %rsp; $rsp{data}->[0] = "Incorrect argument \"$_\".\n"; $rsp{data}->[1] = "Check man tabch or tabch -h\n"; + $rsp{errorcode}->[0] = 1; $callback->(\%rsp); return 1; } @@ -2318,14 +2319,23 @@ sub tabch { my %rsp; $rsp{data}->[0] = "Missing table name.\n"; $rsp{data}->[1] = "Check man tabch or tabch -h\n"; + $rsp{errorcode}->[0] = 1; $callback->(\%rsp); return 1; } + for (@tables_to_del) { - $tables{$_} = xCAT::Table->new($_, -create => 1, -autocommit => 0); - $tables{$_}->delEntries(\%keyhash); - $tables{$_}->commit; + my $tab = xCAT::Table->new($_, -create => 1, -autocommit => 0); + unless ($tab) { + my %rsp; + $rsp{data}->[0] = "Table $_ does not exist."; + $rsp{errorcode}->[0] = 1; + $callback->(\%rsp); + next; + } + $tab->delEntries(\%keyhash); + $tab->commit; } } else { @@ -2347,6 +2357,7 @@ sub tabch { } else { my %rsp; $rsp{data}->[0] = "Table $table does not exist.\n"; + $rsp{errorcode}->[0] = 1; $callback->(\%rsp); return 1; @@ -2386,7 +2397,7 @@ sub tabch { } unless (grep /$column/, @{ $xCAT::Schema::tabspec{$table}->{cols} }) { $callback->({ error => "$table.$column not a valid table.column description", errorcode => [1] }); - return; + return 1; } $tableupdates{$table}{$column} = $value; } From f3459ae4156947c47e10198ae3488d81867a4f88 Mon Sep 17 00:00:00 2001 From: bxuxa Date: Wed, 17 Oct 2018 15:26:58 +0800 Subject: [PATCH 002/121] Add testcase chtab_nonexist_table for chtab CLI --- xCAT-test/autotest/testcase/chtab/cases0 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xCAT-test/autotest/testcase/chtab/cases0 b/xCAT-test/autotest/testcase/chtab/cases0 index fbc6d4106..3b35fa15e 100644 --- a/xCAT-test/autotest/testcase/chtab/cases0 +++ b/xCAT-test/autotest/testcase/chtab/cases0 @@ -62,6 +62,18 @@ check:output=~Usage end +start:chtab_nonexist_table +description:chtab with nonexisting table name +label:mn_only,db +cmd:tabch -d key=abc123 nonexist_table1 nonexist_table2 +check:rc!=0 +check:output=~Table nonexist_table1 does not exist +check:output=~Table nonexist_table2 does not exist +cmd:tabch key=abc123 nonexist_table1.comments="mg" +check:rc!=0 +check:output=~Table nonexist_table1 does not exist +end + start:chtab_err_table description:chtab with error table label:mn_only,db From 344c05f6581e5d2463ab9cf300e2e6fdfeae9ad6 Mon Sep 17 00:00:00 2001 From: xuweibj Date: Wed, 17 Oct 2018 22:37:21 -0400 Subject: [PATCH 003/121] fix issue 5701, support site.httpport setting for xcatmn check --- xCAT-probe/lib/perl/probe_utils.pm | 12 +++++++++++- xCAT-probe/subcmds/xcatmn | 16 ++++++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/xCAT-probe/lib/perl/probe_utils.pm b/xCAT-probe/lib/perl/probe_utils.pm index 039a9c8e7..9cfe1c319 100644 --- a/xCAT-probe/lib/perl/probe_utils.pm +++ b/xCAT-probe/lib/perl/probe_utils.pm @@ -286,10 +286,20 @@ sub is_firewall_open { sub is_http_ready { my $mnip = shift; $mnip = shift if (($mnip) && ($mnip =~ /probe_utils/)); + my $httpport = shift; my $installdir = shift; my $errormsg_ref = shift; - my $http = "http://$mnip/$installdir/postscripts/syslog"; + my $http_status = `netstat -tunlp | grep -e "httpd" -e "apache" | grep "LISTEN" 2>&1`; + if (!$http_status) { + $$errormsg_ref = "No HTTP listening status get by command 'netstat'"; + return 0; + } elsif ($http_status !~ /\S*\s+\S*\s+\S*\s+\S*$httpport\s+.+/) { + $$errormsg_ref = "The port defined in 'site' table HTTP is not listening"; + return 0; + } + + my $http = "http://$mnip:$httpport/$installdir/postscripts/syslog"; my %httperror = ( "400" => "The request $http could not be understood by the server due to malformed syntax", "401" => "The request requires user authentication.", diff --git a/xCAT-probe/subcmds/xcatmn b/xCAT-probe/subcmds/xcatmn index 9264a5174..612e95620 100755 --- a/xCAT-probe/subcmds/xcatmn +++ b/xCAT-probe/subcmds/xcatmn @@ -715,10 +715,18 @@ sub check_http_service { push @$error_ref, "HTTP check need 'wget' tool, please install 'wget' tool and try again"; } else { { - my $installdir = `lsdef -t site -i installdir -c 2>&1 | awk -F'=' '{print \$2}'`; - chomp($installdir); + my $httpinfo = `lsdef -t site -i installdir,httpport -c 2>&1`; + my $installdir = ""; + my $httpport = 80; + if ($httpinfo =~ /clustersite: installdir=(\S*)/) { + $installdir = $1; + } + if ($httpinfo =~ /clustersite: httpport=(\S*)/) { + $httpport = $1; + } + unless($installdir){ - push @$error_ref, "HTTP work path(installdir) isn't configured in 'sit' table"; + push @$error_ref, "HTTP work path(installdir) isn't configured in 'site' table"; last; } @@ -728,7 +736,7 @@ sub check_http_service { } my $errormsg; - unless(probe_utils->is_http_ready("$serverip", $installdir, \$errormsg)) { + unless(probe_utils->is_http_ready("$serverip", $httpport, $installdir, \$errormsg)) { push @$error_ref, "$errormsg"; last; } From 1daa1efcb995270629dcaf36b79234fada57273d Mon Sep 17 00:00:00 2001 From: xuweibj Date: Thu, 18 Oct 2018 03:35:32 -0400 Subject: [PATCH 004/121] fix issue 5700, support site.httpport to be used in discovery --- xCAT-probe/subcmds/discovery | 52 +++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/xCAT-probe/subcmds/discovery b/xCAT-probe/subcmds/discovery index b3b9b7993..a926064f2 100755 --- a/xCAT-probe/subcmds/discovery +++ b/xCAT-probe/subcmds/discovery @@ -585,9 +585,15 @@ sub check_genesis_file { } } - my $tftpdir = `tabdump site | awk -F',' '/^"tftpdir",/ { gsub(/"/, "", \$2) ; print \$2 }'`; - chomp($tftpdir); - $tftpdir =~ s/"//g; + my $site_info = `lsdef -t site -i tftpdir,httpport -c`; + my $tftpdir = ""; + my $httpport = 80; + if ($site_info =~ /clustersite: tftpdir=(\S*)/) { + $tftpdir = $1; + } + if ($site_info =~ /clustersite: httpport=(\S*)/) { + $httpport = $1; + } my $genesis_folder; my @genesis_files; my $genesis_line; @@ -623,14 +629,22 @@ sub check_genesis_file { if ($genesis_line =~ /^initrd/) { @initrd_info = split(' ', $genesis_line); $initrd_path = $initrd_info[1]; - $wget_rst = system("wget -q --spider $initrd_path -T 0.5 -t 3"); - if ($wget_rst) { - push @errors, "'initrd' cannot be downloaded from $initrd_path."; - $rst = 1; - } - if ($initrd_path =~ /http:\/\/.+:80(\/.+)/) { - my $initrd_file = $1; + if ($initrd_path =~ /http:\/\/.+:(\d*)(\/.+)/) { + my $initrd_port = $1; + my $initrd_file = $2; + + if ($initrd_port != $httpport) { + push @errors, "The http port for initrd file in '$file' is not the same with defined in 'site' table."; + $rst = 1; + } else { + $wget_rst = system("wget -q --spider $initrd_path -T 0.5 -t 3"); + if ($wget_rst) { + push @errors, "'initrd' cannot be downloaded from $initrd_path."; + $rst = 1; + } + } + my $initrd_time = `stat $initrd_file | grep Modify | cut -d ' ' -f 2-3`; if ($genesis_time and $initrd_time < $genesis_time) { $genesis_update_flag_p = 1; @@ -641,10 +655,18 @@ sub check_genesis_file { if ($genesis_line =~ /^kernel/) { @kernel_info = split(' ', $genesis_line); $kernel_path = $kernel_info[1]; - $wget_rst = system("wget -q --spider $kernel_path -T 0.5 -t 3"); - if ($wget_rst) { - push @errors, "kernel cannot be downloaded from $kernel_path."; - $rst = 1; + if ($kernel_path =~ /http:\/\/.+:(\d*)\/.+/) { + my $kernel_port = $1; + if ($kernel_port != $httpport) { + push @errors, "The http port for kernel file in '$file' is not the same with defined in 'site' table."; + $rst = 1; + } else { + $wget_rst = system("wget -q --spider $kernel_path -T 0.5 -t 3"); + if ($wget_rst) { + push @errors, "kernel cannot be downloaded from $kernel_path."; + $rst = 1; + } + } } } } @@ -703,7 +725,7 @@ sub check_genesis_file { next; } - $host_ip .= ":80"; + $host_ip .= ":$httpport"; while ($genesis_line = ) { chomp($genesis_line); $genesis_line =~ s/^\s+|\s+$//g; From 3a9e0b7aabbbac8fbb4013f548b773561a32bdde Mon Sep 17 00:00:00 2001 From: litingt Date: Fri, 19 Oct 2018 04:13:25 -0400 Subject: [PATCH 005/121] update for master release --- Version | 1 - 1 file changed, 1 deletion(-) diff --git a/Version b/Version index a168408c9..e69de29bb 100644 --- a/Version +++ b/Version @@ -1 +0,0 @@ -2.14.4 From a359c3f3e194af606d8bc5d24d324ba1b8e80df6 Mon Sep 17 00:00:00 2001 From: litingt Date: Fri, 19 Oct 2018 04:31:46 -0400 Subject: [PATCH 006/121] update for xcat 2.14.4 release --- Version | 1 + 1 file changed, 1 insertion(+) diff --git a/Version b/Version index e69de29bb..13f713365 100644 --- a/Version +++ b/Version @@ -0,0 +1 @@ +2.14.52.14.52.14.52.14.52.14.5 From 5a42867388402ed9b93fe082d0ae1abd5fe5004c Mon Sep 17 00:00:00 2001 From: Weihua Hu Date: Fri, 19 Oct 2018 17:07:49 +0800 Subject: [PATCH 007/121] Update Version --- Version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Version b/Version index 13f713365..fbdb3b99a 100644 --- a/Version +++ b/Version @@ -1 +1 @@ -2.14.52.14.52.14.52.14.52.14.5 +2.14.5 From fffd1e6f51f11fa6fa19fe2905be1e1922c72528 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Tue, 23 Oct 2018 04:00:43 -0400 Subject: [PATCH 008/121] do task 342, update cases according to xcat-inventory design change --- .../testcase/xcat-inventory/cases.environment | 5 +--- .../testcase/xcat-inventory/cases.include | 1 - .../test.environments.osimage.stanza | 2 +- .../test.environments.osimage.update.json | 9 ++++--- .../test.environments.osimage.update.yaml | 6 +++-- .../test.environments.osimage.yaml | 26 ++++++++++++++----- 6 files changed, 31 insertions(+), 18 deletions(-) diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.environment b/xCAT-test/autotest/testcase/xcat-inventory/cases.environment index 6e25e315a..ab7b69d2a 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.environment +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.environment @@ -22,7 +22,6 @@ check:rc==0 cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then mv $rootimgdir $rootimgdir.regbak -f;fi check:rc==0 cmd:xcat-inventory import -f /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml -e GITREPO=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo -e SWDIR=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir -check:output=~Importing object: test.environments.osimage check:output=~Inventory import successfully! check:rc==0 cmd:lsdef -t osimage -o test.environments.osimage @@ -86,7 +85,6 @@ cmd:lsdef -t osimage -o test.environments.osimage >/dev/null 2>&1;if [[ $? -eq 0 check:rc==0 cmd:dir="/tmp/export";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi; mkdir -p $dir cmd:xcat-inventory import -f /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml -e GITREPO=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo -e SWDIR=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir -check:output=~Importing object: test.environments.osimage check:output=~Inventory import successfully! check:rc==0 cmd:lsdef -t osimage -o test.environments.osimage -z >> /tmp/export/test.environments.osimage.yaml.stanza @@ -101,14 +99,13 @@ check:rc==0 cmd:rmdef -t osimage -o test.environments.osimage check:rc==0 cmd:xcat-inventory import -f /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json -e GITREPO=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo -e SWDIR=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir -check:output=~Importing object: test.environments.osimage check:output=~Inventory import successfully! check:rc==0 cmd:lsdef -t osimage -o test.environments.osimage -z >> /tmp/export/test.environments.osimage.json.stanza check:rc==0 cmd:diff -y /tmp/export/test.environments.osimage.json.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza check:rc==0 -cmd:xcat-inventory export -t osimage -o test.environments.osimage -f /tmp/export/test.environments.osimage.json +cmd:xcat-inventory export -t osimage -o test.environments.osimage -f /tmp/export/test.environments.osimage.json --format json check:rc==0 cmd:diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json /tmp/export/test.environments.osimage.json --ignore-blank-lines -I "^#" check:rc==0 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.include b/xCAT-test/autotest/testcase/xcat-inventory/cases.include index e1c85460f..6c12aff9f 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.include +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.include @@ -28,7 +28,6 @@ check:rc==0 cmd:rm -rf /tmp/imagedata/test_osimage cmd:xcat-inventory import -t osimage -d /tmp/imagedata/export check:rc==0 -check:output=~Importing object: test_osimage check:output=~Inventory import successfully! check:output=~The object test_osimage has been imported cmd:lsdef -t osimage -o test_osimage diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza index 903363536..86faff377 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza @@ -2,7 +2,7 @@ test.environments.osimage: objtype=osimage - environvar=GITREPO=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo,SWDIR=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir + environvar=GITREPO=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo,OBJNAME=test.environments.osimage,SWDIR=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir imagetype=linux osarch=ppc64le osdistroname=rhels7.5-alternate-ppc64le diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json index 68752808b..5e7680b40 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json @@ -8,7 +8,10 @@ "osname": "Linux" }, "deprecated": { - "comments": "rhels7.5,test_environment_variables" + "comments": [ + "rhels7.5", + "test_environment_variables" + ] }, "filestosync": [ "{{GITREPO}}/syncfiles/synclist" @@ -19,7 +22,7 @@ "/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall", "{{GITREPO}}/postinstall/test1.postinstall" ], - "rootimgdir": "/install/custom/test.environments.osimage" + "rootimgdir": "/install/custom/{{OBJNAME}}" }, "imagetype": "linux", "package_selection": { @@ -47,4 +50,4 @@ }, "schema_version": "1.0" } -#Version 2.14.2 (git commit 09f0772835afdc0f962c9e7fe8cef862e9505ad7, built Tue Jun 19 01:58:56 EDT 2018) +#Version 2.14.4 (git commit 722709b61e63feb7f6d3ee787afa8113eefbe27e, built Wed Sep 26 06:17:57 EDT 2018) \ No newline at end of file diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml index c4f10968e..ced0777ea 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml @@ -6,7 +6,9 @@ osimage: osdistro: rhels7.5-alternate-ppc64le osname: Linux deprecated: - comments: rhels7.5,test_environment_variables + comments: + - rhels7.5 + - test_environment_variables filestosync: - '{{GITREPO}}/syncfiles/synclist' genimgoptions: @@ -14,7 +16,7 @@ osimage: postinstall: - /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall - '{{GITREPO}}/postinstall/test1.postinstall' - rootimgdir: /install/custom/test.environments.osimage + rootimgdir: /install/custom/{{OBJNAME}} imagetype: linux package_selection: otherpkgdir: diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml index 82143abc4..b6649accf 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml @@ -5,19 +5,31 @@ osimage: distribution: rhels7.5 osdistro: rhels7.5-ppc64le osname: Linux - filestosync: {{GITREPO}}/syncfiles/synclist + filestosync: + - {{GITREPO}}/syncfiles/synclist deprecated: - comments: rhels7.5,test_environment_variables + comments: + - rhels7.5 + - test_environment_variables genimgoptions: permission: '755' - postinstall: /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall,{{GITREPO}}/postinstall/test1.postinstall - rootimgdir: /install/custom/test.environments.osimage + postinstall: + - /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall + - {{GITREPO}}/postinstall/test1.postinstall + rootimgdir: /install/custom/{{OBJNAME}} imagetype: linux package_selection: otherpkgdir: {{SWDIR}}/otherpkgdir/ - otherpkglist: {{GITREPO}}/otherpkglist/test1.otherpkglist,{{GITREPO}}/otherpkglist/test2.otherpkglist, - pkgdir: /install/rhels7.5/ppc64le,{{SWDIR}}/pkgdir/ - pkglist: /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist,{{GITREPO}}/pkglist/test1.pkglist,{{GITREPO}}/pkglist/test2.pkglist + otherpkglist: + - {{GITREPO}}/otherpkglist/test1.otherpkglist + - {{GITREPO}}/otherpkglist/test2.otherpkglist, + pkgdir: + - /install/rhels7.5/ppc64le + - {{SWDIR}}/pkgdir/ + pkglist: + - /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist + - {{GITREPO}}/pkglist/test1.pkglist + - {{GITREPO}}/pkglist/test2.pkglist provision_mode: netboot role: compute schema_version: '1.0' From ea215738d789ddf239964aabdbc764b44f0f1f8d Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Tue, 23 Oct 2018 13:07:57 -0400 Subject: [PATCH 009/121] Process --noupdateinitrd and --ignorekernelchk flags even when osimage is not specified --- .../admin-guides/references/man5/site.5.rst | 7 ++++-- .../references/man8/rinstall.8.rst | 6 ++--- xCAT-client/pods/man8/rinstall.8.pod | 6 ++--- xCAT-server/lib/xcat/plugins/rinstall.pm | 22 ++++++++++++------- 4 files changed, 25 insertions(+), 16 deletions(-) diff --git a/docs/source/guides/admin-guides/references/man5/site.5.rst b/docs/source/guides/admin-guides/references/man5/site.5.rst index a7f482df2..d58a76b2c 100644 --- a/docs/source/guides/admin-guides/references/man5/site.5.rst +++ b/docs/source/guides/admin-guides/references/man5/site.5.rst @@ -393,9 +393,12 @@ site Attributes: entries generated by 'makehosts' will put the FQDN before the PQDN(Partially Qualified Domain Name). Otherwise, the original behavior will be performed. - hierarchicalattrs: Table attributes(e.g. postscripts, postbootscripts) that will be - included hierarchically. Attribute values for all the node's groups + hierarchicalattrs: A comma delimited list of table attributes(e.g. postscripts, postbootscripts) + that will be included hierarchically. Attribute values for all the node's groups will be applied to the node in the groups' order except the repeat one. + By default, comma is used to combine the values. But some columns use different + delimiter, to specify delimiter for those columns as format of 'column:delimiter'. + dbtracelevel: The trace level for the database access log. To activate this setting, please. restart xcatd or send HUP signal to the 'xcatd: DB Access' process, Like: . ps -ef | grep 'xcatd: DB Access' | grep -v grep | awk '{print $2}' | xargs kill -HUP diff --git a/docs/source/guides/admin-guides/references/man8/rinstall.8.rst b/docs/source/guides/admin-guides/references/man8/rinstall.8.rst index 501048030..972bd40c5 100644 --- a/docs/source/guides/admin-guides/references/man8/rinstall.8.rst +++ b/docs/source/guides/admin-guides/references/man8/rinstall.8.rst @@ -21,7 +21,7 @@ Name \ **rinstall**\ \ *noderange*\ [\ **boot**\ | \ **shell**\ | \ **runcmd=**\ \ *command*\ ] [\ **-c | -**\ **-console**\ ] [\ **-V | -**\ **-verbose**\ ] -\ **rinstall**\ \ *noderange*\ \ **osimage**\ [=\ *imagename*\ ] [\ **-**\ **-noupdateinitrd**\ ][\ **-**\ **-ignorekernelchk**\ ] [\ **-c | -**\ **-console**\ ] [\ **-u | -**\ **-uefimode**\ ] [\ **-V | -**\ **-verbose**\ ] +\ **rinstall**\ \ *noderange*\ [\ **osimage**\ [=\ *imagename*\ ]] [\ **-**\ **-noupdateinitrd**\ ][\ **-**\ **-ignorekernelchk**\ ] [\ **-c | -**\ **-console**\ ] [\ **-u | -**\ **-uefimode**\ ] [\ **-V | -**\ **-verbose**\ ] \ **rinstall**\ \ *noderange*\ \ **runimage=**\ \ *task*\ @@ -35,9 +35,9 @@ Name \ **rinstall**\ is a convenience command to begin OS provision on a noderange. -If \ **osimage**\ =\ *imagename*\ is specified or \ **osimage**\ is specified and nodetype.provmethod=\ **osimage**\ is set, provision the noderange with the osimage specified/configured. +If \ **osimage**\ =\ *imagename*\ is specified or \ **osimage**\ is specified and nodetype.provmethod=\ *osimage*\ is set, provision the noderange with the osimage specified/configured. If no task specified, default is \ **osimage**\ . -If \ **-c**\ is specified, it will then run \ **rcons**\ on the node. This is allowed only if one node is in the noderange. If consoles are needed on multiple nodes, see winstall(8)|winstall.8. +If \ **-c**\ is specified, \ **rinstall**\ will run \ **rcons**\ on the node. This is allowed only if one node is in the noderange. If consoles are needed on multiple nodes, see winstall(8)|winstall.8. *************** diff --git a/xCAT-client/pods/man8/rinstall.8.pod b/xCAT-client/pods/man8/rinstall.8.pod index 9d731858d..17b7a4898 100644 --- a/xCAT-client/pods/man8/rinstall.8.pod +++ b/xCAT-client/pods/man8/rinstall.8.pod @@ -6,7 +6,7 @@ B - Begin OS provision on a noderange B I [B | B | BI] [B<-c>|B<--console>] [B<-V>|B<--verbose>] -B I B[=I] [B<--noupdateinitrd>][B<--ignorekernelchk>] [B<-c>|B<--console>] [B<-u>|B<--uefimode>] [B<-V>|B<--verbose>] +B I [B[=I]] [B<--noupdateinitrd>][B<--ignorekernelchk>] [B<-c>|B<--console>] [B<-u>|B<--uefimode>] [B<-V>|B<--verbose>] B I BI @@ -16,9 +16,9 @@ B [B<-h>|B<--help>|B<-v>|B<--version>] B is a convenience command to begin OS provision on a noderange. -If B=I is specified or B is specified and nodetype.provmethod=B is set, provision the noderange with the osimage specified/configured. +If B=I is specified or B is specified and nodetype.provmethod=I is set, provision the noderange with the osimage specified/configured. If no task specified, default is B. -If B<-c> is specified, it will then run B on the node. This is allowed only if one node is in the noderange. If consoles are needed on multiple nodes, see L. +If B<-c> is specified, B will run B on the node. This is allowed only if one node is in the noderange. If consoles are needed on multiple nodes, see L. =head1 B diff --git a/xCAT-server/lib/xcat/plugins/rinstall.pm b/xCAT-server/lib/xcat/plugins/rinstall.pm index 7bc13461a..52fcc4e27 100644 --- a/xCAT-server/lib/xcat/plugins/rinstall.pm +++ b/xCAT-server/lib/xcat/plugins/rinstall.pm @@ -257,12 +257,6 @@ sub rinstall { push @parameter, "osimage=$OSIMAGE"; - if ($ignorekernelchk) { - push @parameter, "--ignorekernelchk"; - } - if ($noupdateinitrd) { - push @parameter, "--noupdateinitrd"; - } } elsif ($STATES) { push @parameter, "$STATES"; @@ -318,6 +312,18 @@ sub rinstall { #only provision the normal nodes @nodes = @validnodes; push @parameter, "osimage"; + + } + + if ( grep( /osimage/, @parameter ) ) { + # Task is osimage, check --ignorekernelchk and --noupdateinitrd flags and set if needed + + if ($ignorekernelchk) { + push @parameter, "--ignorekernelchk"; + } + if ($noupdateinitrd) { + push @parameter, "--noupdateinitrd"; + } } if (scalar(@nodes) == 0) { @@ -406,7 +412,7 @@ sub rinstall { $::RUNCMD_RC = 0; my @nodes = @{ $hmhash{$hmkey} }; unless ($hmkey =~ /^(ipmi|blade|hmc|ivm|fsp|kvm|esx|rhevm|openbmc)$/) { - $rsp->{error}->[0] = "@nodes: rinstall only support nodehm.mgt type 'ipmi', 'blade', 'hmc', 'ivm', 'fsp', 'kvm', 'esx', 'rhevm'."; + $rsp->{error}->[0] = "@nodes: rinstall only support nodehm.mgt type 'ipmi', 'blade', 'hmc', 'ivm', 'fsp', 'kvm', 'esx', 'rhevm', 'openbmc'."; $rsp->{errorcode}->[0] = 1; xCAT::MsgUtils->message("E", $rsp, $callback); next; @@ -598,7 +604,7 @@ sub usage { my $rsp = {}; $rsp->{data}->[0] = "Usage:"; $rsp->{data}->[1] = " $command [boot | shell | runcmd=] [-c|--console] [-u|--uefimode] [-V|--verbose]"; - $rsp->{data}->[2] = " $command osimage[=] [--noupdateinitrd] [--ignorekernelchk] [-c|--console] [-u|--uefimode] [-V|--verbose]"; + $rsp->{data}->[2] = " $command [osimage[=]] [--noupdateinitrd] [--ignorekernelchk] [-c|--console] [-u|--uefimode] [-V|--verbose]"; $rsp->{data}->[3] = " $command runimage="; $rsp->{data}->[4] = " $command [-h|--help|-v|--version]"; xCAT::MsgUtils->message("I", $rsp, $callback); From 735b121e15abec0b9e9dbb6ffb112cb1d9bdfd8e Mon Sep 17 00:00:00 2001 From: Yuan Bai Date: Wed, 24 Oct 2018 17:03:52 +0800 Subject: [PATCH 010/121] classify deployment log and updatenode log (#5725) * classify deployment log and updatenode log * add deployment starting for xcatroot --- .../share/xcat/install/scripts/post.xcat | 9 ++-- .../share/xcat/install/scripts/post.xcat.ng | 8 ++-- .../share/xcat/netboot/rh/dracut/xcatroot | 4 +- .../share/xcat/netboot/rh/dracut_033/xcatroot | 2 +- .../share/xcat/netboot/rh/dracut_047/xcatroot | 3 +- xCAT/postscripts/xcatdsklspost | 46 ++++++++++++------- xCAT/postscripts/xcatinstallpost | 11 +++-- 7 files changed, 48 insertions(+), 35 deletions(-) diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index f200f93ff..0abaf48c5 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -39,6 +39,7 @@ chmod 0755 /tmp/updateflag cd /tmp log_label="xcat.deployment" +msgutil_r "$MASTER_IP" "info" "=============deployment starting====================" "/var/log/xcat/xcat.log" "$log_label" msgutil_r "$MASTER_IP" "info" "Executing post.xcat to prepare for firstbooting ..." "/var/log/xcat/xcat.log" "$log_label" RAND=$(perl -e 'print int(rand(50)). "\n"') @@ -196,9 +197,9 @@ run_ps () { if [ -z \"\$scriptype\" ]; then scriptype=\"postscript\" fi - + log_label=\"xcat.deployment.\"\$scriptype if [ -f \$1 ]; then - msgutil_r \"\$MASTER_IP\" \"info\" "\"Running \$scriptype: \$1\"" \"\$logfile\" \"xcat.mypostscript\" + msgutil_r \"\$MASTER_IP\" \"info\" "\"\$scriptype start..: \$1\"" \"\$logfile\" \"\$log_label\" if [ \"\$XCATDEBUGMODE\" = \"1\" ] || [ \"\$XCATDEBUGMODE\" = \"2\" ]; then local compt=\$(file \$1) local reg=\"shell script\" @@ -217,9 +218,9 @@ run_ps () { if [ \"\$ret_local\" -ne \"0\" ]; then return_value=\$ret_local fi - msgutil_r \"\$MASTER_IP\" \"info\" "\"\$scriptype \$1 return with \$ret_local\"" \"\$logfile\" \"xcat.mypostscript\" + msgutil_r \"\$MASTER_IP\" \"info\" "\"\$scriptype end...: \$1 return with \$ret_local\"" \"\$logfile\" \"\$log_label\" else - msgutil_r \"\$MASTER_IP\" \"error\" "\"\$scriptype \$1 does NOT exist.\"" \"\$logfile\" \"xcat.mypostscript\" + msgutil_r \"\$MASTER_IP\" \"error\" "\"\$scriptype \$1 does NOT exist.\"" \"\$logfile\" \"\$log_label\" return_value=-1 fi diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat.ng b/xCAT-server/share/xcat/install/scripts/post.xcat.ng index 07c4e64bd..4f206b279 100644 --- a/xCAT-server/share/xcat/install/scripts/post.xcat.ng +++ b/xCAT-server/share/xcat/install/scripts/post.xcat.ng @@ -242,9 +242,9 @@ run_ps () { if [ -z \"\$scriptype\" ]; then scriptype=\"postscript\" fi - + log_label=\"xcat.deployment.\"\$scriptype if [ -f \$1 ]; then - msgutil_r \"\$MASTER_IP\" \"info\" "\"Running \$scriptype: \$1\"" \"\$logfile\" \"xcat.mypostscript\" + msgutil_r \"\$MASTER_IP\" \"info\" "\"Running \$scriptype: \$1\"" \"\$logfile\" \"\$log_label\" if [ \"\$XCATDEBUGMODE\" = \"1\" ] || [ \"\$XCATDEBUGMODE\" = \"2\" ]; then local compt=\$(file \$1) local reg=\"shell script\" @@ -263,9 +263,9 @@ run_ps () { if [ \"\$ret_local\" -ne \"0\" ]; then return_value=\$ret_local fi - msgutil_r \"\$MASTER_IP\" \"info\" "\"\$scriptype \$1 return with \$ret_local\"" \"\$logfile\" \"xcat.mypostscript\" + msgutil_r \"\$MASTER_IP\" \"info\" "\"\$scriptype \$1 return with \$ret_local\"" \"\$logfile\" \"\$log_label\" else - msgutil_r \"\$MASTER_IP\" \"error\" "\"\$scriptype \$1 does NOT exist.\"" \"\$logfile\" \"xcat.mypostscript\" + msgutil_r \"\$MASTER_IP\" \"error\" "\"\$scriptype \$1 does NOT exist.\"" \"\$logfile\" \"\$log_label\" return_value=-1 fi diff --git a/xCAT-server/share/xcat/netboot/rh/dracut/xcatroot b/xCAT-server/share/xcat/netboot/rh/dracut/xcatroot index 6136b3471..d70a64323 100755 --- a/xCAT-server/share/xcat/netboot/rh/dracut/xcatroot +++ b/xCAT-server/share/xcat/netboot/rh/dracut/xcatroot @@ -2,7 +2,7 @@ NEWROOT=$3 RWDIR=.statelite XCATMASTER=$XCAT - +log_label="xcat.deployment" . /lib/dracut-lib.sh rootlimit="$(getarg rootlimit=)" @@ -20,7 +20,7 @@ xcatdebugmode="$(getarg xcatdebugmode=)" [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "running xcatroot...." [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "MASTER=$MASTER XCATIPORT=$XCATIPORT" - +logger -t $log_label -p local4.info "=============deployment starting====================" if [ "$NODESTATUS" != "0" ]; then [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "nodestatus: netbooting,reporting..." /tmp/updateflag $MASTER $XCATIPORT "installstatus netbooting" diff --git a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot index 924fe1c1c..1bab4cf52 100755 --- a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot +++ b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot @@ -21,7 +21,7 @@ if [ $? -ne 0 ]; then fi [ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER" - +logger $SYSLOGHOST -t $log_label -p local4.info "=============deployment starting====================" logger $SYSLOGHOST -t $log_label -p local4.info "Executing xcatroot to prepare for netbooting (dracut_33)..." [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p local4.debug "MASTER=$MASTER XCATIPORT=$XCATIPORT NODESTATUS=$NODESTATUS" diff --git a/xCAT-server/share/xcat/netboot/rh/dracut_047/xcatroot b/xCAT-server/share/xcat/netboot/rh/dracut_047/xcatroot index 1956735dd..254adb7fe 100755 --- a/xCAT-server/share/xcat/netboot/rh/dracut_047/xcatroot +++ b/xCAT-server/share/xcat/netboot/rh/dracut_047/xcatroot @@ -1,5 +1,4 @@ #!/bin/bash -set -x log_label="xcat.deployment" NEWROOT=$3 @@ -22,7 +21,7 @@ if [ $? -ne 0 ]; then fi [ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER" - +logger $SYSLOGHOST -t $log_label -p local4.info "=============deployment starting====================" logger $SYSLOGHOST -t $log_label -p local4.info "Executing xcatroot to prepare for netbooting (dracut_33)..." [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p local4.debug "MASTER=$MASTER XCATIPORT=$XCATIPORT NODESTATUS=$NODESTATUS" diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index 430fc367e..d1af92cc3 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -68,11 +68,11 @@ echolog() echo "$msgstr" fi if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then - msgutil_r "$MASTER_IP" "$msgtype" "$msgstr" "/var/log/xcat/xcat.log" "xcat.xcatdsklspost" + msgutil_r "$MASTER_IP" "$msgtype" "$msgstr" "/var/log/xcat/xcat.log" "$log_label" fi else echo "$msgstr" - msgutil_r "$MASTER_IP" "$msgtype" "$msgstr" "/var/log/xcat/xcat.log" "xcat.xcatdsklspost" + msgutil_r "$MASTER_IP" "$msgtype" "$msgstr" "/var/log/xcat/xcat.log" "$log_label" fi #reload the functions defined in./xcatlib.sh @@ -119,7 +119,6 @@ download_postscripts() INSTALLDIR="/install" fi fi - echolog "debug" "trying to download postscripts from http://$server$INSTALLDIR/postscripts/" max_retries=5 retry=0 @@ -216,8 +215,12 @@ pmatch () ARGNUM=$#; if [ -z $1 ]; then NODE_DEPLOYMENT=1 + log_label="xcat.deployment" + echolog "info" "=============deployment starting====================" else NODE_DEPLOYMENT=0 + log_label="xcat.updatenode" + echolog "info" "=============updatenode starting====================" case $1 in 1|2|5) MODE=$1 @@ -885,18 +888,22 @@ run_ps () { if [ -z \"\$scriptype\" ]; then scriptype=\"postscript\" fi - + if [ \$UPDATENODE -eq 0 ]; then + log_label=\"xcat.deployment.\"\$scriptype + else + log_label=\"xcat.updatenode.\"\$scriptype + fi if [ -f \$1 ]; then - echo \"Running \$scriptype: \$1\" - msgutil_r \"\$MASTER_IP\" \"info\" "\"Running \$scriptype: \$1\"" \"\$logfile\" \"xcat.mypostscript\" + echo \"\$scriptype start..: \$1\" + msgutil_r \"\$MASTER_IP\" \"info\" "\"\$scriptype start..: \$1\"" \"\$logfile\" \"\$log_label\" if [ \"\$XCATDEBUGMODE\" = \"1\" ] || [ \"\$XCATDEBUGMODE\" = \"2\" ]; then local compt=\$(file \$1) local reg=\"shell script\" if [[ \"\$compt\" =~ \$reg ]]; then - bash -x ./\$@ 2>&1 | tee -a \$logfile | tee >(logger -t xcat.mypostscript -p debug) + bash -x ./\$@ 2>&1 | tee -a \$logfile | tee >(logger -t \$log_label -p debug) ret_local=\${PIPESTATUS[0]} else - ./\$@ 2>&1 | tee -a \$logfile | tee >(logger -t xcat.mypostscript -p debug) + ./\$@ 2>&1 | tee -a \$logfile | tee >(logger -t \$log_label -p debug) ret_local=\${PIPESTATUS[0]} fi else @@ -907,11 +914,11 @@ run_ps () { if [ \"\$ret_local\" -ne \"0\" ]; then return_value=\$ret_local fi - echo \"\$scriptype: \$1 exited with code \$ret_local\" - msgutil_r \"\$MASTER_IP\" \"info\" "\"\$scriptype \$1 return with \$ret_local\"" \"\$logfile\" \"xcat.mypostscript\" + echo \"\$scriptype end....: \$1 exited with code \$ret_local\" + msgutil_r \"\$MASTER_IP\" \"info\" "\"\$scriptype end...:\$1 return with \$ret_local\"" \"\$logfile\" \"\$log_label\" else echo \"\`date\` \$scriptype \$1 does NOT exist.\" - msgutil_r \"\$MASTER_IP\" \"error\" "\"\$scriptype \$1 does NOT exist.\"" \"\$logfile\" \"xcat.mypostscript\" + msgutil_r \"\$MASTER_IP\" \"error\" "\"\$scriptype \$1 does NOT exist.\"" \"\$logfile\" \"\$log_label\" return_value=-1 fi @@ -937,23 +944,23 @@ if [ $NODE_DEPLOYMENT -eq 1 ] || [ "$MODE" = "4" ] || [ "$MODE" = "6" ]; then if [ "$MODE" = "6" ]; then echo " if [ \"\$return_value\" -eq \"0\" ]; then - msgutil_r \$MASTER_IP \"debug\" \"node booted successfully, reporting status...\" \"/var/log/xcat/xcat.log\" \"xcat.mypostscript\" + msgutil_r \$MASTER_IP \"debug\" \"node booted successfully, reporting status...\" \"/var/log/xcat/xcat.log\" \"\$log_label\" updateflag.awk \$MASTER 3002 \"installstatus booted\" else - msgutil_r \$MASTER_IP \"debug\" \"node boot failed, reporting status...\" \"/var/log/xcat/xcat.log\" \"xcat.mypostscript\" + msgutil_r \$MASTER_IP \"debug\" \"node boot failed, reporting status...\" \"/var/log/xcat/xcat.log\" \"\$log_label\" updateflag.awk \$MASTER 3002 \"installstatus failed\" fi " >> /$xcatpost/mypostscript else echo " if [ \"\$return_value\" -eq \"0\" ]; then - msgutil_r \$MASTER_IP \"debug\" \"node booted successfully, reporting status...\" \"/var/log/xcat/xcat.log\" \"xcat.mypostscript\" + msgutil_r \$MASTER_IP \"debug\" \"node booted successfully, reporting status...\" \"/var/log/xcat/xcat.log\" \"\$log_label\" updateflag.awk \$MASTER 3002 \"installstatus booted\" - msgutil_r \$MASTER_IP \"info\" \"provision completed.(\$NODE)\" \"/var/log/xcat/xcat.log\" \"xcat.mypostscript\" + msgutil_r \$MASTER_IP \"info\" \"provision completed.(\$NODE)\" \"/var/log/xcat/xcat.log\" \"\$log_label\" else - msgutil_r \$MASTER_IP \"debug\" \"node boot failed, reporting status...\" \"/var/log/xcat/xcat.log\" \"xcat.mypostscript\" + msgutil_r \$MASTER_IP \"debug\" \"node boot failed, reporting status...\" \"/var/log/xcat/xcat.log\" \"\$log_label\" updateflag.awk \$MASTER 3002 \"installstatus failed\" - msgutil_r \$MASTER_IP \"error\" \"provision completed with error.(\$NODE)\" \"/var/log/xcat/xcat.log\" \"xcat.mypostscript\" + msgutil_r \$MASTER_IP \"error\" \"provision completed with error.(\$NODE)\" \"/var/log/xcat/xcat.log\" \"\$log_label\" fi " >> /$xcatpost/mypostscript fi @@ -987,6 +994,11 @@ fi #tell user it is done when this is called by updatenode command if [ "$MODE" = "1" ] || [ "$MODE" = "2" ] || [ "$MODE" = "5" ]; then echolog "info" "returned from postscript" + echolog "info" "=============updatenode ending====================" +fi + +if [ $NODE_DEPLOYMENT -eq 1 ] || [ "$MODE" = "4" ] || [ "$MODE" = "6" ]; then + echolog "info" "=============deployment ending====================" fi exit $VRET_POST diff --git a/xCAT/postscripts/xcatinstallpost b/xCAT/postscripts/xcatinstallpost index 9e485818c..235c241d8 100755 --- a/xCAT/postscripts/xcatinstallpost +++ b/xCAT/postscripts/xcatinstallpost @@ -6,7 +6,7 @@ ################################################################# . /xcatpost/xcatlib.sh -log_label="xcat.xcatinstallpost" +log_label="xcat.deployment" if [ -f /xcatpost/mypostscript.post ]; then XCATDEBUGMODE=`grep 'XCATDEBUGMODE=' /xcatpost/mypostscript.post |cut -d= -f2 | tr -d \'\" | tr A-Z a-z ` MASTER_IP=`grep '^MASTER_IP=' /xcatpost/mypostscript.post |cut -d= -f2|sed s/\'//g` @@ -125,16 +125,16 @@ echo " if [ \"\$return_value\" -eq \"0\" ]; then if [ \"\$XCATDEBUGMODE\" = \"1\" ] || [ \"\$XCATDEBUGMODE\" = \"2\" ]; then - msgutil_r \"\$MASTER_IP\" \"debug\" \"node booted, reporting status...\" \"/var/log/xcat/xcat.log\" \"xcat.mypostscript\" + msgutil_r \"\$MASTER_IP\" \"debug\" \"node booted, reporting status...\" \"/var/log/xcat/xcat.log\" \"\$log_label\" fi updateflag.awk \$MASTER 3002 \"installstatus booted\" - msgutil_r \$MASTER_IP \"info\" \"provision completed.(\$NODE)\" \"/var/log/xcat/xcat.log\" \"xcat.mypostscript\" + msgutil_r \$MASTER_IP \"info\" \"provision completed.(\$NODE)\" \"/var/log/xcat/xcat.log\" \"\$log_label\" else if [ \"\$XCATDEBUGMODE\" = \"1\" ] || [ \"\$XCATDEBUGMODE\" = \"2\" ]; then - msgutil_r \"\$MASTER_IP\" \"debug\" \"node boot failed, reporting status...\" \"/var/log/xcat/xcat.log\" \"xcat.mypostscript\" + msgutil_r \"\$MASTER_IP\" \"debug\" \"node boot failed, reporting status...\" \"/var/log/xcat/xcat.log\" \"\$log_label\" fi updateflag.awk \$MASTER 3002 \"installstatus failed\" - msgutil_r \$MASTER_IP \"error\" \"provision completed with error.(\$NODE)\" \"/var/log/xcat/xcat.log\" \"xcat.mypostscript\" + msgutil_r \$MASTER_IP \"error\" \"provision completed with error.(\$NODE)\" \"/var/log/xcat/xcat.log\" \"\$log_label\" fi " >> /xcatpost/mypostscript.post fi @@ -145,4 +145,5 @@ if [ -x /xcatpost/mypostscript.post ];then msgutil_r "$MASTER_IP" "info" "Running /xcatpost/mypostscript.post" "/var/log/xcat/xcat.log" "$log_label" /xcatpost/mypostscript.post msgutil_r "$MASTER_IP" "info" "/xcatpost/mypostscript.post return" "/var/log/xcat/xcat.log" "$log_label" + msgutil_r "$MASTER_IP" "info" "=============deployment ending====================" "/var/log/xcat/xcat.log" "$log_label" fi From 01ad6cd6a612dd3f7e24923bf2b89d12d0d21c60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=E1=B4=8F=C9=B4=C9=A2=20Jie?= Date: Thu, 25 Oct 2018 13:24:15 +0800 Subject: [PATCH 011/121] Uninstall xCAT with go-xcat (#5674) * [go-xcat] Revise debug log, in order to make debugging go-xcat and bug reporting easier. * [go-xcat] Revise the prompt messages * [go-xcat] In yum/zypper repo file, use gpgcheck=1 * [go-xcat] Bump version number * [go-xcat] Revise the help messages * [go-xcat] xCAT uninstallation * [go-xcat] Fix kill command error messages * [go-xcat] Simplify command line argument processing * [go-xcat] When do a `check', only run update_repo * Update document of xCAT uninstallation - use `go-xcat uninstall` * [go-xcat] Handle goconserver in trash_xcat() * [go-xcat] Add goconserver to the uninstallation package list * Add goconserver to the uninstallation package list * [go-xcat] Fix debug_logger * [go-xcat] xCAT can be completely uninstalled --- .../maintenance/uninstall_xcat.rst | 19 +- xCAT-server/share/xcat/tools/go-xcat | 525 +++++++++++++----- 2 files changed, 406 insertions(+), 138 deletions(-) diff --git a/docs/source/guides/install-guides/maintenance/uninstall_xcat.rst b/docs/source/guides/install-guides/maintenance/uninstall_xcat.rst index c3e84774b..b31b1a79d 100644 --- a/docs/source/guides/install-guides/maintenance/uninstall_xcat.rst +++ b/docs/source/guides/install-guides/maintenance/uninstall_xcat.rst @@ -46,18 +46,25 @@ Stop xCAT Service Remove xCAT Files ----------------- -1. Remove the xCAT RPMs +1. Remove xCAT Packages - There is no easy way to identify all xCAT packages. For packages shipped by xCAT, you can remove them by using the commands below. + To automatically remove all xCAT packages, run the following command :: - [RHEL and SLES] :: + /opt/xcat/share/xcat/tools/go-xcat uninstall - yum remove '*xcat*' - yum remove '*xCAT*' + There is no easy way to identify all xCAT packages. For packages shipped by xCAT, you can manually remove them by using one of the commands below. + + [RHEL] :: + + yum remove conserver-xcat elilo-xcat goconserver grub2-xcat ipmitool-xcat perl-xCAT syslinux-xcat xCAT xCAT-SoftLayer xCAT-buildkit xCAT-client xCAT-confluent xCAT-csm xCAT-genesis-base-ppc64 xCAT-genesis-base-x86_64 xCAT-genesis-scripts-ppc64 xCAT-genesis-scripts-x86_64 xCAT-openbmc-py xCAT-probe xCAT-server xnba-undi yaboot-xcat + + [SLES] :: + + zypper remove conserver-xcat elilo-xcat goconserver grub2-xcat ipmitool-xcat perl-xCAT syslinux-xcat xCAT xCAT-SoftLayer xCAT-buildkit xCAT-client xCAT-confluent xCAT-csm xCAT-genesis-base-ppc64 xCAT-genesis-base-x86_64 xCAT-genesis-scripts-ppc64 xCAT-genesis-scripts-x86_64 xCAT-openbmc-py xCAT-probe xCAT-server xnba-undi yaboot-xcat [Ubuntu] :: - dpkg -l | awk '/xcat/ { print $2 }' + apt-get remove conserver-xcat elilo-xcat goconserver grub2-xcat ipmitool-xcat perl-xcat syslinux-xcat xcat xcat-buildkit xcat-client xcat-confluent xcat-genesis-base-amd64 xcat-genesis-base-ppc64 xcat-genesis-scripts-amd64 xcat-genesis-scripts-ppc64 xcat-probe xcat-server xcat-test xcat-vlan xcatsn xnba-undi To do an even more thorough cleanup, use links below to get a list of RPMs installed by xCAT. Some RPMs may not to be installed in a specific environment. diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index add91c1af..80a888362 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -2,7 +2,7 @@ # # go-xcat - Install xCAT automatically. # -# Version 1.0.29 +# Version 1.0.30 # # Copyright (C) 2016, 2017, 2018 International Business Machines # Eclipse Public License, Version 1.0 (EPL-1.0) @@ -18,6 +18,9 @@ # - Use curl when it is available. Otherwise fall back to use wget # - Improved tarball file extension handling # - Disable xCAT-core.repo and xCAT-dep.repo if they exist +# 2018-09-28 GONG Jie +# - Revised debug log +# - xCAT uninstallation # function usage() @@ -50,6 +53,9 @@ function usage() and xcat-dep packages from the repository update updates installed xcat-core packages to the latest version from the repository + uninstall removes xCAT from this system + completely uninstall removes xCAT from this system and cleans up + all the traces xCAT made Examples: ${script} @@ -62,8 +68,10 @@ function usage() --xcat-dep=/path/to/xcat-dep.tar.bz2 install ${script} --xcat-core=http://xcat.org/path/to/xcat-core.tar.bz2 \\ --xcat-dep=http://xcat.org/path/to/xcat-dep.tar.bz2 install + ${script} uninstall + ${script} completely uninstall - xCAT: http://xcat.org + xCAT: http://xcat.org/ Full documentation at: http://xcat-docs.readthedocs.io/en/stable EOF } @@ -96,16 +104,13 @@ function verbose_usage() -h, --help display a simply version of help and exit --long-help display this help and exit EOF - println 12 + println 16 while read -r ; do echo "${REPLY}" ; done <<-EOF check check the version of the installed packages of xCAT and packages in the repository - EOF - println 2 - while read -r ; do echo "${REPLY}" ; done <<-EOF smoke-test preform basic tests of the xCAT installation EOF - println 10 + println 11 while read -r ; do echo "${REPLY}" ; done <<-EOF ${script} --xcat-core=/path/to/xcat-core.repo install ${script} --xcat-core=/path/to/xcat-core install @@ -122,6 +127,11 @@ function verbose_usage() ${script} --xcat-core=/path/to/xcat-core \\ --xcat-dep=/path/to/xcat-dep install EOF + println 4 + while read -r ; do echo "${REPLY}" ; done <<-EOF + ${script} check + ${script} smoke-test + EOF println 999999 # Print out all the rest of lines exec 42<&- @@ -159,6 +169,14 @@ GO_XCAT_INSTALL_LIST=(perl-xcat xcat xcat-buildkit xcat-client xcat-genesis-scripts-amd64 xcat-genesis-scripts-ppc64 xcat-server conserver-xcat elilo-xcat grub2-xcat ipmitool-xcat syslinux-xcat xcat-genesis-base-amd64 xcat-genesis-base-ppc64 xnba-undi) +# The package list of all the packages should be installed +GO_XCAT_UNINSTALL_LIST=("${GO_XCAT_INSTALL_LIST[@]}" + goconserver xCAT-SoftLayer xCAT-confluent xCAT-csm xCAT-openbmc-py + xCAT-probe xCAT-test xCAT-vlan xCATsn xCAT-UI-deps) +# For Debian/Ubuntu, it will need a sight different package list +type dpkg >/dev/null 2>&1 && +GO_XCAT_UNINSTALL_LIST=("${GO_XCAT_INSTALL_LIST[@]}" + goconserver xcat-confluent xcat-probe xcat-test xcat-vlan xcatsn) PATH="/usr/sbin:/usr/bin:/sbin:/bin" export PATH @@ -295,8 +313,10 @@ function internal_cleanup() # function custom_setup() { - check_exec_or_exit awk cat comm grep printf sleep tee + check_exec_or_exit awk cat comm grep printf sleep check_root_or_exit + + debug_log_setup } # @@ -304,7 +324,7 @@ function custom_setup() # function custom_cleanup() { - : + debug_log_cleanup } # @@ -319,6 +339,101 @@ function cleanup_n_exec() exec "$@" } +function debug_log_setup() +{ + local script="${0##*/}" + + GO_XCAT_DEBUG_LOG="${TMP_DIR}/go-xcat.log" + GO_XCAT_LOG="/tmp/go-xcat.log" + # Global debug log file descriptor + : >"${GO_XCAT_DEBUG_LOG}" + ln -f "${GO_XCAT_DEBUG_LOG}" "${GO_XCAT_LOG}" + + # Log all the command line arguments + { + echo " ." + echo " ." + echo " . :." + echo " .:" + echo " ::." + echo " :.::" + echo " ::::." + echo " :::::" + echo " :::::" + echo " :::::" + echo " :::::" + echo " :::::" + echo "..:::::.." + echo " ':::::'" + echo " ':'" + echo -n "|->" + printf " %q" "${script}" "${BASH_ARGV[@]}" + echo + echo + } | debug_logger debug +} + +function debug_log_cleanup() +{ + local rc="$?" + local script="${0##*/}" + + if [[ -n "${GO_XCAT_DEBUG_LOG}" && -n "${GO_XCAT_LOG}" ]] + then + { + printf "\n|-> %-24s ... exited with %s\n" "${script}" "${rc}" + echo " ......" + echo " :::::" + echo " ::::::." + echo " ' ':::::." + echo " ':::::." + echo " '::" + echo " '" + } | debug_logger debug + [[ "${rc}" -eq "0" ]] && rm -f "${GO_XCAT_LOG}" + fi +} + +function debug_logger() +{ + local level="$1" + + while read -r + do + case "${level}" in + "debug") + ;; + *) + echo "${REPLY}" + ;; + esac + echo "${REPLY}" >&2 + done 2>>"${GO_XCAT_DEBUG_LOG}" +} + +function debug_trace() +{ + local rc="$?" + + # Log the function name and all the command line arguments + { + echo + echo -n ".->" + printf " %q" "$@" + echo + echo "'========" + } | debug_logger debug + + # BUG - The command "$@" will be run in a subshell + "$@" 2>&1 | debug_logger + rc="${PIPESTATUS[0]}" + + printf ".========\n'-> %-24s ... returned with %s\n" "${1}" "${rc}" | + debug_logger debug + + return "${rc}" +} + internal_setup # Check operating system @@ -960,9 +1075,10 @@ function add_repo_by_url_yum_or_zypper() while read -r ; do echo "${REPLY}" ; done >"${tmp}" <<-EOF [${repo_id}] name=${repo_id} - baseurl=${url} + baseurl=${url%/} enabled=1 - gpgcheck=0 + gpgcheck=1 + gpgkey=${url%/}/repodata/repomd.xml.key EOF add_repo_by_file "${tmp}" "${repo_id}" return "$?" @@ -995,9 +1111,10 @@ function add_repo_by_url_yum_or_zypper() while read -r ; do echo "${REPLY}" ; done >"${tmp}" <<-EOF [${repo_id}] name=${repo_id} - baseurl=file://${url} + baseurl=file://${url%/} enabled=1 - gpgcheck=0 + gpgcheck=1 + gpgkey=file://${url%/}/repodata/repomd.xml.key EOF add_repo_by_file "${tmp}" "${repo_id}" return "$?" @@ -1351,6 +1468,52 @@ function install_packages() function_dispatch "${FUNCNAME}" "$@" } +function remove_package_dnf() +{ + type dnf >/dev/null 2>&1 || return 255 + local -a yes=() + [[ "$1" = "-y" ]] && yes=("-y") && shift + dnf --nogpgcheck "${yes[@]}" remove "$@" +} + +function remove_package_yum() +{ + type yum >/dev/null 2>&1 || return 255 + local -a yes=() + [[ "$1" = "-y" ]] && yes=("-y") && shift + yum --nogpgcheck "${yes[@]}" remove "$@" +} + +function remove_package_zypper() +{ + type zypper >/dev/null 2>&1 || return 255 + local -a yes=() + local ret="" + [[ "$1" = "-y" ]] && yes=("-n") && shift + zypper --no-gpg-checks "${yes[@]}" remove --force-resolution "$@" + ret="$?" + case "${ret}" in + "104") + # ZYPPER_EXIT_INF_CAP_NOT_FOUND + ret="0" + ;; + esac + return "${ret}" +} + +function remove_package_apt() +{ + type apt-get >/dev/null 2>&1 || return 255 + local -a yes=() + [[ "$1" = "-y" ]] && yes=("-y") && shift + apt-get --allow-unauthenticated remove "${yes[@]}" "$@" +} + +function remove_package() +{ + function_dispatch "${FUNCNAME}" "$@" +} + # $1 -y function install_xcat() { @@ -1381,6 +1544,62 @@ function update_xcat() install_packages "$@" "${install_list[@]}" } +# $1 -y +function uninstall_xcat() +{ + remove_package "$@" "${GO_XCAT_UNINSTALL_LIST[@]}" +} + +function kill_xcat() +{ + local f="" + + for f in /var/run/xcat{d,/{main,udp,install,cmdlog}service}.pid + do + [[ -f "${f}" ]] && kill -TERM "$(<"${f}")" 2>/dev/null + done + + sleep 1 + + for f in /var/run/xcat{d,/{main,udp,install,cmdlog}service}.pid + do + [[ -f "${f}" ]] && kill -KILL "$(<"${f}")" 2>/dev/null + done + + return 0 +} + +# Remove all xCAT related directories and files +function trash_xcat() +{ + rm -f /etc/init.d/xcatpostinit1 + rm -f /etc/systemd/system/xcatpostinit1.service + rm -f /etc/systemd/system/multi-user.target.wants/xcatd.service + rm -f /etc/tftpmapfile4xcat.conf + rm -f /etc/profile.d/xcat.{c,}sh + rm -rf /etc/xcat + rm -rf /etc/xcatdockerca + rm -f /etc/apt/sources.list.d/xcat-{core,dep}.list + rm -f /etc/yum.repos.d/xCAT-{core,dep}.repo{,.nouse} + rm -f /etc/yum.repos.d/xcat-{core,dep}.repo + rm -f /etc/zypp/repos.d/xCAT-{core,dep}.repo{,.nouse} + rm -f /etc/zypp/repos.d/xcat-{core,dep}.repo + rm -rf /install/postscripts + rm -rf /opt/xcat + rm -rf /root/.xcat + rm -rf /root/xcat-dbback + rm -rf /tftpboot/xcat + rm -rf /var/lock/xcat + rm -rf /var/log/xcat + rm -rf /xcatpost + # For goconserver + rm -rf /etc/goconserver + rm -rf /var/lib/goconserver + rm -rf /var/log/goconserver + + return 0 +} + function list_xcat_packages() { GO_XCAT_CORE_PACKAGE_LIST=($(get_package_list xcat-core)) @@ -1438,12 +1657,55 @@ function list_xcat_packages() 42< <(check_repo_version "${GO_XCAT_DEP_PACKAGE_LIST[@]}") } +# +# ask_to_continue Ask to continue +# +# Exits (not returns) if get negative reply from end user. +# This function is intend to read from STDIN. +# +# $1 -y +# $2 Prompt +# +function ask_to_continue() +{ + [[ "$1" = "-y" ]] && return 0 + shift + local prompt="$1" + + echo + echo "${prompt}" + echo | debug_logger debug + echo ".-> ${prompt}" | debug_logger debug + while : + do + read -r -p "Continue? [y/n] " + echo "'-> Continue? [y/n] ... ${REPLY}" | debug_logger debug + case "${REPLY}" in + "Y"*|"y"*) + break + ;; + "N"*|"n"*) + echo "Good-bye!" + exit 0 + ;; + *) + echo "Invalid response!" + ;; + esac + done + + return 0 +} + # Test case 000 # Check if all the xcat-core packages are on the same version function test_case_000_version() { local ver="" local -i ret=0 + + list_xcat_packages + while read -r do [[ "${REPLY}" = "(not installed)" ]] && continue @@ -1451,6 +1713,7 @@ function test_case_000_version() [[ "${ver}" = "${REPLY%%-*}" ]] (( ret += $? )) done < <(check_package_version "${GO_XCAT_CORE_PACKAGE_LIST[@]}") + return "${ret}" } @@ -1460,17 +1723,13 @@ function test_case_001_xcatd() { local f="" local -i ret=0 - for f in /var/run/xcat/{main,install,udp}service.pid + + for f in /var/run/xcat{d,/{main,udp,install,cmdlog}service}.pid do - kill -0 "$(<"${f}")" - (( ret += $? )) - done - for f in /var/run/xcat/cmdlogservice.pid - do - [[ -f "${f}" ]] || continue - kill -0 "$(<"${f}")" + kill -0 "$(<"${f}")" 2>/dev/null (( ret += $? )) done + return "${ret}" } @@ -1481,32 +1740,24 @@ function test_case_002_lsdef() (source /etc/profile.d/xcat.sh && lsdef) } -# Perform basic smoke test -function perform_smoke_test() +# Perform basic smoke tests +function perform_smoke_tests() { local test_case="" local -i ret=0 + for test_case in $(compgen -A function "test_case_") do - "${test_case}" >"${TMP_DIR}/${test_case}.stdout" \ - 2>"${TMP_DIR}/${test_case}.stderr" + debug_trace "${test_case}" ret="$?" - if [[ "${ret}" -ne "0" || -s "${TMP_DIR}/${test_case}.stderr" ]] + + if [[ "${ret}" -ne "0" ]] then - # Something went wrong - echo "-- 8< -- -- -- -- -- -- -- -- -- -- -- -- -- -- --" - echo "==== ${test_case} failed with exit code ${ret} ====" - echo "-- 8< ${test_case} stdout -- --" - while read -r ; do echo "${REPLY}" ; done \ - <"${TMP_DIR}/${test_case}.stdout" - echo "-- 8< ${test_case} stderr -- --" - while read -r ; do echo "${REPLY}" ; done \ - <"${TMP_DIR}/${test_case}.stderr" - echo "-- 8< -- -- -- -- -- -- -- -- -- -- -- -- -- -- --" - # skip all the remain test cases return "${ret}" - fi >&2 + fi done + + echo echo "It seems everything went well. :)" return 0 } @@ -1559,6 +1810,27 @@ function stop_progress_meters() echo -n "...... " } +# $1 0 (pass) or non-zero (fail). +function boo_boo_if_bad() +{ + local -i rc="$1" + + # Ignore if no problems + [ "${rc}" -eq "0" ] && return 0 + + debug_logger <<-EOF + + Boo-boo + ======= + + Something went wrong. :( + + Please check log file \`${GO_XCAT_LOG}' for more details. + EOF + + exit "${rc}" +} + # # |\/| _.o._ ._ .__ _ .__.._ _ _ _ _ _ |_ _ .__ # | |(_||| | |_)|(_)(_||(_|| | | (_|(_)(/__> | |(/_|(/_ o @@ -1583,7 +1855,7 @@ do verbose_usage exit 0 ;; - "--xcat-core") + "-x"|"--xcat-core") shift GO_XCAT_CORE_URL="$1" ;; @@ -1604,10 +1876,6 @@ do "--xcat-version="*) GO_XCAT_VERSION="${1##--xcat-version=}" ;; - "-x") - shift - GO_XCAT_VERSION="$1" - ;; "-y"|"--yes") GO_XCAT_YES=("-y") ;; @@ -1621,16 +1889,21 @@ do warn_if_bad "$?" "redundancy action -- \`$1'" exit_if_bad "$?" "Try \`$0 --help' for more information" GO_XCAT_ACTION="$1" + if [ "$1 $2" == "completely uninstall" ] + then + shift + GO_XCAT_ACTION="away" + fi ;; esac shift done case "${GO_XCAT_ACTION}" in -"check"|"install"|"update") +"away"|"check"|"install"|"uninstall"|"update") ;; "smoke-test") - perform_smoke_test + perform_smoke_tests exit "$?" ;; "") @@ -1641,13 +1914,12 @@ case "${GO_XCAT_ACTION}" in warn_if_bad 1 "invalid action -- \`${GO_XCAT_ACTION}'" exit_if_bad 1 "Try \`$0 --help' for more information" ;; -esac +esac # case "${GO_XCAT_ACTION}" in GO_XCAT_OS="$(check_os)" GO_XCAT_ARCH="$(check_arch)" -while read -r ; do echo "${REPLY}" ; echo "${REPLY}" >&2 - done 2>"${TMP_DIR}/go-xcat.log.000" <&2 - done 2>"${TMP_DIR}/go-xcat.log.001" <&1)" @@ -1716,95 +2041,31 @@ case "${GO_XCAT_ACTION}" in ;; "install"|"update") GO_XCAT_INSTALLER="${GO_XCAT_ACTION}_xcat" - if [[ "${#GO_XCAT_YES[@]}" -eq "0" ]] - then - echo - echo "xCAT is going to be ${GO_XCAT_ACTION/%e/}ed." - while true; do - - read -r -p "Continue? [y/n] " - case "${REPLY}" in - "Y"*|"y"*) - break - ;; - "N"*|"n"*) - echo "Good-bye!" - exit 0 - ;; - *) - echo "Invalid response!" - ;; - esac - done - fi - # Use `-y' here. Since the STDOUT is redirect to tee. + ask_to_continue "${GO_XCAT_YES[0]}" "xCAT is going to be ${GO_XCAT_ACTION/%e/}ed." + # Use `-y' here. Since the STDOUT is redirected. # `yum' does not display the prompt message properly when - # working with tee. - "${GO_XCAT_INSTALLER}" -y \ - > >(tee "${TMP_DIR}/${GO_XCAT_INSTALLER}.stdout") \ - 2> >(tee "${TMP_DIR}/${GO_XCAT_INSTALLER}.stderr" >&2) + # working with redirected I/O. + debug_trace "${GO_XCAT_INSTALLER}" -y RET="$?" - { - # Creating logs - echo "-- 8< -- -- -- -- -- -- -- -- -- -- -- -- -- -- --" - echo "==== ${GO_XCAT_INSTALLER} exited with exit code ${RET} ====" - echo "-- 8< ${GO_XCAT_INSTALLER} stdout -- --" - while read -r ; do echo "${REPLY}" ; done \ - <"${TMP_DIR}/${GO_XCAT_INSTALLER}.stdout" - echo "-- 8< ${GO_XCAT_INSTALLER} stderr -- --" - while read -r ; do echo "${REPLY}" ; done \ - <"${TMP_DIR}/${GO_XCAT_INSTALLER}.stderr" - echo "-- 8< -- -- -- -- -- -- -- -- -- -- -- -- -- -- --" - } >"${TMP_DIR}/go-xcat.log.005" - if [[ "${RET}" -eq "0" && ! -s "${TMP_DIR}/${GO_XCAT_INSTALLER}.stderr" ]] + if [[ "${RET}" -eq "0" ]] then # xCAT has been installed and so far so good - perform_smoke_test >"${TMP_DIR}/perform_smoke_test.stdout" \ - 2>"${TMP_DIR}/perform_smoke_test.stderr" + perform_smoke_tests >/dev/null 2>&1 RET="$?" - if [[ "${RET}" -ne "0" || -s "${TMP_DIR}/perform_smoke_test.stderr" ]] - then - # Smoke test failed - echo "-- 8< -- -- -- -- vv -- -- -- vv -- -- -- -- 8< --" - echo "==== perform_smoke_test failed with exit code ${RET} ====" - echo "-- 8< perform_smoke_test stdout -- --" - while read -r ; do echo "${REPLY}" ; done \ - <"${TMP_DIR}/perform_smoke_test.stdout" - echo "-- 8< perform_smoke_test stderr -- --" - while read -r ; do echo "${REPLY}" ; done \ - <"${TMP_DIR}/perform_smoke_test.stderr" - echo "-- 8< -- -- -- -- ^^ -- -- -- ^^ -- -- -- -- 8< --" - fi - fi >"${TMP_DIR}/go-xcat.log.008" - - if [[ "${RET}" -ne "0" ]] - then - GO_XCAT_LOG="/tmp/go-xcat.log" - cat "${TMP_DIR}/go-xcat.log."* >"${GO_XCAT_LOG}" 2>/dev/null - while read -r ; do echo "${REPLY}" ; done >&2 <<-EOF - - - Boo-boo - ======= - - Something went wrong. :( - - Please check log file \`${GO_XCAT_LOG}' for more details. - EOF - - exit "${RET}" fi + boo_boo_if_bad "${RET}" + case "${GO_XCAT_ACTION}" in "install") # Only print out this message on install - while read -r ; do echo "${REPLY}" ; done <<-EOF + debug_logger <<-EOF xCAT has been installed! ======================== - If this is the very first time xCAT has been installed, run the following - commands to set environment variables into your PATH: + If this is the very first time xCAT has been installed, run one of the + following commands to set the environment variables. For sh: source /etc/profile.d/xcat.sh @@ -1814,7 +2075,7 @@ case "${GO_XCAT_ACTION}" in EOF ;; "update") - while read -r ; do echo "${REPLY}" ; done <<-EOF + debug_logger <<-EOF xCAT has been successfully updated! EOF From e13a71c03fcba3a94ca6faffe3c17b899c2515d2 Mon Sep 17 00:00:00 2001 From: huweihua Date: Thu, 25 Oct 2018 03:42:51 -0400 Subject: [PATCH 012/121] Update some openbmc test cases --- .../testcase/UT_openbmc/rflash_cases0 | 2 +- .../UT_openbmc/supported_commands_case0 | 6 ++-- xCAT-test/autotest/testcase/rpower/cases0 | 32 ------------------- xCAT-test/autotest/testcase/rspconfig/cases0 | 30 ++++++++++++----- xCAT-test/autotest/testcase/rspconfig/cases1 | 2 +- 5 files changed, 27 insertions(+), 45 deletions(-) diff --git a/xCAT-test/autotest/testcase/UT_openbmc/rflash_cases0 b/xCAT-test/autotest/testcase/UT_openbmc/rflash_cases0 index de394bdf3..5a9ea47d8 100644 --- a/xCAT-test/autotest/testcase/UT_openbmc/rflash_cases0 +++ b/xCAT-test/autotest/testcase/UT_openbmc/rflash_cases0 @@ -85,6 +85,6 @@ os:Linux hcp:openbmc label:cn_bmc_ready,hctrl_openbmc cmd: rflash $$CN -l | grep \* | grep BMC | awk '{print $2}' | xargs -i{} rflash $$CN --delete {} -check:rc==1 +check:rc!=0 check:output=~$$CN: (\[.*?\]: )?Error: Deleting currently active BMC firmware is not supported end diff --git a/xCAT-test/autotest/testcase/UT_openbmc/supported_commands_case0 b/xCAT-test/autotest/testcase/UT_openbmc/supported_commands_case0 index dd20a6260..403511355 100644 --- a/xCAT-test/autotest/testcase/UT_openbmc/supported_commands_case0 +++ b/xCAT-test/autotest/testcase/UT_openbmc/supported_commands_case0 @@ -62,9 +62,9 @@ check:rc==0 check:output=~$$CN: Total Power: cmd: rvitals $$CN leds check:rc==0 -check:output=~$$CN: Front -check:output=~$$CN: Front Fans -check:output=~$$CN: Rear +check:output=~$$CN: LEDs Front +check:output=~$$CN: LEDs Fan +check:output=~$$CN: LEDs Rear cmd: rvitals $$CN all check:rc==0 check:output=~$$CN: Ambient: diff --git a/xCAT-test/autotest/testcase/rpower/cases0 b/xCAT-test/autotest/testcase/rpower/cases0 index c87c569c4..cc3c0affd 100644 --- a/xCAT-test/autotest/testcase/rpower/cases0 +++ b/xCAT-test/autotest/testcase/rpower/cases0 @@ -197,35 +197,3 @@ check:output=~Error: (\[.*?\]: )?[Uu]nsupported command[:]* rpower ddd check:rc==1 end -start:rpower_bmcreboot_perl_python_output -description:record the output for rpower bmcreboot and compare the output for perl and python version. -hcp:openbmc -label:cn_bmc_ready,hctrl_openbmc -cmd: /opt/xcat/share/xcat/tools/autotest/testcase/UT_openbmc/scripts/bmcreboot.sh $$CN /tmp/xcattest.rpower.bmcstate.perl.out PERL -check:rc==0 -cmd: grep "Login to BMC failed: 500" /tmp/xcattest.rpower.bmcstate.perl.out | sort | uniq | wc -l -check:output=~3 -cmd: grep "timeout" /tmp/xcattest.rpower.bmcstate.perl.out | sort | uniq | wc -l -check:output=~1 -cmd: grep "No route to host" /tmp/xcattest.rpower.bmcstate.perl.out | sort | uniq | wc -l -check:output=~1 -cmd: grep "BMC NotReady" /tmp/xcattest.rpower.bmcstate.perl.out | sort | uniq | wc -l -check:output=~1 -cmd: grep "BMC Ready" /tmp/xcattest.rpower.bmcstate.perl.out | sort | uniq | wc -l -check:output=~1 -cmd: cat /tmp/xcattest.rpower.bmcstate.perl.out -cmd: /opt/xcat/share/xcat/tools/autotest/testcase/UT_openbmc/scripts/bmcreboot.sh $$CN /tmp/xcattest.rpower.bmcstate.python.out PYTHON -check:rc==0 -cmd: grep "Login to BMC failed: 500" /tmp/xcattest.rpower.bmcstate.python.out | sort | uniq | wc -l -check:output=~3 -cmd: grep "timeout" /tmp/xcattest.rpower.bmcstate.python.out | sort | uniq | wc -l -check:output=~1 -cmd: grep "No route to host" /tmp/xcattest.rpower.bmcstate.python.out | sort | uniq | wc -l -check:output=~1 -cmd: grep "BMC NotReady" /tmp/xcattest.rpower.bmcstate.python.out | sort | uniq | wc -l -check:output=~1 -cmd: grep "BMC Ready" /tmp/xcattest.rpower.bmcstate.python.out | sort | uniq | wc -l -check:output=~1 -cmd: cat /tmp/xcattest.rpower.bmcstate.python.out -cmd:rm -rf /tmp/xcattest.rpower.bmcstate.perl.out /tmp/xcattest.rpower.bmcstate.python.out -end diff --git a/xCAT-test/autotest/testcase/rspconfig/cases0 b/xCAT-test/autotest/testcase/rspconfig/cases0 index c69df2a04..8bc7f1bc2 100644 --- a/xCAT-test/autotest/testcase/rspconfig/cases0 +++ b/xCAT-test/autotest/testcase/rspconfig/cases0 @@ -45,7 +45,7 @@ end start:rspconfig_sshcfg hcp:hmc -label:cn_bmc_ready,hctrl_hmc,hctrl_openbmc +label:cn_bmc_ready,hctrl_hmc cmd:rspconfig __GETNODEATTR($$CN,hcp)__ sshcfg check:rc==0 check:output=~__GETNODEATTR($$CN,hcp)__: \w+ @@ -302,27 +302,41 @@ cmd:mkdir -p /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname check:rc == 0 cmd:lsdef $$CN -z > /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname/$$CN.stanza check:rc == 0 -cmd:chdef -t node -o bogus_bmc_hostname groups=bmc ip=__GETNODEATTR($$CN,bmc)__ +cmd:rspconfig $$CN sshcfg check:rc == 0 -cmd:lsdef bogus_bmc_hostname +cmd:ssh __GETNODEATTR($$CN,bmc)__ "hostname" | tee /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname/bmc_old_name +cmd:chdef -t node -o bogus-bmc-hostname groups=bmc ip=__GETNODEATTR($$CN,bmc)__ check:rc == 0 -cmd:makehosts bogus_bmc_hostname +cmd:lsdef bogus-bmc-hostname check:rc == 0 -cmd:chdef $$CN bmc=bogus_bmc_hostname +cmd:makehosts bogus-bmc-hostname +check:rc == 0 +cmd:makedns bogus-bmc-hostname +check:rc == 0 +cmd:chdef $$CN bmc=bogus-bmc-hostname check:rc == 0 cmd:lsdef $$CN -i bmc -c check:rc == 0 cmd:rspconfig $$CN hostname=* check:rc == 0 -check:output =~$$CN: BMC Hostname: bogus_bmc_hostname -cmd:makehosts -d bogus_bmc_hostname +check:output =~$$CN: BMC Hostname: bogus-bmc-hostname +cmd:ssh __GETNODEATTR(bogus-bmc-hostname,ip)__ "hostname" | tee /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname/bmc_new_name check:rc == 0 -cmd:rmdef bogus_bmc_hostname +cmd:echo "bogus-bmc-hostname" > /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname/bmc_set_name +cmd:diff -y /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname/bmc_set_name /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname/bmc_new_name +check:rc == 0 +cmd:makedns -d bogus-bmc-hostname +check:rc == 0 +cmd:makehosts -d bogus-bmc-hostname +check:rc == 0 +cmd:rmdef bogus-bmc-hostname check:rc == 0 cmd:rmdef $$CN check:rc == 0 cmd:cat /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname/$$CN.stanza |mkdef -z check:rc == 0 +cmd:ip=$(cat /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname/bmc_old_name);ssh __GETNODEATTR($$CN,bmc)__ "hostname=bogus-bmc-hostname" +cmd:ssh __GETNODEATTR($$CN,bmc)__ "hostname" cmd:rm -rf /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname check:rc == 0 end diff --git a/xCAT-test/autotest/testcase/rspconfig/cases1 b/xCAT-test/autotest/testcase/rspconfig/cases1 index ee4f552dc..e475bcad0 100644 --- a/xCAT-test/autotest/testcase/rspconfig/cases1 +++ b/xCAT-test/autotest/testcase/rspconfig/cases1 @@ -145,7 +145,7 @@ check:output =~$$CN:\s*Dump requested check:output =~$$CN:\s*Downloading dump cmd:rspconfig $$CN dump -l |tail -n 1 |tee /tmp/dumpgenerate check:rc == 0 -cmd:dumpnumber=`sed -r 's/.+\[(.+)\].+/\1/g' /tmp/dumpgenerate`;dumpsize=`grep "\[$dumpnumber\] Generated" /tmp/dumpgenerate |cut -d : -f 6`;ls -l /var/log/xcat/dump/*_$$CN_dump_$dumpnumber.tar.xz|grep $dumpsize +cmd:dumpnumber=`sed -r 's/.+\[(.+)\].+/\1/g' /tmp/dumpgenerate`;dumpsize=`grep "\[$dumpnumber\] Generated" /tmp/dumpgenerate |cut -d : -f 6`;ls -l /var/log/xcat/dump/*_dump_$dumpnumber.tar.xz|grep $dumpsize|grep $$CN check:rc == 0 cmd:rm -rf /tmp/dumpgenerate end From 833f33c8208ac459f5b99e19160a6aa20d4c0b9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=E1=B4=8F=C9=B4=C9=A2=20Jie?= Date: Thu, 25 Oct 2018 17:19:30 +0800 Subject: [PATCH 013/121] [go-xcat] Fix the result of smoke test when xCAT is not installed (#5731) * [go-xcat] Revise the command line argument handling * [go-xcat] Revise test cases * [go-xcat] Fix the result of smoke test when xCAT is not installed --- xCAT-server/share/xcat/tools/go-xcat | 77 +++++++++++++++++----------- 1 file changed, 47 insertions(+), 30 deletions(-) diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index 80a888362..0329e7096 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -108,7 +108,7 @@ function verbose_usage() while read -r ; do echo "${REPLY}" ; done <<-EOF check check the version of the installed packages of xCAT and packages in the repository - smoke-test preform basic tests of the xCAT installation + smoke test preform basic tests of the xCAT installation EOF println 11 while read -r ; do echo "${REPLY}" ; done <<-EOF @@ -130,7 +130,7 @@ function verbose_usage() println 4 while read -r ; do echo "${REPLY}" ; done <<-EOF ${script} check - ${script} smoke-test + ${script} smoke test EOF println 999999 # Print out all the rest of lines @@ -342,6 +342,14 @@ function cleanup_n_exec() function debug_log_setup() { local script="${0##*/}" + local -a argv=() + + set -- "${BASH_ARGV[@]}" + while [ "$#" -gt "0" ] + do + argv=("$1" "${argv[@]}") + shift + done GO_XCAT_DEBUG_LOG="${TMP_DIR}/go-xcat.log" GO_XCAT_LOG="/tmp/go-xcat.log" @@ -367,7 +375,7 @@ function debug_log_setup() echo " ':::::'" echo " ':'" echo -n "|->" - printf " %q" "${script}" "${BASH_ARGV[@]}" + printf " %q" "${script}" "${argv[@]}" echo echo } | debug_logger debug @@ -1077,7 +1085,7 @@ function add_repo_by_url_yum_or_zypper() name=${repo_id} baseurl=${url%/} enabled=1 - gpgcheck=1 + gpgcheck=0 gpgkey=${url%/}/repodata/repomd.xml.key EOF add_repo_by_file "${tmp}" "${repo_id}" @@ -1603,9 +1611,12 @@ function trash_xcat() function list_xcat_packages() { GO_XCAT_CORE_PACKAGE_LIST=($(get_package_list xcat-core)) - exit_if_bad "$?" "Failed to get package list from repository \`xcat-core'." GO_XCAT_DEP_PACKAGE_LIST=($(get_package_list xcat-dep)) - exit_if_bad "$?" "Failed to get package list from repository \`xcat-dep'." + + [ "${#GO_XCAT_CORE_PACKAGE_LIST[@]}" -gt "0" ] + warn_if_bad "$?" "Failed to get package list from repository \`xcat-core'." || return 1 + [ "${#GO_XCAT_DEP_PACKAGE_LIST[@]}" -gt "0" ] + warn_if_bad "$?" "Failed to get package list from repository \`xcat-dep'." || return 1 local -i cols="$(type tput >/dev/null 2>&1 && tput cols)" [[ "${cols}" -lt 80 ]] && cols=80 @@ -1704,7 +1715,7 @@ function test_case_000_version() local ver="" local -i ret=0 - list_xcat_packages + list_xcat_packages >/dev/null || return 1 while read -r do @@ -1714,6 +1725,8 @@ function test_case_000_version() (( ret += $? )) done < <(check_package_version "${GO_XCAT_CORE_PACKAGE_LIST[@]}") + warn_if_bad "${ret}" "xCAT packages version mismatch" + return "${ret}" } @@ -1726,7 +1739,11 @@ function test_case_001_xcatd() for f in /var/run/xcat{d,/{main,udp,install,cmdlog}service}.pid do - kill -0 "$(<"${f}")" 2>/dev/null + [ -f "${f}" ] + warn_if_bad "$?" "${f}: no such file" || continue + + kill -0 "$(<"${f}")" >/dev/null 2>&1 + warn_if_bad "$?" "Process with an ID $(<${f}) is not running" (( ret += $? )) done @@ -1737,11 +1754,12 @@ function test_case_001_xcatd() # Check if command lsdef can be run function test_case_002_lsdef() { - (source /etc/profile.d/xcat.sh && lsdef) + (source /etc/profile.d/xcat.sh && lsdef) >/dev/null 2>&1 + warn_if_bad "$?" "Attempt of run \`lsdef' failed" } -# Perform basic smoke tests -function perform_smoke_tests() +# Perform basic smoke testing +function smoke_testing() { local test_case="" local -i ret=0 @@ -1749,16 +1767,11 @@ function perform_smoke_tests() for test_case in $(compgen -A function "test_case_") do debug_trace "${test_case}" - ret="$?" - - if [[ "${ret}" -ne "0" ]] - then - return "${ret}" - fi + warn_if_bad "$?" "Something went wrong. :'(" || return 1 done echo - echo "It seems everything went well. :)" + echo "It seems everything went well. :-)" return 0 } @@ -1889,11 +1902,16 @@ do warn_if_bad "$?" "redundancy action -- \`$1'" exit_if_bad "$?" "Try \`$0 --help' for more information" GO_XCAT_ACTION="$1" - if [ "$1 $2" == "completely uninstall" ] - then + case "$1 $2" in + "completely uninstall") shift GO_XCAT_ACTION="away" - fi + ;; + "smoke test") + shift + GO_XCAT_ACTION="smoke test" + ;; + esac ;; esac shift @@ -1902,8 +1920,8 @@ done case "${GO_XCAT_ACTION}" in "away"|"check"|"install"|"uninstall"|"update") ;; -"smoke-test") - perform_smoke_tests +"smoke test") + smoke_testing exit "$?" ;; "") @@ -2005,12 +2023,11 @@ ERR_MSG="$( { echo - case "${GO_XCAT_ACTION}" in - "check") - debug_trace update_repo - exit "$?" - ;; - esac + if [ "check" == "${GO_XCAT_ACTION}" ] + then + debug_trace update_repo && exit 0 + exit 1 + fi if debug_trace add_xcat_core_repo -y \ "${GO_XCAT_CORE_URL}" "${GO_XCAT_VERSION}" @@ -2050,7 +2067,7 @@ case "${GO_XCAT_ACTION}" in if [[ "${RET}" -eq "0" ]] then # xCAT has been installed and so far so good - perform_smoke_tests >/dev/null 2>&1 + smoke_testing >/dev/null 2>&1 RET="$?" fi From f72c4f088ae308f7feab3b88ebbb76340dcd6ee0 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 25 Oct 2018 10:36:32 -0400 Subject: [PATCH 014/121] Add reventlog to hw management list --- .../ppc64le/management/advanced/index.rst | 1 + .../ppc64le/management/advanced/reventlog.rst | 14 ++++ .../references/coral/known_issues/index.rst | 1 - .../coral/known_issues/openbmc/2_13_8.rst | 7 -- .../coral/known_issues/openbmc/SW402273.rst | 17 ---- .../coral/known_issues/openbmc/SW404161.rst | 26 ------ .../coral/known_issues/openbmc/SW406771.rst | 84 ------------------- .../coral/known_issues/openbmc/SW407037.rst | 38 --------- .../coral/known_issues/openbmc/index.rst | 47 ----------- 9 files changed, 15 insertions(+), 220 deletions(-) create mode 100644 docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/reventlog.rst delete mode 100644 docs/source/references/coral/known_issues/openbmc/2_13_8.rst delete mode 100644 docs/source/references/coral/known_issues/openbmc/SW402273.rst delete mode 100644 docs/source/references/coral/known_issues/openbmc/SW404161.rst delete mode 100644 docs/source/references/coral/known_issues/openbmc/SW406771.rst delete mode 100644 docs/source/references/coral/known_issues/openbmc/SW407037.rst delete mode 100644 docs/source/references/coral/known_issues/openbmc/index.rst diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/index.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/index.rst index 6070b8be6..612eaf30e 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/index.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/index.rst @@ -8,3 +8,4 @@ Advanced Operations rvitals.rst rflash/index.rst rspconfig.rst + reventlog.rst diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/reventlog.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/reventlog.rst new file mode 100644 index 000000000..4af7dd135 --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/reventlog.rst @@ -0,0 +1,14 @@ +``reventlog`` - Remote Event Log of Service Processors +====================================================== + +See :doc:`reventlog manpage ` for more information. + +The ``reventlog`` command can be used to display and clear event log information on the service processor, or Baseboard Management Controller (BMC), of a physical machine. + +For example, to display all event log entries for node ``cn5``: :: + + reventlog cn5 + +To clear all event log entries for node ``cn5``: :: + + reventlog cn5 clear diff --git a/docs/source/references/coral/known_issues/index.rst b/docs/source/references/coral/known_issues/index.rst index 63e9126be..359cd90de 100644 --- a/docs/source/references/coral/known_issues/index.rst +++ b/docs/source/references/coral/known_issues/index.rst @@ -5,4 +5,3 @@ Known Issues :maxdepth: 2 genesis_base.rst - openbmc/index.rst diff --git a/docs/source/references/coral/known_issues/openbmc/2_13_8.rst b/docs/source/references/coral/known_issues/openbmc/2_13_8.rst deleted file mode 100644 index 957c40a03..000000000 --- a/docs/source/references/coral/known_issues/openbmc/2_13_8.rst +++ /dev/null @@ -1,7 +0,0 @@ -#4264 - rpower command intermittently reports 503: Service Unavailable Error -============================================================================ - -Issue `#4264 `_ - -In attempt to improve the performance of the REST calls to OpenBMC and reduce the time spent in a timeout, we fail too soon here before the BMC has a chance to respond. - diff --git a/docs/source/references/coral/known_issues/openbmc/SW402273.rst b/docs/source/references/coral/known_issues/openbmc/SW402273.rst deleted file mode 100644 index 7c3105f3d..000000000 --- a/docs/source/references/coral/known_issues/openbmc/SW402273.rst +++ /dev/null @@ -1,17 +0,0 @@ -SW402273 - Unable to tell the firmware level that is actually running on the node via REST -========================================================================================== - -* **Issue:** `SW402273 `_ -* **Reported:** 1738B (ibm-v1.99.10-0-r7) -* **Fixed:** 1740B (ibm-v1.99.10-0-r13) - -**Issue:** - -Until 1740B firmware (> ibm-v1.99.10-0-r13), there's no method provided by OpenBMC to indicate the active running firmware on the node. Until the BMC is rebooted or the HOST is rebooted, the Active firmware may or may not really be running. - -If you are running a version that prints the following message from ``rflash``: :: - - cn01: WARNING, The current firmware is unable to detect running firmware version. - -Please update the BMC to a version higher than ibm-v1.99.10-0-r13. - diff --git a/docs/source/references/coral/known_issues/openbmc/SW404161.rst b/docs/source/references/coral/known_issues/openbmc/SW404161.rst deleted file mode 100644 index a3d3405db..000000000 --- a/docs/source/references/coral/known_issues/openbmc/SW404161.rst +++ /dev/null @@ -1,26 +0,0 @@ -SW404161 - Firmware do not self extract tar, causing rflash cannot find ID to activate -====================================================================================== - -* **Issue:** `SW404161 `_ -* **Reported:** 1738A (ibm-v1.99.10-0-r7) -* **Fixed:** 1742D (ibm-v1.99.10-0-113-r10) - -**Issue:** - -Firmware is not extracted and could not be found by rflash to activate :: - - [root@c650mnp03 ~]# rflash c650f07p27 obmc-phosphor-image-witherspoon.ubi.mtd.tar -a - c650f07p27: Uploading /root/obmc-phosphor-image-witherspoon.ubi.mtd.tar ... - c650f07p27: Firmware upload successful. Attempting to activate firmware: ibm-v1.99.10-113-g65edf7d-r8-0-g713d86d - c650f07p27: Could not find ID for firmware ibm-v1.99.10-113-g65edf7d-r8-0-g713d86d to activate, waiting 10 seconds and retry... - c650f07p27: Could not find ID for firmware ibm-v1.99.10-113-g65edf7d-r8-0-g713d86d to activate, waiting 10 seconds and retry... - c650f07p27: Could not find ID for firmware ibm-v1.99.10-113-g65edf7d-r8-0-g713d86d to activate, waiting 10 seconds and retry... - c650f07p27: Could not find ID for firmware ibm-v1.99.10-113-g65edf7d-r8-0-g713d86d to activate, waiting 10 seconds and retry... - c650f07p27: Could not find ID for firmware ibm-v1.99.10-113-g65edf7d-r8-0-g713d86d to activate, waiting 10 seconds and retry... - c650f07p27: Could not find ID for firmware ibm-v1.99.10-113-g65edf7d-r8-0-g713d86d to activate, waiting 10 seconds and retry... - c650f07p27: Error: Could not find firmware ibm-v1.99.10-113-g65edf7d-r8-0-g713d86d after waiting 60 seconds. - -**Work-around:** Use one of the following methods: - -* Reboot the BMC before flashing firmware: ``rpower <> bmcreboot`` -* ssh into bmc and run: ``systemctl restart xyz.openbmc_project.Software.Version.service`` diff --git a/docs/source/references/coral/known_issues/openbmc/SW406771.rst b/docs/source/references/coral/known_issues/openbmc/SW406771.rst deleted file mode 100644 index d02460327..000000000 --- a/docs/source/references/coral/known_issues/openbmc/SW406771.rst +++ /dev/null @@ -1,84 +0,0 @@ -SW406771 - Duplicate FW ID or 2 BMC firmware active at the same time -==================================================================== - -* **Issue:** `SW407037 `_ -* **Reported:** 1740A (ibm-v1.99.10-0-r11-0-g9c65260) -* **Fixed:** 1742 or higher - -**Issue:** - -At some point after 1740A firmware, ``ibm-v1.99.10-0-r11-0-g9c65260``, the hashing algorithm to create the ID on the BMC was chagned by the Firmware team. This allows for the same firmware to potentially have two different IDs resulting in two active running BMC firmware. - - -**Work-around** - -Upgrade from 1740A ------------------- - -If you are running 1740A, you will need to get two BMC firmware levels from your IBM representative. - -This example will cover flashing from 1740A to 1742D, using 1742C as the recovery flash level. - -#. Identify the issue where the IDs are not using the correct hash :: - - mid05tor12cn13: ID Purpose State Version - mid05tor12cn13: ------------------------------------------------------- - mid05tor12cn13: 9e55358e BMC Active(*) ibm-v1.99.10-0-r11-0-g9c65260 - mid05tor12cn13: 6e71e1af BMC Ready ibm-v1.99.10-113-g65edf7d-r10-0-gcdf7635 <--- bad hash for 1742D - - mid05tor12cn16: ID Purpose State Version - mid05tor12cn16: ------------------------------------------------------- - mid05tor12cn16: efc8a851 BMC Ready ibm-v1.99.10-113-g65edf7d-r10-0-gcdf7635 <--- correct hash for 1742D - mid05tor12cn16: b48d27e1 BMC Active(*) ibm-v1.99.10-113-g65edf7d-r3-0-g9e4f715 - -#. Flash up to 1742D, activate and reboot: :: - - mid05tor12cn13: ID Purpose State Version - mid05tor12cn13: ------------------------------------------------------- - mid05tor12cn13: 9e55358e BMC Active ibm-v1.99.10-0-r11-0-g9c65260 - mid05tor12cn13: 221d9020 Host Active(*) IBM-witherspoon-redbud-ibm-OP9_v1.19_1.33 - mid05tor12cn13: 6e71e1af BMC Active(*) ibm-v1.99.10-113-g65edf7d-r10-0-gcdf7635 <--- bad hash, active - mid05tor12cn13: - -#. Flash down to 1742C, activate and reboot: :: - - mid05tor12cn13: ID Purpose State Version - mid05tor12cn13: ------------------------------------------------------- - mid05tor12cn13: 9e55358e BMC Active ibm-v1.99.10-0-r11-0-g9c65260 - mid05tor12cn13: 221d9020 Host Active(*) IBM-witherspoon-redbud-ibm-OP9_v1.19_1.33 - mid05tor12cn13: 6e71e1af BMC Active(*) ibm-v1.99.10-113-g65edf7d-r10-0-gcdf7635 - mid05tor12cn13: f6590ce0 BMC Active(+) ibm-v1.99.10-113-g65edf7d-r8-0-g713d86d <--- 1742C - mid05tor12cn13: - -#. Delete the bad hash firmware: ``rflash -d 6e71e1af`` - - **Note:** This is optional because the BMC only allows 2 firmware max, so it would get pushed out. - -#. Flash back up to 1742D (with correct hash), activate and reboot: :: - - mid05tor12cn13: ID Purpose State Version - mid05tor12cn13: ------------------------------------------------------- - mid05tor12cn13: 221d9020 Host Active(*) IBM-witherspoon-redbud-ibm-OP9_v1.19_1.33 - mid05tor12cn13: efc8a851 BMC Active(*) ibm-v1.99.10-113-g65edf7d-r10-0-gcdf7635 <--- good hash - mid05tor12cn13: f6590ce0 BMC Active ibm-v1.99.10-113-g65edf7d-r8-0-g713d86d - mid05tor12cn13: - -Two active BMCs ---------------- - -If you have two active BMCs:: - - [root@mgt03 ~]# rflash f7n02 -l - f7n02: ID Purpose State Version - f7n02: ------------------------------------------------------- - f7n02: b5273d71 BMC Active(*) ibm-v1.99.10-113-g65edf7d-r8-0-g713d86d - f7n02: 30ee1c48 Host Active(*) IBM-witherspoon-ibm-OP9_v1.19_1.112 - f7n02: 4f33e0f4 Host Failed(+) IBM-witherspoon-ibm-OP9_v1.19_1.109 - f7n02: f6590ce0 BMC Active(*) ibm-v1.99.10-113-g65edf7d-r8-0-g713d86d - f7n02: - -There's no way to de-activate one manually, recover by doing the following: - -#. Flash the BMC to the previous level of the firmware and reboot BMC -#. Delete the duplicate firmware using ``rflash -d `` -#. Re-flash the BMC to the target level and reboot the BMC. diff --git a/docs/source/references/coral/known_issues/openbmc/SW407037.rst b/docs/source/references/coral/known_issues/openbmc/SW407037.rst deleted file mode 100644 index d3947a6c1..000000000 --- a/docs/source/references/coral/known_issues/openbmc/SW407037.rst +++ /dev/null @@ -1,38 +0,0 @@ -SW407037 - bmcsetup does not successfully configure the IP (Sev1) -================================================================= - -* **Issue:** `SW407037 `_ -* **Reported:** 1742C (ibm-v1.99.10-113-g65edf7d-r8-0-g713d86d) -* **Fixed:** Fixed in xCAT after 11/07/17 `#4242 `_ - -**Issue:** - -OpenBMC firmware has problems with ipmi inband support of the ``access on`` comamnd and the work around is to use the ``raw 0x06 0x40`` instead. In early Sept, we switched to using ``access on`` because the implementation looked like it was working, since then we have found some issues with it and recommendation is to revert back to the raw command. - -See related issues describing potential problems: -* https://github.com/openbmc/openbmc/issues/2493 -* https://github.com/openbmc/openbmc/issues/2492 - -This problem is very severe because if the network is not configured correctly, the access to the BMC is lost. - -**Work-around** - -Use one of the following work arounds: - -#. Install a version of xCAT built after November, 07, 2017 which includes the fix. (**Recommended**) - -#. Manually patch bmcsetup using changes in PR: https://github.com/xcat2/xcat-core/pull/4247, then run ``mknb ppc64`` - -#. Patch the system with provided patch: - - #. Download patch file: https://github.com/xcat2/xcat-core/files/1451181/bmcsetup.4242.patch.txt - - #. If file name is ``/tmp/bmcsetup.4242.patch.txt`` - - #. ``cd /opt/xcat/share/xcat/netboot/genesis/ppc64/fs/usr/bin`` - - #. ``patch -p0 < /tmp/bmcsetup.4242.patch.txt`` - - #. ``mknb ppc64`` - - diff --git a/docs/source/references/coral/known_issues/openbmc/index.rst b/docs/source/references/coral/known_issues/openbmc/index.rst deleted file mode 100644 index 03ae246fc..000000000 --- a/docs/source/references/coral/known_issues/openbmc/index.rst +++ /dev/null @@ -1,47 +0,0 @@ -OpenBMC Management Issues -========================= - -xCAT ----- - -2.13.8 -`````` - -Please see the `2.13.8 Release Notes `_ for the full list of known issues. - -.. toctree:: - :maxdepth: 2 - - 2_13_8.rst - -Firmware --------- - -The following versions indicate the level of firmware the issue was reported. - - -1742C - ibm-v1.99.10-113-g65edf7d-r8-0-g713d86d -``````````````````````````````````````````````` - -.. toctree:: - :maxdepth: 1 - - SW407037.rst - -1740A - ibm-v1.99.10-0-r11 -`````````````````````````` - -.. toctree:: - :maxdepth: 1 - - SW406771.rst - - -1738A - ibm-v1.99.10-0-r7 -`````````````````````````` - -.. toctree:: - :maxdepth: 1 - - SW404161.rst - SW402273.rst From fa17c990d238882032efabd470b6f8daa597acf0 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Thu, 25 Oct 2018 23:16:06 -0400 Subject: [PATCH 015/121] update for case failure --- .../templates/diff/change_name.sh | 13 ++ .../xcat-inventory/templates/diff/diff.result | 87 ++++++++ .../templates/diff/diff_files.result | 87 ++++++++ .../templates/diff/diff_source.result | 70 +++++++ .../diff/xcat-inventory_diff_file1.json | 191 ++++++++++++++++++ .../diff/xcat-inventory_diff_file2.json | 173 ++++++++++++++++ 6 files changed, 621 insertions(+) create mode 100644 xCAT-test/autotest/testcase/xcat-inventory/templates/diff/change_name.sh create mode 100644 xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff.result create mode 100644 xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff_files.result create mode 100644 xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff_source.result create mode 100644 xCAT-test/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file1.json create mode 100644 xCAT-test/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file2.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/change_name.sh b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/change_name.sh new file mode 100644 index 000000000..b37eb278f --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/change_name.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +file1=$1 +file2=$2 +tmp_diff_file=$3 +rm -rf $tmp_diff_file +echo "copy /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/diff.result to $tmp_diff_file and modify compare file name in $tmp_diff_file" +cp /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/diff.result $tmp_diff_file +echo "copy command exit code $?" +sed -i "s|#FILE1#|$file1|g" $tmp_diff_file +echo "sed command exit code $?" +sed -i "s|#FILE2#|$file2|g" $tmp_diff_file +echo "sed command exit code $?" diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff.result b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff.result new file mode 100644 index 000000000..a4a54c114 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff.result @@ -0,0 +1,87 @@ + +====================BEGIN===================== + + +--- #FILE1# ++++ #FILE2# +{ + "node": { + "node1": { + "obj_info": { +- "groups": "ipmi" ++ "groups": "all" + }, + "engines": { + "hardware_mgt_engine": { +- "engine_type": "ipmi" + "engine_info": { +- "bmcusername": "ADMIN" + }, ++ "engine_type": "openbmc" + } + } + }, +- "node3": { +- "obj_info": { +- "groups": "openbmc" +- }, +- "role": "compute", +- "device_type": "server", +- "engines": { +- "hardware_mgt_engine": { +- "engine_info": { +- "bmc": "10.1.1.2", +- "bmcusername": "ADMIN" +- }, +- "engine_type": "openbmc" +- } +- }, +- "obj_type": "node" +- } + "node2": { + "network_info": { + "primarynic": { + "mac": [ +- "42:73:0a:03:11:0a!*NOIP*", ++ "42:6e:0a:03:11:0b" + ] + } + } + } + }, + "osimage": { + "rhels7.5-alternate-ppc64le-install-compute": { + "package_selection": { + "pkgdir": [ ++ "/install/rhels7.5-alternate/ppc64le/test" + ], + "otherpkgdir": [ +- "/install/post/otherpkgs/rhels7.5-alternate/ppc64le", ++ "/install/post/otherpkgs/rhels7.5-alternate/ppc64" + ] + } + } + }, + "site": { + "clustersite": { +- "xcatdebugmode": "1", +- "domain": "test.com", +- "master": "10.1.1.2", +- "forwarders": "10.0.0.1" ++ "xcatdebugmode": "0", ++ "domain": "cluster.com", ++ "master": "10.1.1.1" + } + }, + "network": { + "10_0_0_0-255_0_0_0": { + "basic_attr": { +- "mgtifname": "eth1" ++ "mgtifname": "eth0" + } + } + } +} + +====================END===================== + diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff_files.result b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff_files.result new file mode 100644 index 000000000..a4a54c114 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff_files.result @@ -0,0 +1,87 @@ + +====================BEGIN===================== + + +--- #FILE1# ++++ #FILE2# +{ + "node": { + "node1": { + "obj_info": { +- "groups": "ipmi" ++ "groups": "all" + }, + "engines": { + "hardware_mgt_engine": { +- "engine_type": "ipmi" + "engine_info": { +- "bmcusername": "ADMIN" + }, ++ "engine_type": "openbmc" + } + } + }, +- "node3": { +- "obj_info": { +- "groups": "openbmc" +- }, +- "role": "compute", +- "device_type": "server", +- "engines": { +- "hardware_mgt_engine": { +- "engine_info": { +- "bmc": "10.1.1.2", +- "bmcusername": "ADMIN" +- }, +- "engine_type": "openbmc" +- } +- }, +- "obj_type": "node" +- } + "node2": { + "network_info": { + "primarynic": { + "mac": [ +- "42:73:0a:03:11:0a!*NOIP*", ++ "42:6e:0a:03:11:0b" + ] + } + } + } + }, + "osimage": { + "rhels7.5-alternate-ppc64le-install-compute": { + "package_selection": { + "pkgdir": [ ++ "/install/rhels7.5-alternate/ppc64le/test" + ], + "otherpkgdir": [ +- "/install/post/otherpkgs/rhels7.5-alternate/ppc64le", ++ "/install/post/otherpkgs/rhels7.5-alternate/ppc64" + ] + } + } + }, + "site": { + "clustersite": { +- "xcatdebugmode": "1", +- "domain": "test.com", +- "master": "10.1.1.2", +- "forwarders": "10.0.0.1" ++ "xcatdebugmode": "0", ++ "domain": "cluster.com", ++ "master": "10.1.1.1" + } + }, + "network": { + "10_0_0_0-255_0_0_0": { + "basic_attr": { +- "mgtifname": "eth1" ++ "mgtifname": "eth0" + } + } + } +} + +====================END===================== + diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff_source.result b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff_source.result new file mode 100644 index 000000000..45f78d822 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff_source.result @@ -0,0 +1,70 @@ + +====================BEGIN===================== + + +--- xCAT DB ++++ /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file2.json +{ + "node": { + "node1": { + "obj_info": { +- "groups": "ipmi" ++ "groups": "all" + }, + "engines": { + "hardware_mgt_engine": { +- "engine_type": "ipmi" + "engine_info": { +- "bmcusername": "ADMIN" + }, ++ "engine_type": "openbmc" + } + } + }, + "node2": { + "network_info": { + "primarynic": { + "mac": [ +- "42:73:0a:03:11:0a!*NOIP*", ++ "42:6e:0a:03:11:0b" + ] + } + } + } + }, + "osimage": { + "rhels7.5-alternate-ppc64le-install-compute": { + "package_selection": { + "pkgdir": [ ++ "/install/rhels7.5-alternate/ppc64le/test" + ], + "otherpkgdir": [ +- "/install/post/otherpkgs/rhels7.5-alternate/ppc64le", ++ "/install/post/otherpkgs/rhels7.5-alternate/ppc64" + ] + } + } + }, + "site": { + "clustersite": { +- "xcatdebugmode": "1", +- "domain": "test.com", +- "master": "10.1.1.2", +- "forwarders": "10.0.0.1" ++ "xcatdebugmode": "0", ++ "domain": "cluster.com", ++ "master": "10.1.1.1" + } + }, + "network": { + "10_0_0_0-255_0_0_0": { + "basic_attr": { +- "mgtifname": "eth1" ++ "mgtifname": "eth0" + } + } + } +} + +====================END===================== + diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file1.json b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file1.json new file mode 100644 index 000000000..a77ff9b95 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file1.json @@ -0,0 +1,191 @@ +{ + "network": { + "10_0_0_0-255_0_0_0": { + "basic_attr": { + "gateway": "", + "mask": "255.0.0.0", + "mgtifname": "eth1", + "mtu": "1500", + "net": "10.0.0.0" + }, + "service": { + "tftpserver": "" + } + } + }, + "node": { + "node1": { + "device_type": "server", + "engines": { + "hardware_mgt_engine": { + "engine_info": { + "bmc": "10.1.1.1", + "bmcusername": "ADMIN", + }, + "engine_type": "ipmi" + } + }, + "obj_info": { + "groups": "ipmi" + }, + "obj_type": "node", + "role": "compute" + }, + "node2": { + "device_info": { + "arch": "ppc64le", + "uuid": "7d6ca5da-9485-11e8-821f-426e0a03110a" + }, + "device_type": "server", + "engines": { + "console_engine": { + "engine_info": { + "consoleenabled": "1", + "serialport": "0", + "serialspeed": "115200" + } + }, + "hardware_mgt_engine": { + "engine_info": { + "id": "10", + "vmcpus": "2", + "vmhost": "node_host", + "vmmemory": "6144", + "vmnics": "brenP3p9s0f0,brenP3p9s0f1", + "vmstorage": "phy:/dev/mapper/vdiskvg01-vdisk01n10" + }, + "engine_type": "kvm" + }, + "netboot_engine": { + "engine_info": { + "osimage": "rhels7.5-ppc64le-install-compute" + }, + "engine_type": "grub2" + } + }, + "network_info": { + "primarynic": { + "mac": [ + "42:6e:0a:03:11:0a", + "42:73:0a:03:11:0a!*NOIP*" + ] + } + }, + "obj_info": { + "groups": "all" + }, + "obj_type": "node", + "role": "compute" + }, + "node3": { + "device_type": "server", + "engines": { + "hardware_mgt_engine": { + "engine_info": { + "bmc": "10.1.1.2", + "bmcusername": "ADMIN", + }, + "engine_type": "openbmc" + } + }, + "obj_info": { + "groups": "openbmc" + }, + "obj_type": "node", + "role": "compute" + }, + "service": { + "device_type": "server", + "engines": { + "netboot_engine": { + "engine_info": { + "postscripts": "servicenode" + } + } + }, + "obj_type": "group", + "role": "compute" + }, + "xcatdefaults": { + "device_type": "server", + "engines": { + "netboot_engine": { + "engine_info": { + "postbootscripts": "otherpkgs", + "postscripts": "syslog,remoteshell,syncfiles" + } + } + }, + "obj_type": "group", + "role": "compute" + } + }, + "osimage": { + "rhels7.5-alternate-ppc64le-install-compute": { + "basic_attributes": { + "arch": "ppc64le", + "distribution": "rhels7.5-alternate", + "osdistro": "rhels7.5-alternate-ppc64le", + "osname": "Linux" + }, + "imagetype": "linux", + "package_selection": { + "otherpkgdir": [ + "/install/post/otherpkgs/rhels7.5-alternate/ppc64le" + ], + "pkgdir": [ + "/install/rhels7.5-alternate/ppc64le" + ], + "pkglist": [ + "/opt/xcat/share/xcat/install/rh/compute.rhels7.pkglist" + ] + }, + "provision_mode": "install", + "role": "compute", + "template": "/opt/xcat/share/xcat/install/rh/compute.rhels7.tmpl" + }, + }, + "schema_version": "latest", + "site": { + "clustersite": { + "SNsyncfiledir": "/var/xcat/syncfiles", + "auditnosyslog": "0", + "auditskipcmds": "ALL", + "blademaxp": "64", + "cleanupxcatpost": "no", + "consoleondemand": "no", + "databaseloc": "/var/lib", + "db2installloc": "/mntdb2", + "dhcplease": "43200", + "dnshandler": "ddns", + "domain": "test.com", + "enableASMI": "no", + "forwarders": "10.0.0.1", + "fsptimeout": "0", + "installdir": "/install", + "ipmimaxp": "64", + "ipmiretries": "3", + "ipmitimeout": "2", + "master": "10.1.1.2", + "maxssh": "8", + "nameservers": "10.1.1.1", + "nodesyncfiledir": "/var/xcat/node/syncfiles", + "powerinterval": "0", + "ppcmaxp": "64", + "ppcretry": "3", + "ppctimeout": "0", + "sharedtftp": "1", + "sshbetweennodes": "ALLGROUPS", + "syspowerinterval": "0", + "tftpdir": "/tftpboot", + "timezone": "US/Eastern", + "useNmapfromMN": "no", + "vsftp": "n", + "xcatconfdir": "/etc/xcat", + "xcatdebugmode": "1", + "xcatdport": "3001", + "xcatiport": "3002", + "xcatsslversion": "TLSv1" + } + } +} diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file2.json b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file2.json new file mode 100644 index 000000000..a3f7b243e --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file2.json @@ -0,0 +1,173 @@ +{ + "network": { + "10_0_0_0-255_0_0_0": { + "basic_attr": { + "gateway": "", + "mask": "255.0.0.0", + "mgtifname": "eth0", + "mtu": "1500", + "net": "10.0.0.0" + }, + "service": { + "tftpserver": "" + } + } + }, + "node": { + "node1": { + "device_type": "server", + "engines": { + "hardware_mgt_engine": { + "engine_info": { + "bmc": "10.1.1.1", + }, + "engine_type": "openbmc" + } + }, + "obj_info": { + "groups": "all" + }, + "obj_type": "node", + "role": "compute" + }, + "node2": { + "device_info": { + "arch": "ppc64le", + "uuid": "7d6ca5da-9485-11e8-821f-426e0a03110a" + }, + "device_type": "server", + "engines": { + "console_engine": { + "engine_info": { + "consoleenabled": "1", + "serialport": "0", + "serialspeed": "115200" + } + }, + "hardware_mgt_engine": { + "engine_info": { + "id": "10", + "vmcpus": "2", + "vmhost": "node_host", + "vmmemory": "6144", + "vmnics": "brenP3p9s0f0,brenP3p9s0f1", + "vmstorage": "phy:/dev/mapper/vdiskvg01-vdisk01n10" + }, + "engine_type": "kvm" + }, + "netboot_engine": { + "engine_info": { + "osimage": "rhels7.5-ppc64le-install-compute" + }, + "engine_type": "grub2" + } + }, + "network_info": { + "primarynic": { + "mac": [ + "42:6e:0a:03:11:0a", + "42:6e:0a:03:11:0b" + ] + } + }, + "obj_info": { + "groups": "all" + }, + "obj_type": "node", + "role": "compute" + }, + "service": { + "device_type": "server", + "engines": { + "netboot_engine": { + "engine_info": { + "postscripts": "servicenode" + } + } + }, + "obj_type": "group", + "role": "compute" + }, + "xcatdefaults": { + "device_type": "server", + "engines": { + "netboot_engine": { + "engine_info": { + "postbootscripts": "otherpkgs", + "postscripts": "syslog,remoteshell,syncfiles" + } + } + }, + "obj_type": "group", + "role": "compute" + } + }, + "osimage": { + "rhels7.5-alternate-ppc64le-install-compute": { + "basic_attributes": { + "arch": "ppc64le", + "distribution": "rhels7.5-alternate", + "osdistro": "rhels7.5-alternate-ppc64le", + "osname": "Linux" + }, + "imagetype": "linux", + "package_selection": { + "otherpkgdir": [ + "/install/post/otherpkgs/rhels7.5-alternate/ppc64" + ], + "pkgdir": [ + "/install/rhels7.5-alternate/ppc64le", + "/install/rhels7.5-alternate/ppc64le/test" + ], + "pkglist": [ + "/opt/xcat/share/xcat/install/rh/compute.rhels7.pkglist" + ] + }, + "provision_mode": "install", + "role": "compute", + "template": "/opt/xcat/share/xcat/install/rh/compute.rhels7.tmpl" + }, + }, + "schema_version": "latest", + "site": { + "clustersite": { + "SNsyncfiledir": "/var/xcat/syncfiles", + "auditnosyslog": "0", + "auditskipcmds": "ALL", + "blademaxp": "64", + "cleanupxcatpost": "no", + "consoleondemand": "no", + "databaseloc": "/var/lib", + "db2installloc": "/mntdb2", + "dhcplease": "43200", + "dnshandler": "ddns", + "domain": "cluster.com", + "enableASMI": "no", + "fsptimeout": "0", + "installdir": "/install", + "ipmimaxp": "64", + "ipmiretries": "3", + "ipmitimeout": "2", + "master": "10.1.1.1", + "maxssh": "8", + "nameservers": "10.1.1.1", + "nodesyncfiledir": "/var/xcat/node/syncfiles", + "powerinterval": "0", + "ppcmaxp": "64", + "ppcretry": "3", + "ppctimeout": "0", + "sharedtftp": "1", + "sshbetweennodes": "ALLGROUPS", + "syspowerinterval": "0", + "tftpdir": "/tftpboot", + "timezone": "US/Eastern", + "useNmapfromMN": "no", + "vsftp": "n", + "xcatconfdir": "/etc/xcat", + "xcatdebugmode": "0", + "xcatdport": "3001", + "xcatiport": "3002", + "xcatsslversion": "TLSv1" + } + } +} From 3d4f1964262af709bd75a5f14c346919a786c495 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Fri, 26 Oct 2018 11:28:51 +0800 Subject: [PATCH 016/121] [go-xcat] Change back to gpgcheck=0 --- xCAT-server/share/xcat/tools/go-xcat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index 0329e7096..9a87bbcef 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -1121,7 +1121,7 @@ function add_repo_by_url_yum_or_zypper() name=${repo_id} baseurl=file://${url%/} enabled=1 - gpgcheck=1 + gpgcheck=0 gpgkey=file://${url%/}/repodata/repomd.xml.key EOF add_repo_by_file "${tmp}" "${repo_id}" From 3067412a7f016c17178b6d37a03e2b56a89edf65 Mon Sep 17 00:00:00 2001 From: bybai Date: Fri, 26 Oct 2018 02:33:57 -0400 Subject: [PATCH 017/121] nodeset ubuntu16.04.5 x86_64 support --- xCAT-server/lib/xcat/plugins/debian.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm index 7a2c894c3..eced2b293 100644 --- a/xCAT-server/lib/xcat/plugins/debian.pm +++ b/xCAT-server/lib/xcat/plugins/debian.pm @@ -770,7 +770,7 @@ sub mkinstall { if ($arch =~ /ppc64/i and !(-e "$pkgdir/install/netboot/initrd.gz") and !(-e "$pkgdir/install/netboot/ubuntu-installer/$darch/initrd.gz")) { - xCAT::MsgUtils->report_node_error($callback, $node, + xCAT::MsgUtils->report_node_error($callback, $node, "The network boot initrd.gz is not found in $pkgdir/install/netboot. This is provided by Ubuntu, please download and retry." ); next; @@ -788,7 +788,7 @@ sub mkinstall { ($arch =~ /x86/ and ( (-r "$pkgdir/install/hwe-netboot/ubuntu-installer/$darch/linux" - and $kernpath = "$pkgdir/hwe-install/netboot/ubuntu-installer/$darch/linux" + and $kernpath = "$pkgdir/install/hwe-netboot/ubuntu-installer/$darch/linux" and -r "$pkgdir/install/hwe-netboot/ubuntu-installer/$darch/initrd.gz" and $initrdpath = "$pkgdir/install/hwe-netboot/ubuntu-installer/$darch/initrd.gz" ) or From ca49763b81f78c6b2f3cc67eda930d144c9814e2 Mon Sep 17 00:00:00 2001 From: huweihua Date: Fri, 26 Oct 2018 01:57:51 -0400 Subject: [PATCH 018/121] enhance test case setup_vm --- xCAT-test/autotest/testcase/installation/setup_vm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-test/autotest/testcase/installation/setup_vm b/xCAT-test/autotest/testcase/installation/setup_vm index ada8c99a9..e863b21fc 100644 --- a/xCAT-test/autotest/testcase/installation/setup_vm +++ b/xCAT-test/autotest/testcase/installation/setup_vm @@ -1,7 +1,7 @@ start:setup_vm description:reset up vm environment if need label:others -cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" -a "__GETNODEATTR($$CN,mgt)__" != "openbmc" ];then echo "CN node $$CN is a vm which mgt is __GETNODEATTR($$CN,mgt)__, start to recreate the vm now"; echo "rmvm $$CN -f -p";rpower $$CN off; sleep 3; rmvm $$CN -f -p; var=`expr substr "__GETNODEATTR($$CN,vmstorage)__" 1 3`; echo "The disk create way of $$CN is $var"; if [ "$var" = "phy" ]; then echo "mkvm $$CN"; mkvm $$CN; exit $?; elif [ "$var" = "dir" ]; then echo "mkvm $$CN -s 20G"; mkvm $$CN -s 20G; exit $?; elif ["$var" = "nfs" -o "$var" = "lvm" ];then echo "Need to fix me"; exit 2; else echo "unsupported disk creation way"; exit 3;fi;else echo "CN node $$CN is a non-VM; do not need to recreate it";fi +cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" -a "__GETNODEATTR($$CN,mgt)__" != "openbmc" ];then echo "CN node $$CN is a vm which mgt is __GETNODEATTR($$CN,mgt)__, start to recreate the vm now"; echo "rpower $$CN off"; rpower $$CN off; sleep 3; echo "rpower $$CN stat"; rpower $$CN stat; var=`expr substr "__GETNODEATTR($$CN,vmstorage)__" 1 3`; echo "The disk create way of $$CN is $var"; if [ "$var" = "phy" ]; then echo "mkvm $$CN"; mkvm $$CN; echo "rmvm $$CN -f -p"; rmvm $$CN -f -p; echo "mkvm $$CN"; mkvm $$CN; exit $?; elif [ "$var" = "dir" ]; then echo "mkvm $$CN -s 20G"; mkvm $$CN -s 20G; echo "rmvm $$CN -f -p"; rmvm $$CN -f -p; echo "mkvm $$CN -s 20G"; mkvm $$CN -s 20G; exit $?; elif ["$var" = "nfs" -o "$var" = "lvm" ];then echo "Need to fix me"; exit 2; else echo "unsupported disk creation way"; exit 3;fi;else echo "CN node $$CN is a non-VM; do not need to recreate it";fi check:rc==0 cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" -a "__GETNODEATTR($$CN,mgt)__" != "openbmc" ]; then echo "CN node is a vm, need to repower it on"; echo "rpower $$CN on"; rpower $$CN on; else echo "CN node $$CN is a non-VM; do not need to repower on it"; fi @@ -13,7 +13,7 @@ check:output=~on cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" -a "__GETNODEATTR($$CN,mgt)__" != "openbmc" ]; then tabdump -w node==$$CN kvm_nodedata; fi check:rc==0 -cmd:if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" -a "__GETNODEATTR($$SN,mgt)__" != "openbmc" ];then echo "SN node $$SN is a vm which mgt is __GETNODEATTR($$SN,mgt)__, start to recreate the vm now"; echo "rmvm $$SN -f -p"; rpower $$SN off; sleep 3; rmvm $$SN -f -p; var=`expr substr "__GETNODEATTR($$SN,vmstorage)__" 1 3`; echo "The disk create way of $$SN is $var"; if [ "$var" = "phy" ]; then echo "mkvm $$SN"; mkvm $$SN; exit $?; elif [ "$var" = "dir" ]; then echo "mkvm $$SN -s 20G"; mkvm $$SN -s 20G; exit $?; elif ["$var" = "nfs" -o "$var" = "lvm" ];then echo "Need to fix me"; exit 2; else echo "unsupported disk creation way"; exit 3;fi;else echo "SN node $$SN is a non-VM; do not need to recreate it";fi +cmd:if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" -a "__GETNODEATTR($$SN,mgt)__" != "openbmc" ];then echo "SN node $$SN is a vm which mgt is __GETNODEATTR($$SN,mgt)__, start to recreate the vm now"; echo "rpower $$SN off"; rpower $$SN off; sleep 3; echo "rpower $$SN stat"; rpower $$SN stat; var=`expr substr "__GETNODEATTR($$SN,vmstorage)__" 1 3`; echo "The disk create way of $$SN is $var"; if [ "$var" = "phy" ]; then echo "mkvm $$SN"; mkvm $$SN; echo "rmvm $$SN -f -p"; rmvm $$SN -f -p; echo "mkvm $$SN"; mkvm $$SN; exit $?; elif [ "$var" = "dir" ]; then echo "mkvm $$SN -s 20G"; mkvm $$SN -s 20G; echo "rmvm $$SN -f -p"; rmvm $$SN -f -p; echo "mkvm $$SN -s 20G"; mkvm $$SN -s 20G; exit $?; elif ["$var" = "nfs" -o "$var" = "lvm" ];then echo "Need to fix me"; exit 2; else echo "unsupported disk creation way"; exit 3;fi;else echo "SN node $$SN is a non-VM; do not need to recreate it";fi check:rc==0 From 8fb3c11461c16a16fa43eabf50dcf84b6df22e6e Mon Sep 17 00:00:00 2001 From: bxuxa Date: Fri, 26 Oct 2018 15:13:56 +0800 Subject: [PATCH 019/121] localdisk to support user customize the partition table type some old code issues found during UT for this feature --- .../common/deployment/enable_localdisk.rst | 12 ++++++----- xCAT-server/lib/xcat/plugins/getpartition.pm | 2 +- .../netboot/add-on/statelite/rc.localdisk | 21 ++++++++++++------- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/enable_localdisk.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/enable_localdisk.rst index a9561abb7..73d966f58 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/enable_localdisk.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/enable_localdisk.rst @@ -22,18 +22,19 @@ An example ``localdisk`` configuration file: :: enable=yes enablepart=no - [disk] - dev=/dev/sdb - clear=yes - parts=100M-200M,1G-2G - [disk] dev=/dev/sda clear=yes parts=10,20,30 + [disk] + dev=/dev/sdb + clear=yes + parts=100M-200M,1G-2G + [disk] dev=/dev/sdc + ptype=gpt clear=yes parts=10,20,30 @@ -53,6 +54,7 @@ The ``[disk]`` section is used to configure how to partition a hard disk: * dev: The path of the device file. * clear: If set to ``yes`` it will clear all the existing partitions on this disk. + * ptype: The partition table type of the disk. For example, ``msdos`` or ``gpt``, and ``msdos`` is the default. * fstype: The file system type for the new created partitions. ``ext3`` is the default. * parts: A comma separated list of space ranges, one for each partition that will be created on the device. The valid format for each space range is ``-`` or ````. For example, you could set it to ``100M-10G`` or ``50``. If set to ``50``, 50% of the disk space will be assigned to that partition. diff --git a/xCAT-server/lib/xcat/plugins/getpartition.pm b/xCAT-server/lib/xcat/plugins/getpartition.pm index 42a651c54..b90aadee7 100644 --- a/xCAT-server/lib/xcat/plugins/getpartition.pm +++ b/xCAT-server/lib/xcat/plugins/getpartition.pm @@ -54,7 +54,7 @@ sub process_request if ($client) { ($client) = noderange($client) } unless ($client) { #Not able to do identify the host in question - xCAT::MsgUtils->message("S", "Received syncfiles from $client, which couldn't be correlated to a node (domain mismatch?)"); + xCAT::MsgUtils->message("S", "Received getpartition from $client, which couldn't be correlated to a node (domain mismatch?)"); return; } diff --git a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.localdisk b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.localdisk index 6823bb84b..93c333e25 100755 --- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.localdisk +++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.localdisk @@ -75,9 +75,9 @@ xCATCmd () { } doconfigure () { - echo "DEBUG: enable=[$enable]; enablepart=[$enablepart]; disk=[$disk]; localspace=[$localspace]; swapspace=[$swapspace]; dev=[$dev]; parts=[$parts]; clear=[$clear];" >>$LOG # run the configure script if [ $isscript -eq 1 ]; then + echo "DEBUG: localdisk is run in script mode ..." >>$LOG # run the script chmod +x $SCRIPTFILE $SCRIPTFILE @@ -85,8 +85,10 @@ doconfigure () { fi if [ x"$enable" != x"yes" ]; then + echo "WARN: localdisk is not enabled, enable=[$enable]" >>$LOG exit 1 fi + echo "DEBUG: enablepart=[$enablepart]; disk=[$disk]; localspace=[$localspace]; swapspace=[$swapspace]; dev=[$dev]; parts=[$parts]; clear=[$clear]; ptype=[$ptype]" >>$LOG if [ $disk -eq 1 ]; then if [ x"$enablepart" != x"yes" ]; then return @@ -105,7 +107,7 @@ doconfigure () { # To recreate the disk label when clear=yes, this action is used to resolve the issue # that the disk has been formatted by AIX if [ x$clear != x ]; then - `parted -s $dev mklabel msdos` + `parted -s $dev mklabel $ptype` fi # remove all the partitions on the device @@ -125,8 +127,8 @@ doconfigure () { if [ x$devname = x"$dev" ]; then #create the label - `parted -s $dev mklabel msdos` - echo "parted -s $dev mklabel msdos" >>$LOG + `parted -s $dev mklabel $ptype` + echo "parted -s $dev mklabel $ptype" >>$LOG fi fi done < $PARTLOG @@ -261,15 +263,15 @@ do firstline=$LINE # the format of first line should be: type=script|format key=`echo \$firstline |awk -F= '{print \$1}'` - if [ x$key != x"type" ]; then - echo "Error: Cannot recognize the format of the parition configuration file." >>$LOG + if [ x"$key" != x"type" ]; then + echo "Error: Cannot recognize the format of the partition configuration file." >>$LOG echo "Error to configure localdisk" exit 1 fi value=`echo \$firstline |awk -F= '{print \$2}'` - if [ x$value = x"script" ]; then + if [ x"$value" = x"script" ]; then isscript=1 - elif [ x$value = x"format" ]; then + elif [ x"$value" = x"format" ]; then isformat=1 fi continue @@ -288,6 +290,7 @@ do dev="" clear="" parts="" + ptype="msdos" elif [ x$LINE = x"[localspace]" ]; then doconfigure disk=0 @@ -308,6 +311,8 @@ do dev=$value elif [ x$key = x"clear" ]; then clear=$value + elif [ x$key = x"ptype" ]; then + ptype=$value elif [ x$key = x"parts" ]; then parts=$value elif [ x$key = x"fstype" ]; then From 1fc3e2d18c7b8064df181edde0b2442f2ed07cf3 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Fri, 26 Oct 2018 16:03:58 +0800 Subject: [PATCH 020/121] [go-xcat] Fix command line argument handling bug introduced by previous commits --- xCAT-server/share/xcat/tools/go-xcat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index 9a87bbcef..b43e95bd4 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -2,7 +2,7 @@ # # go-xcat - Install xCAT automatically. # -# Version 1.0.30 +# Version 1.0.32 # # Copyright (C) 2016, 2017, 2018 International Business Machines # Eclipse Public License, Version 1.0 (EPL-1.0) @@ -1868,7 +1868,7 @@ do verbose_usage exit 0 ;; - "-x"|"--xcat-core") + "--xcat-core") shift GO_XCAT_CORE_URL="$1" ;; @@ -1882,7 +1882,7 @@ do "--xcat-dep="*) GO_XCAT_DEP_URL="${1##--xcat-dep=}" ;; - "--xcat-version") + "-x"|"--xcat-version") shift GO_XCAT_VERSION="$1" ;; From 9f3d2f2e644b936921c568cdaba0890fad616d67 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Mon, 29 Oct 2018 01:55:45 -0400 Subject: [PATCH 021/121] update labels for all ci test cases --- xCAT-test/autotest/testcase/analyze_log/case0 | 2 +- xCAT-test/autotest/testcase/chdef/cases0 | 26 ++++++------ xCAT-test/autotest/testcase/chtab/cases0 | 16 ++++---- xCAT-test/autotest/testcase/dumpxCATdb/cases0 | 18 ++++----- xCAT-test/autotest/testcase/gettab/cases0 | 8 ++-- xCAT-test/autotest/testcase/lsdef/cases0 | 36 ++++++++--------- xCAT-test/autotest/testcase/lsxcatd/cases0 | 8 ++-- .../autotest/testcase/makeconservercf/cases0 | 3 ++ xCAT-test/autotest/testcase/makedhcp/cases0 | 7 ++-- xCAT-test/autotest/testcase/makedns/cases0 | 2 +- xCAT-test/autotest/testcase/makehosts/cases0 | 10 ++--- .../autotest/testcase/makeknownhosts/cases0 | 1 + .../autotest/testcase/makenetworks/cases0 | 4 ++ xCAT-test/autotest/testcase/mkdef/cases0 | 26 ++++++------ xCAT-test/autotest/testcase/mkdef/cases1 | 4 +- xCAT-test/autotest/testcase/nodeadd/cases0 | 12 +++--- xCAT-test/autotest/testcase/nodech/cases0 | 34 ++++++++-------- xCAT-test/autotest/testcase/nodegrpch/cases0 | 8 ++-- xCAT-test/autotest/testcase/nodels/cases0 | 40 +++++++++---------- xCAT-test/autotest/testcase/noderange/cases0 | 32 +++++++-------- xCAT-test/autotest/testcase/noderm/cases0 | 8 ++-- xCAT-test/autotest/testcase/nodestat/cases0 | 1 + .../autotest/testcase/restorexCATdb/cases0 | 12 +++--- xCAT-test/autotest/testcase/rmdef/cases0 | 18 ++++----- xCAT-test/autotest/testcase/tabdump/cases0 | 32 +++++++-------- xCAT-test/autotest/testcase/tabgrep/cases0 | 8 ++-- xCAT-test/autotest/testcase/tabprune/cases0 | 14 +++---- xCAT-test/autotest/testcase/tabrestore/cases0 | 8 ++-- xCAT-test/autotest/testcase/xcatd/case0 | 10 ++--- xCAT-test/autotest/testcase/xcatsnap/cases0 | 6 +-- .../autotest/testcase/xcatstanzafile/cases0 | 10 ++--- 31 files changed, 217 insertions(+), 207 deletions(-) diff --git a/xCAT-test/autotest/testcase/analyze_log/case0 b/xCAT-test/autotest/testcase/analyze_log/case0 index 2640bbbaa..cc1fca777 100644 --- a/xCAT-test/autotest/testcase/analyze_log/case0 +++ b/xCAT-test/autotest/testcase/analyze_log/case0 @@ -1,6 +1,6 @@ start:check_mn_cluster_log_file description:check known error message in /var/log/xcat/cluster.log file. Only for redhat and sles. -label:mn_only +label:mn_only,ci_test cmd:cat /var/log/xcat/cluster.log | grep "xcatd: Error happened when receiving data from DB access" check:output!~xcatd: Error happened when receiving data from DB access cmd:cat /var/log/xcat/cluster.log | grep "Undefined subroutine &main" diff --git a/xCAT-test/autotest/testcase/chdef/cases0 b/xCAT-test/autotest/testcase/chdef/cases0 index 82b749c5b..ff35b1aad 100644 --- a/xCAT-test/autotest/testcase/chdef/cases0 +++ b/xCAT-test/autotest/testcase/chdef/cases0 @@ -1,13 +1,13 @@ start:chdef_null description:chdef without any flag -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef check:output=~Usage end start:chdef_t_node description:chdef -t node -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode groups=all check:rc==0 cmd:chdef -t node -o testnode groups=aix @@ -36,7 +36,7 @@ end start:chdef_t_network description:chdef -t network -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t network -o testnetwork net=111.222.33.0 mask=255.255.255.254 check:rc==0 cmd:lsdef -t network -l testnetwork @@ -55,7 +55,7 @@ end start:chdef_p description:chdef -p -t node -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode groups=all check:rc==0 cmd:chdef -p -t node -o testnode groups=aix @@ -67,7 +67,7 @@ end start:chdef_m description:chdef -m -t node -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode groups=all,testgroup check:rc==0 cmd:chdef -m -t node -o testnode groups=testgroup @@ -79,7 +79,7 @@ end start:chdef_z description:chdef -z -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode groups=all check:rc==0 cmd:lsdef testnode -z > /tmp/testnode.stanza @@ -97,7 +97,7 @@ end start:chdef_group description:chdef with node group -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode1-testnode2 mgt=hmc cons=hmc groups=all,systemp check:rc==0 cmd:mkdef -t node -o testnode3-testnode4 mgt=ipmi cons=ipmi groups=all,systemx @@ -134,7 +134,7 @@ end start:chdef_group_p -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef abcnode1 -p groups=abc check:rc==0 cmd:chdef abcnode2 -p groups=abcabc @@ -152,7 +152,7 @@ end start:chdef_dynamic_group description:chdef with dynamic node group -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode1-testnode2 mgt=hmc cons=hmc groups=all,systemp check:rc==0 cmd:mkdef -t node -o testnode3-testnode4 mgt=hmc cons=ipmi groups=all,systemx @@ -199,7 +199,7 @@ end start:chdef_multiple_keys description:mkdef support for multiple keys in a table, such as ppcdirect -label:mn_only,db +label:mn_only,ci_test,db cmd: mkdef -t node -o testfsp mgt=fsp cons=fsp groups=all,fsp nodetype=fsp passwd.HMC=abc123 passwd.general=abc123 passwd.admin=abc123 check:rc==0 cmd:lsdef testfsp @@ -220,7 +220,7 @@ end start:chdef_n description:chdef -n -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode1 mgt=hmc cons=hmc groups=all,systemp check:rc==0 cmd:chdef testnode1 -n testnode2 @@ -239,7 +239,7 @@ end start:chdef_t_o_error description:chdef -t wrongtype -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t wrongtype -o testnode groups=all,aix check:rc!=0 check:output=~not a valid @@ -248,7 +248,7 @@ end start:chdef_template description:try to change a template, a new node is created according to chdef. -label:mn_only,db +label:mn_only,ci_test,db cmd:result=`lsdef | grep switch-template`; if [[ $result =~ "switch-template" ]]; then echo $result; noderm switch-template; fi cmd:chdef -t node -o switch-template groups=test check:output=~1 object definitions have been created or modified diff --git a/xCAT-test/autotest/testcase/chtab/cases0 b/xCAT-test/autotest/testcase/chtab/cases0 index 3b35fa15e..b0191bd38 100644 --- a/xCAT-test/autotest/testcase/chtab/cases0 +++ b/xCAT-test/autotest/testcase/chtab/cases0 @@ -1,6 +1,6 @@ start:chtab_null description:Check chtab with no attr -label:mn_only,db +label:mn_only,ci_test,db cmd:chtab check:rc!=0 check:output=~Usage @@ -9,7 +9,7 @@ end start:chtab_d description:check chtab -d -label:mn_only,db +label:mn_only,ci_test,db cmd:chtab key=rsh_test site.value=/opt/xcat/bin/rcp site.comments="the rcp command" site.disable=no check:rc==0 cmd:tabdump site | grep rsh_test @@ -23,7 +23,7 @@ end start:chtab_modify_node description:test chtab with node=XXX -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups=rhels5.5 check:rc==0 cmd:chtab node=testnode nodelist.groups=all @@ -36,7 +36,7 @@ end start:chtab_modify_key description:check chtab with key=xxx -label:mn_only,db +label:mn_only,ci_test,db cmd:chtab key=rsh_test site.value=/opt/xcat/bin/rcp site.comments="the rcp command" check:rc==0 cmd:tabdump site | grep rsh_test @@ -56,7 +56,7 @@ end start:chtab_err_symble description: check chtab with error attr -label:mn_only,db +label:mn_only,ci_test,db cmd:chtab -t check:output=~Usage end @@ -76,7 +76,7 @@ end start:chtab_err_table description:chtab with error table -label:mn_only,db +label:mn_only,ci_test,db cmd:chtab error=error site.comment=error check:rc!=0 check:output=~no such column|column \"error\" does not exist @@ -85,7 +85,7 @@ end start:chtab_h description:chtab -h and --help -label:mn_only,db +label:mn_only,ci_test,db cmd:chtab -h check:output=~Usage cmd:chtab --help @@ -95,7 +95,7 @@ end start:chtab_v description:chtab -v and -version -label:mn_only,db +label:mn_only,ci_test,db cmd:chtab -v check:output=~Version cmd:chtab -version diff --git a/xCAT-test/autotest/testcase/dumpxCATdb/cases0 b/xCAT-test/autotest/testcase/dumpxCATdb/cases0 index 232ba7dd5..4406c33bb 100644 --- a/xCAT-test/autotest/testcase/dumpxCATdb/cases0 +++ b/xCAT-test/autotest/testcase/dumpxCATdb/cases0 @@ -1,6 +1,6 @@ start:dumpxCATdb_h description:dumpxCATdb -h -label:mn_only,db +label:mn_only,ci_test,db cmd:dumpxCATdb -h check:rc==0 check:output=~dumpxCATdb @@ -8,7 +8,7 @@ end start:dumpxCATdb_v description:Command Version -label:mn_only,db +label:mn_only,ci_test,db cmd:dumpxCATdb -v check:rc==0 check:output=~Version @@ -16,7 +16,7 @@ end start:dumpxCATdb_p_nullskiptables description:dumpxCATdb -p path,not skiptables -label:mn_only,db +label:mn_only,ci_test,db cmd:chtab key=skiptables site.value="" check:rc==0 cmd:dumpxCATdb -p /tmp/db @@ -32,7 +32,7 @@ end start:dumpxCATdb_a_p_nullskiptables description:dump all,without this flag the eventlog and auditlog will be skipped -label:mn_only,db +label:mn_only,ci_test,db cmd:chtab key=skiptables site.value="" check:rc==0 cmd:dumpxCATdb -a -p /tmp/db.all @@ -47,7 +47,7 @@ end start:dumpxCATdb_p_skiptables description:To have dumpxCATdb not backup the hosts or passwd table -label:mn_only,db +label:mn_only,ci_test,db cmd:chtab key=skiptables site.value="hosts,passwd" check:rc==0 cmd:dumpxCATdb -p /tmp/db.skiptables @@ -61,7 +61,7 @@ end start:dumpxCATdb_a_p_skiptables description:To have dumpxCATdb all but not backup the hosts or passwd table -label:mn_only,db +label:mn_only,ci_test,db cmd:chtab key=skiptables site.value="hosts,passwd" check:rc==0 cmd:dumpxCATdb -a -p /tmp/db.skiptables @@ -76,7 +76,7 @@ end start:dumpxCATdb_p_nullskiptables_V description:test verbose and -p -label:mn_only,db +label:mn_only,ci_test,db cmd:chtab key=skiptables site.value="" check:rc==0 cmd:dumpxCATdb -p /tmp/db -V @@ -90,7 +90,7 @@ end start:dumpxCATdb_a_p_nullskiptables_V description:test -V and -a -label:mn_only,db +label:mn_only,ci_test,db cmd:chtab key=skiptables site.value="" check:rc==0 cmd:dumpxCATdb -a -p /tmp/db -V @@ -103,7 +103,7 @@ end start:dumpxCATdb_p_V description:test -p -V -label:mn_only,db +label:mn_only,ci_test,db cmd:chtab key=skiptables site.value="passwd" check:rc==0 cmd:dumpxCATdb -p /tmp/db -V diff --git a/xCAT-test/autotest/testcase/gettab/cases0 b/xCAT-test/autotest/testcase/gettab/cases0 index ce4b1bea4..0acda2e02 100644 --- a/xCAT-test/autotest/testcase/gettab/cases0 +++ b/xCAT-test/autotest/testcase/gettab/cases0 @@ -1,5 +1,5 @@ start:gettab_key_table -label:mn_only,db +label:mn_only,ci_test,db cmd:gettab key=xcatdport site.value check:rc==0 check:output==3001 @@ -8,7 +8,7 @@ end start:gettab_H description:gettab -H and --with-fieldname -label:mn_only,db +label:mn_only,ci_test,db cmd:gettab -H key=master site.value check:rc==0 check:output=~site.value: @@ -19,7 +19,7 @@ end start:gettab_err description:gettab with error symble ,error key ,error attr. -label:mn_only,db +label:mn_only,ci_test,db cmd:gettab -c check:rc!=0 check:output=~Usage @@ -33,7 +33,7 @@ end start:gettab_h description:gettab -h and -? and --help -label:mn_only,db +label:mn_only,ci_test,db cmd:gettab -h check:output=~Usage cmd:gettab -? diff --git a/xCAT-test/autotest/testcase/lsdef/cases0 b/xCAT-test/autotest/testcase/lsdef/cases0 index 1daf6ad95..dbd717f4f 100644 --- a/xCAT-test/autotest/testcase/lsdef/cases0 +++ b/xCAT-test/autotest/testcase/lsdef/cases0 @@ -1,6 +1,6 @@ start:lsdef_null description: lsdef without any flag -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnodell groups=all check:rc==0 cmd:lsdef @@ -12,7 +12,7 @@ end start:lsdef_a description: lsdef -a and lsdef --all -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode groups=all check:rc==0 cmd:mkdef -t network -o testnetwork net=1.2.3.0 mask=255.255.255.0 @@ -37,7 +37,7 @@ end start:lsdef_t_o_l description: lsdef -o -l -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode groups=all check:rc==0 cmd:mkdef -t network -o testnetwork net=1.2.3.0 mask=255.255.255.0 @@ -59,7 +59,7 @@ end start:lsdef_t_o_l_z description: lsdef -l -z -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode groups=all check:rc==0 cmd:mkdef -t network -o testnetwork net=1.2.3.0 mask=255.255.255.0 @@ -80,7 +80,7 @@ end start:lsdef_t description: lsdef -t -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode groups=all check:rc==0 cmd:mkdef -t network -o testnetwork net=1.2.3.0 mask=255.255.255.0 @@ -95,7 +95,7 @@ end start:lsdef_t_i_o description: lsdef -i -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode groups=all check:rc==0 cmd:lsdef -t node -o testnode -i groups @@ -113,7 +113,7 @@ cmd:rmdef -t network testnetwork end start:lsdef_t_w -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode11,testnode21 cons=hmc groups=all check:rc==0 cmd:mkdef -t node -o testnode31,testnode41 cons=ipmi groups=linux @@ -144,7 +144,7 @@ end start:lsdef_s description: lsdef -s -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode groups=all check:rc==0 cmd:lsdef -s testnode @@ -155,7 +155,7 @@ end start:lsdef_t_auditlog description:lsdef -t auditlog -label:mn_only,db +label:mn_only,ci_test,db cmd:tabprune auditlog -a check:rc==0 cmd:lsdef -t auditlog @@ -165,7 +165,7 @@ end start:lsdef_t_eventlog description:lsdef -t eventlog -label:mn_only,db +label:mn_only,ci_test,db cmd:tabprune eventlog -a check:rc==0 cmd:lsdef -t eventlog @@ -175,7 +175,7 @@ end start:lsdef_t_policy description:lsdef -t policy -label:mn_only,db +label:mn_only,ci_test,db cmd:lsdef -t policy check:rc==0 check:output=~1\s+\(policy\) @@ -186,7 +186,7 @@ end start:lsdef_t_site description:lsdef -t site -label:mn_only,db +label:mn_only,ci_test,db cmd:lsdef -t site check:rc==0 check:output=~clustersite @@ -197,7 +197,7 @@ end start:lsdef_t_err description:lsdef -t wrongtype -o -label:mn_only,db +label:mn_only,ci_test,db cmd:lsdef -t wrongtype -o test check:rc!=0 check:output=~Error @@ -205,7 +205,7 @@ end start:lsdef_t_h_i description:lsdef -t node -h -i status -label:mn_only,db +label:mn_only,ci_test,db cmd:lsdef -t node -h -i status check:rc==0 check:output=~status @@ -213,7 +213,7 @@ end start:lsdef_nics description:lsdef --nics -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode1 groups=all mgt=ipmi nicips.eth0=1.1.1.1 check:rc==0 cmd:lsdef testnode1 --nics @@ -227,7 +227,7 @@ end start:lsdef_template description:check xCAT supported template -label:mn_only,db +label:mn_only,ci_test,db cmd:lsdef --template check:rc==0 check:output=~hmc\-template \(node\) @@ -240,7 +240,7 @@ end start:lsdef_template_switch_template description:check xCAT supported template for switch template -label:mn_only,db +label:mn_only,ci_test,db cmd:lsdef --template switch-template check:rc==0 check:output=~Object name\: switch-template @@ -256,7 +256,7 @@ check:output=~switchtype\=OPTIONAL\:The type of switch end start:lsdef_template_with_invalid_name -label:mn_only,db +label:mn_only,ci_test,db description:lsdef --template with invalid template name cmd:result=`lsdef | grep test_with_invalid_name`; if [[ $result =~ "test_with_invalid_name" ]]; then noderm test_with_invalid_name; fi cmd:lsdef --template "test_with_invalid_name" diff --git a/xCAT-test/autotest/testcase/lsxcatd/cases0 b/xCAT-test/autotest/testcase/lsxcatd/cases0 index 59f0f5bfa..eb82fb0ff 100644 --- a/xCAT-test/autotest/testcase/lsxcatd/cases0 +++ b/xCAT-test/autotest/testcase/lsxcatd/cases0 @@ -1,13 +1,13 @@ start:lsxcatd_null description:lsxcatd without any flag -label:mn_only,xcatd +label:mn_only,ci_test,xcatd cmd:lsxcatd check:output=~lsxcatd end start:lsxcatd_h description:lsxcatd -h -label:mn_only,xcatd +label:mn_only,ci_test,xcatd cmd:lsxcatd -h check:rc==0 check:output=~lsxcatd @@ -15,7 +15,7 @@ end start:lsxcatd_d description:lsxcatd -d -label:mn_only,xcatd +label:mn_only,ci_test,xcatd cmd:lsxcatd -d check:rc==0 check:output=~(cfgloc|dbengine|dbinstance|dbname|dbloc) @@ -23,7 +23,7 @@ end start:lsxcatd_a description:lsxcatd -a -label:mn_only,xcatd +label:mn_only,ci_test,xcatd cmd:lsxcatd -a check:rc==0 check:output=~Version diff --git a/xCAT-test/autotest/testcase/makeconservercf/cases0 b/xCAT-test/autotest/testcase/makeconservercf/cases0 index 219778d81..26dde43f1 100644 --- a/xCAT-test/autotest/testcase/makeconservercf/cases0 +++ b/xCAT-test/autotest/testcase/makeconservercf/cases0 @@ -1,4 +1,5 @@ start:makeconservercf_null +label:ci_test cmd:chdef -t node -o testnodetmp cons=hmc groups=all cmd:makeconservercf testnodetmp check:rc==0 @@ -10,6 +11,7 @@ cmd:rmdef -t node testnodetmp end start:makeconservercf_noderange +label:ci_test cmd:chdef -t node -o testnodetmp cons=hmc groups=all cmd:makeconservercf testnodetmp check:rc==0 @@ -21,6 +23,7 @@ cmd:rmdef -t node testnodetmp end start:makeconservercf_d +label:ci_test cmd:chdef -t node -o testnodetmp cons=hmc groups=all cmd:makeconservercf testnodetmp check:rc==0 diff --git a/xCAT-test/autotest/testcase/makedhcp/cases0 b/xCAT-test/autotest/testcase/makedhcp/cases0 index 157ab8982..e4c1d685a 100644 --- a/xCAT-test/autotest/testcase/makedhcp/cases0 +++ b/xCAT-test/autotest/testcase/makedhcp/cases0 @@ -1,7 +1,7 @@ start:makedhcp_n description:Create a new dhcp configuration file with a network statement for each network the dhcp daemon should listen on os:Linux -label:mn_only,dhcp +label:mn_only,ci_test,dhcp cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi cmd:makedhcp -n check:rc==0 @@ -18,7 +18,7 @@ end start:makedhcp_h description:help -label:mn_only,dhcp +label:mn_only,ci_test,dhcp cmd:makedhcp -h check:rc==0 check:output=~Usage @@ -26,7 +26,7 @@ end start:makedhcp_help description:help -label:mn_only,dhcp +label:mn_only,ci_test,dhcp cmd:makedhcp -h check:rc==0 check:output=~Usage @@ -34,6 +34,7 @@ end start:makedhcp_n_linux description:Create a new dhcp configuration file with a network statement for each network the dhcp daemon should listen on +label:ci_test os:Linux cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi cmd:makedhcp -n diff --git a/xCAT-test/autotest/testcase/makedns/cases0 b/xCAT-test/autotest/testcase/makedns/cases0 index d2ef5f905..117e86d83 100644 --- a/xCAT-test/autotest/testcase/makedns/cases0 +++ b/xCAT-test/autotest/testcase/makedns/cases0 @@ -1,6 +1,6 @@ start:makedns_h description:help -label:mn_only,dns +label:mn_only,ci_test,dns cmd:makedns -h check:rc==0 cmd:makedns --help diff --git a/xCAT-test/autotest/testcase/makehosts/cases0 b/xCAT-test/autotest/testcase/makehosts/cases0 index c647af508..dab769d08 100644 --- a/xCAT-test/autotest/testcase/makehosts/cases0 +++ b/xCAT-test/autotest/testcase/makehosts/cases0 @@ -1,5 +1,5 @@ start:makehosts_h -label:mn_only,dns +label:mn_only,ci_test,dns description:makehosts -h cmd:makehosts -h check:rc==0 @@ -7,7 +7,7 @@ check:output=~Usage end start:makehosts_help -label:mn_only,dns +label:mn_only,ci_test,dns description:makehosts --help cmd:makehosts --help check:rc==0 @@ -16,7 +16,7 @@ end start:makehosts_null description:makehosts -label:mn_only,dns +label:mn_only,ci_test,dns cmd:cp -f /etc/hosts /etc/hosts.xcatbakautotest cmd:chtab node=nouse_compute hosts.ip="|node(\d+)|1.2.3.(\$1+0)|" hosts.hostnames="|(.*)|(\$1).cluster.net|" check:rc==0 @@ -88,7 +88,7 @@ cmd:rm -f /tmp/1 /tmp/2 end start:makehosts_n -label:mn_only,dns +label:mn_only,ci_test,dns cmd:cp -f /etc/hosts /etc/hosts.xcatbakautotest cmd:chtab node=nouse_compute hosts.ip="|node(\d+)|1.2.3.(\$1+0)|" hosts.hostnames="|(.*)|(\$1).cluster.net|" check:rc==0 @@ -113,7 +113,7 @@ cmd:rm -rf /tmp/hosts end start:makehosts_n_noderange -label:mn_only,dns +label:mn_only,ci_test,dns cmd:cp -f /etc/hosts /etc/hosts.xcatbakautotest cmd:chtab node=compute hosts.ip="|node(\d+)|1.2.3.(\$1+0)|" hosts.hostnames="|(.*)|(\$1).cluster.net|" check:rc==0 diff --git a/xCAT-test/autotest/testcase/makeknownhosts/cases0 b/xCAT-test/autotest/testcase/makeknownhosts/cases0 index 95442b651..f7f7e0646 100644 --- a/xCAT-test/autotest/testcase/makeknownhosts/cases0 +++ b/xCAT-test/autotest/testcase/makeknownhosts/cases0 @@ -1,4 +1,5 @@ start:makeknownhosts_h +label:ci_test cmd:makeknownhosts -h check:output=~Usage cmd:makeknownhosts --help diff --git a/xCAT-test/autotest/testcase/makenetworks/cases0 b/xCAT-test/autotest/testcase/makenetworks/cases0 index def304fe6..c43c55ed7 100644 --- a/xCAT-test/autotest/testcase/makenetworks/cases0 +++ b/xCAT-test/autotest/testcase/makenetworks/cases0 @@ -1,4 +1,5 @@ start:makenetworks_h +label:ci_test description:help cmd:makenetworks -h check:rc==0 @@ -6,6 +7,7 @@ check:output=~Usage end start:makenetworks_help +label:ci_test description:help cmd:makedhcp --help check:rc==0 @@ -13,6 +15,7 @@ check:output=~Usage end start:makenetworks_v +label:ci_test description:version cmd:makenetworks -v check:rc==0 @@ -35,6 +38,7 @@ end start:makenetworks_d_V description:display,verbose +label:ci_test cmd:makenetworks check:rc==0 cmd:makenetworks -d -V diff --git a/xCAT-test/autotest/testcase/mkdef/cases0 b/xCAT-test/autotest/testcase/mkdef/cases0 index 417075987..3b28be750 100644 --- a/xCAT-test/autotest/testcase/mkdef/cases0 +++ b/xCAT-test/autotest/testcase/mkdef/cases0 @@ -1,13 +1,13 @@ start:mkdef_null description:mkdef without any flag -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef check:output=~Usage end start:mkdef_node description:mkdef -t node -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode,testnode1 groups=all,aix check:rc==0 cmd:lsdef -i groups testnode @@ -21,7 +21,7 @@ end start:mkdef_f description:mkdef -f -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode groups=all,aix check:rc==0 cmd:mkdef -f -t node -o testnode nodetype=lpar,osi groups=all @@ -35,7 +35,7 @@ end start:mkdef_z description:mkdef -z -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o orignode mgt=fsp cons=hmc pprofile=orignode groups=lpar,all check:rc==0 cmd:lsdef -l orignode -z > /tmp/orignode.stanza @@ -55,7 +55,7 @@ end start:mkdef_group description: mkdef static node group -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode1-testnode2 mgt=hmc cons=hmc groups=all,systemp check:rc==0 cmd:mkdef -t node -o testnode3-testnode4 mgt=ipmi cons=ipmi groups=all,systemx @@ -94,7 +94,7 @@ end start:mkdef_dynamic_group description:mkdef with dynamic node group -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode1-testnode2 mgt=hmc cons=hmc groups=all,systemp check:rc==0 cmd:mkdef -t node -o testnode3-testnode4 mgt=ipmi cons=ipmi groups=all,systemx @@ -131,7 +131,7 @@ end start:mkdef_multiple_keys description:mkdef support for multiple keys in a table, such as ppcdirect -label:mn_only,db +label:mn_only,ci_test,db cmd: mkdef -t node -o testfsp mgt=fsp cons=fsp groups=all,fsp nodetype=fsp passwd.HMC=abc123 passwd.general=abc123 passwd.admin=abc123 check:rc==0 cmd:lsdef testfsp @@ -145,7 +145,7 @@ end start:mkdef_t_network description: mkdef -t network -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t network -o testnetwork net=1.2.3.0 mask=255.255.255.0 gateway=1.2.3.1 check:rc==0 cmd:lsdef -t network @@ -161,7 +161,7 @@ end start:mkdef_t_o_error description:mkdef -t wrongtype -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t wrongtype -o testnode groups=all,aix check:rc!=0 check:output=~not a valid @@ -170,7 +170,7 @@ end start:mkdef_template_switch_template_without_attribute description:create a node with swtich template without any attributes -label:mn_only,db +label:mn_only,ci_test,db cmd:result=`lsdef | grep auto_test_node_1`; if [[ $result =~ "auto_test_node_1" ]]; then echo $result; noderm auto_test_node_1; fi cmd:mkdef -t node -o auto_test_node_1 --template switch-template check:rc==0 @@ -193,7 +193,7 @@ end start:mkdef_template_cec_template_without_remainder description:create a node with cec template once -label:mn_only,db +label:mn_only,ci_test,db cmd:result=`lsdef | grep auto_test_cec_node_1`; if [[ $result =~ "auto_test_cec_node_1" ]]; then echo $result; noderm auto_test_cec_node_1; fi cmd:mkdef -t node -o auto_test_cec_node_1 --template cec-template serial=test mtm=test hcp=test check:rc==0 @@ -216,7 +216,7 @@ end start:mkdef_template_invalid_template description:create a node with invalid template -label:mn_only,db +label:mn_only,ci_test,db cmd:result=`lsdef | grep auto_test_node`; if [[ $result =~ "auto_test_node" ]]; then echo $result; noderm auto_test_node; fi cmd:result=`lsdef | grep auto_test_invalid_template`; if [[ $result =~ "auto_test_invalid_template" ]]; then echo $result; noderm auto_test_invalid_template; fi cmd:lsdef --template auto_test_invalid_template @@ -229,7 +229,7 @@ end start:mkdef_node_with_a_node_template description:create a node with a node template, using cec template to create node at beginning -label:mn_only,db +label:mn_only,ci_test,db cmd:result=`lsdef | grep auto_test_cec_node_1`; if [[ $result =~ "auto_test_cec_node_1" ]]; then echo $result; noderm auto_test_cec_node_1; fi cmd:result=`lsdef | grep auto_test_cec_node_2`; if [[ $result =~ "auto_test_cec_node_2" ]]; then echo $result; noderm auto_test_cec_node_2; fi cmd:mkdef -t node -o auto_test_cec_node_1 --template cec-template serial=test mtm=test hcp=test groups=test_template diff --git a/xCAT-test/autotest/testcase/mkdef/cases1 b/xCAT-test/autotest/testcase/mkdef/cases1 index 95cad5f8e..41c4b93c7 100644 --- a/xCAT-test/autotest/testcase/mkdef/cases1 +++ b/xCAT-test/autotest/testcase/mkdef/cases1 @@ -1,6 +1,6 @@ start:mkdef_github_issue2582 description:Verify github issue 2582 -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t group -o doubletrouble bmc='|\z|-imm|' mgt=ipmi check:rc==0 cmd:mkdef mgt02 groups=doubletrouble @@ -68,7 +68,7 @@ end start:mkdef_regex_nicsip description:Verify the GitHub issue #3047. -label:mn_only,db +label:mn_only,ci_test,db cmd:rmdef xcattest_tmp_node_sn[01-16] cmd:rmdef -t group -o xcattest_tmp_group_regex cmd:mkdef -t group -o xcattest_tmp_group_regex diff --git a/xCAT-test/autotest/testcase/nodeadd/cases0 b/xCAT-test/autotest/testcase/nodeadd/cases0 index f36dc6749..71743be59 100644 --- a/xCAT-test/autotest/testcase/nodeadd/cases0 +++ b/xCAT-test/autotest/testcase/nodeadd/cases0 @@ -1,12 +1,12 @@ start:nodeadd_null description:nodeadd without any flag -label:mn_only,db +label:mn_only,ci_test,db cmd:nodeadd check:output=~Usage end start:nodeadd_noderange -label:mn_only,db +label:mn_only,ci_test,db cmd:nodeadd testnode1-testnode2 groups="lpar,all" nodetype.nodetype="lpar,osi" check:rc==0 cmd:lsdef -i groups,nodetype testnode1 @@ -23,7 +23,7 @@ cmd:rmdef -t node -o testnode1-testnode2 end start:nodeadd_noderange_nodetype -label:mn_only,db +label:mn_only,ci_test,db cmd:nodeadd testnode1-testnode2 groups=all,rhel5 nodetype.os=rhel5 check:rc=0 cmd:lsdef -i groups,os testnode1 @@ -39,19 +39,19 @@ cmd:rmdef -t node -o testnode1-testnode2 end start:nodeadd_v -label:mn_only,db +label:mn_only,ci_test,db cmd:nodeadd -v check:output=~Version end start:nodeadd_h -label:mn_only,db +label:mn_only,ci_test,db cmd:nodeadd -h check:output=~Usage end start:nodeadd_err_symbol -label:mn_only,db +label:mn_only,ci_test,db cmd:nodeadd testnode magt=unknown check:rc!=0 check:output=~Error diff --git a/xCAT-test/autotest/testcase/nodech/cases0 b/xCAT-test/autotest/testcase/nodech/cases0 index 711b8bd99..10db2ffa9 100644 --- a/xCAT-test/autotest/testcase/nodech/cases0 +++ b/xCAT-test/autotest/testcase/nodech/cases0 @@ -1,6 +1,6 @@ start:nodech_noderange_table description:nodech testnode groups=all,rhels5.5 nodetype.os=rhels5.5 nodehm.mgt=hmc -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups=all,rhels5.4 check:rc==0 cmd:nodech testnode groups=all,rhels5.5 nodetype.os=rhels5.5 nodehm.mgt=hmc @@ -15,7 +15,7 @@ end start:nodech_noderange_table_comma description:nodech testnode groups,=rhels5.5.Check nodech command with ,=. -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups=all check:rc==0 cmd:nodech testnode groups,=rhels5.5 @@ -27,7 +27,7 @@ end start:nodech_noderange_table_arrow -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups=all,rhels5.5 check:rc==0 cmd:nodech testnode groups^=rhels5.5 @@ -40,7 +40,7 @@ end start:nodech_noderange_table_comma_arrow description:nodech testnode groups^=rhels5.5 groups,=rhels5.4 . Check nodech command with both ^= and ,=. -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups=all,rhels5.5 check:rc==0 cmd:nodech testnode groups^=rhels5.5 groups,=rhels5.4 @@ -52,7 +52,7 @@ end start:nodech_noderanage_table_at description:nodech testnode nodetype.os=@=helloworld.Check nodech command with =@=. -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode os=hello groups=all check:rc==0 cmd:nodech testnode nodetype.os=@=helloworld @@ -65,7 +65,7 @@ end start:nodech_noderange_table_include description:nodech groups=~rh4.123456789 groups=rhels5.5.The command nodech with =~. -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups=rh4.123456789 check:rc==0 cmd:nodech groups=~rh4.123456789 groups=rhels5.5 @@ -77,7 +77,7 @@ end start:nodech_noderange_table_uninclude description:nodech testnode1-testnode2 nodelist.groups\!~rhels5.5 nodelist.groups=rhels5.5,all.The command nodech with !~. -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode1 groups=rhels5.5,all check:rc==0 cmd:chdef -t node -o testnode2 groups=rhels5.4,all @@ -92,7 +92,7 @@ end start:nodech_noderange_table_equal description:nodech groups==rh4.123456789 groups=rhels5.5.The command nodech with ==. -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups=rh4.123456789 check:rc==0 cmd:nodech groups==rh4.123456789 groups=rhels5.5 @@ -105,7 +105,7 @@ end start:nodech_noderange_table_unequal description::nodech testnode1-testnode2 groups!=rhels5.5 groups=rhels5.5.The command nodech with !=. -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode1 groups=rhels5.5 check:rc==0 cmd:chdef -t node -o testnode2 groups=rhels5.4 @@ -119,7 +119,7 @@ end start:nodech_noderange_shortname_groups description:nodech testnode groups=rhels5.4.The nodech use shortname groups -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups=rhels5.5 check:rc==0 cmd:nodech testnode groups=rhels5.4 @@ -132,7 +132,7 @@ end start:nodech_noderange_shortname_tags description:nodech testnode tags=rhels5.4.The nodech use shortname tags -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups=rhels5.5 check:rc==0 cmd:nodech testnode tags=rhels5.4 @@ -145,7 +145,7 @@ end start:nodech_noderange_shortname_mgt description:nodech testnode mgt=hmc.The nodech use shortname mgt -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode mgt=blade groups=all check:rc==0 cmd:nodech testnode mgt=hmc @@ -157,7 +157,7 @@ end start:nodech_delete description:nodech -d -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode os=hello groups=all check:rc==0 cmd:nodech -d testnode nodetype @@ -169,7 +169,7 @@ end start:nodech_h description:nodech -h -label:mn_only,db +label:mn_only,ci_test,db cmd:nodech -h check:output=~Usage cmd:nodech -? @@ -180,7 +180,7 @@ end start:nodech_v description:nodech -v -label:mn_only,db +label:mn_only,ci_test,db cmd:nodech -v check:output=~Version end @@ -203,7 +203,7 @@ end start:nodech_error_node description: nodech error noderange,nodech testnode1 groups=all,rhels5.5 nodetype.os=rhels5.5 nodehm.mgt=hmc -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups=all,rhels5.4 check:rc==0 cmd:nodech testnode1 groups=all,rhels5.5 nodetype.os=rhels5.5 nodehm.mgt=hmc @@ -215,7 +215,7 @@ end start:nodech_error_table description: nodech error table. -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups=all,rhels5.4 check:rc==0 cmd:nodech testnode groups=all,rhels5.5 nodetypes.os=rhels5.5 nodehm.mgt=hmc diff --git a/xCAT-test/autotest/testcase/nodegrpch/cases0 b/xCAT-test/autotest/testcase/nodegrpch/cases0 index 448ba50ea..88527433b 100644 --- a/xCAT-test/autotest/testcase/nodegrpch/cases0 +++ b/xCAT-test/autotest/testcase/nodegrpch/cases0 @@ -1,6 +1,6 @@ start:nodegrpch_v description:nodegrpch -v and --version -label:mn_only,db +label:mn_only,ci_test,db cmd:nodegrpch -v check:output=~Version cmd:nodegrpch --version @@ -9,7 +9,7 @@ end start:nodegrpch_h description:nodegrpch -? and -h --help -label:mn_only,db +label:mn_only,ci_test,db cmd:nodegrpch -h check:output=~Usage cmd:nodegrpch -? @@ -21,7 +21,7 @@ end start:nodegrpch_groups description:nodegrpch rh4.1234567890 mgt=hmc -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups=rh4.1234567890 mgt=blade check:rc==0 cmd:nodegrpch rh4.1234567890 mgt=hmc @@ -35,7 +35,7 @@ end start:nodegrpch_err description: -label:mn_only,db +label:mn_only,ci_test,db cmd:nodegrpch -c check:rc!=0 check:output=~Usage diff --git a/xCAT-test/autotest/testcase/nodels/cases0 b/xCAT-test/autotest/testcase/nodels/cases0 index e81b30566..b0134bbae 100644 --- a/xCAT-test/autotest/testcase/nodels/cases0 +++ b/xCAT-test/autotest/testcase/nodels/cases0 @@ -1,6 +1,6 @@ start:nodels_null description:nodels | grep testnode -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups="all,aix" check:rc==0 cmd:nodels | grep testnode @@ -12,7 +12,7 @@ end start:nodels_noderange_shortname_groups description:The nodels use shortname groups -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups=rhels5.5 check:rc==0 cmd:nodels testnode groups @@ -24,7 +24,7 @@ end start:nodels_noderange_shortname_tags description:The nodels use shortname tags -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups=rhels5.5 check:rc==0 cmd:nodels testnode tags @@ -36,7 +36,7 @@ end start:nodels_noderange_shortname_mgt description:The nodels use shortname mgt -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode mgt=blade groups=all check:rc==0 cmd:nodels testnode mgt @@ -47,7 +47,7 @@ end start:nodels_table_include description:Check the command nodels with =~. -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups=rh4.123456789 check:rc==0 cmd:nodels groups=~rh4.123456789 @@ -59,7 +59,7 @@ end start:nodels_noderange_table_uninclude description:Check the command nodels with !~. -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode1 groups=rhels5.5,all check:rc==0 cmd:chdef -t node -o testnode2 groups=rhels5.4,all @@ -73,7 +73,7 @@ end start:nodels_noderange_table_equal description:Check the command nodels with ==. -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups=rh4.123456789 check:rc==0 cmd:nodels groups==rh4.123456789 @@ -85,7 +85,7 @@ end start:nodels_noderange_table_unequal description:Check the command nodels with !=. -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode1 groups=rhels5.5 check:rc==0 cmd:chdef -t node -o testnode2 groups=rhels5.4 @@ -98,7 +98,7 @@ end start:nodels_b description:nodels -b and nodels --blame -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups=rhels5.5 check:rc==0 cmd:nodels testnode -b groups @@ -112,7 +112,7 @@ end start:nodels_S description:nodels -S -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode hidden=1 groups=rhels5.5 check:rc==0 cmd:nodels -S @@ -124,7 +124,7 @@ end start:nodels_H description:nodels -H all groups mgt | grep testnode -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups="all,aix" mgt="hmc" check:rc==0 cmd:nodels -H all groups mgt | grep testnode @@ -136,7 +136,7 @@ end start:nodels_noderange description:nodels testnode -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups="all,aix" check:rc==0 cmd:nodels testnode @@ -148,7 +148,7 @@ end start:nodels_noderange_table description:nodels testnode nodelist -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups=all check:rc==0 cmd:nodels testnode nodelist @@ -160,7 +160,7 @@ end start:nodels_tablevalue description:nodels rh4.1234567890 -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups=rh4.1234567890 check:rc==0 cmd:nodels rh4.1234567890 @@ -172,7 +172,7 @@ end start:nodels_tablevalue_tablecolumn description:nodels rh4.1234567890 mgt -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode groups=rh4.1234567890 mgt=hmc check:rc==0 cmd:nodels rh4.1234567890 mgt @@ -193,7 +193,7 @@ end start:nodels_noderange_tablecolumn description:nodels testnode nodehm.mgt -label:mn_only,db +label:mn_only,ci_test,db cmd:chdef -t node -o testnode mgt=hmc groups=all check:rc==0 cmd:nodels testnode nodehm.mgt @@ -207,7 +207,7 @@ end start:nodels_h description:nodels -h and nodels -? and nodels --help -label:mn_only,db +label:mn_only,ci_test,db cmd:nodels -h check:output=~Usage cmd:nodels -? @@ -218,7 +218,7 @@ end start:nodels_v -label:mn_only,db +label:mn_only,ci_test,db cmd:nodels -v check:output=~Version cmd:nodels --version @@ -227,14 +227,14 @@ end start:nodels_err_symbol -label:mn_only,db +label:mn_only,ci_test,db cmd:nodels -H all unknown check:rc!=0 check:output=~Error end start:nodels_err_noderange -label:mn_only,db +label:mn_only,ci_test,db cmd:nodels douniwan check:rc!=0 check:output=~Error diff --git a/xCAT-test/autotest/testcase/noderange/cases0 b/xCAT-test/autotest/testcase/noderange/cases0 index 8a4d2e4cb..321f6d7c6 100644 --- a/xCAT-test/autotest/testcase/noderange/cases0 +++ b/xCAT-test/autotest/testcase/noderange/cases0 @@ -1,6 +1,6 @@ start:noderange_individual_node description: noderange individual node -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode01 -f groups=all cmd:nodels testnode01 check:rc==0 @@ -10,7 +10,7 @@ end start:noderange_individual_grp description: noderange individual group -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode01,testnode02 groups=nrtestgrp cmd:nodels nrtestgrp check:rc==0 @@ -22,7 +22,7 @@ end start:noderange_node01-node10 description: noderange node01-node10 -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o nrtestnode01-nrtestnode10 groups=all check:rc==0 cmd:nodels nrtestnode01-nrtestnode10 @@ -36,7 +36,7 @@ end start:noderange_node_01-10 description: noderange node[01-10] -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o nrtestnode[01-10] groups=all check:rc==0 cmd:nodels nrtestnode[01-10] @@ -50,7 +50,7 @@ end start:noderange_node01_10 description: noderange node[01:10] -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o nrtestnode[01:10] groups=all check:rc==0 cmd:nodels nrtestnode[01:10] @@ -64,7 +64,7 @@ end start:noderange_f1-f2_n1-n3 description: noderange f[1-2]n[1-3] -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o f[1-2]n[1-3] groups=all check:rc==0 cmd:nodels f[1-2]n[1-3] @@ -81,7 +81,7 @@ end start:noderange_group1-group3 description: noderange group1-group3 -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode01 groups=nrtestgrp1 cmd:mkdef -t node -o testnode02 groups=nrtestgrp2 cmd:mkdef -t node -o testnode03 groups=nrtestgrp3 @@ -96,7 +96,7 @@ end #start:noderange_node001-node200 #description: noderange node001-node200 -#label:mn_only,db +#label:mn_only,ci_test,db #cmd:mkdef -t node -o nrtestnode001-nrtestnode200 groups=all #check:rc==0 #cmd:nodels nrtestnode001-nrtestnode200 @@ -111,7 +111,7 @@ end start:noderange_node10_plus_3 description: noderange node10+3 -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o nrtestnode10+3 groups=all check:rc==0 cmd:nodels nrtestnode10+3 @@ -126,7 +126,7 @@ end start:noderange_10-20 description: noderange 10-20 -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o 10-20 groups=all check:rc==0 cmd:nodels 10-20 @@ -142,21 +142,21 @@ end start:noderange_XCAT_NODE_PREFIX description: noderange XCAT_NODE_PREFIX -label:mn_only,db +label:mn_only,ci_test,db cmd: XCAT_NODE_PREFIX=abc XCATBYPASS=1 nodels 10-20 check:output=~abc10,abc11,abc12,abc13,abc14,abc15,abc16,abc17,abc18,abc19,abc20 end start:noderange_XCAT_NODE_SUFFIX description: noderange XCAT_NODE_SUFFIX -label:mn_only,db +label:mn_only,ci_test,db cmd: XCAT_NODE_PREFIX=abc XCAT_NODE_SUFFIX=def XCATBYPASS=1 nodels 10-20 check:output=~abc10def,abc11def,abc12def,abc13def,abc14def,abc15def,abc16def,abc17def,abc18def,abc19def,abc20def end start:noderange_slash_urtestnode_dot_star description: noderange /nrtestnode.* -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o nrtestnode1-nrtestnode3 groups=all check:rc==0 cmd:nodels /nrtestnode.* @@ -170,7 +170,7 @@ end start:noderange_dir_tmp-nodelistfile description: noderange ^/tmp/nodelistfile -label:mn_only,db +label:mn_only,ci_test,db #cmd:echo #testnode1 > /tmp/nodelist cmd:mkdef -t node -o nrnode1,nrnode2 groups=all cmd:echo nrnode1 > /tmp/nodelist @@ -185,7 +185,7 @@ end start:noderange_exclusion description: noderange exnode1-exnode5,-exnode3,-exnode4 -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o exnode1-exnode5 groups=all check:rc==0 cmd:nodels exnode1-exnode5,-exnode3,-exnode4 @@ -201,7 +201,7 @@ end start:noderange_group_intersection description: noderange group1@group2 -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o nrtestnode1-nrtestnode3 groups=group1 check:rc==0 cmd:chdef -t node -o nrtestnode1 -p groups=group2 diff --git a/xCAT-test/autotest/testcase/noderm/cases0 b/xCAT-test/autotest/testcase/noderm/cases0 index 31e5f386e..7a26d564b 100644 --- a/xCAT-test/autotest/testcase/noderm/cases0 +++ b/xCAT-test/autotest/testcase/noderm/cases0 @@ -1,6 +1,6 @@ start:noderm_noderange description:noderm testnode1,testnode2 -label:mn_only,db +label:mn_only,ci_test,db cmd:nodeadd testnode1,testnode2 groups=all check:rc==0 cmd:lsdef -t node testnode1,testnode2 @@ -15,7 +15,7 @@ end start:noderm_h description:noderm -h -label:mn_only,db +label:mn_only,ci_test,db cmd:noderm -h check:output=~Usage cmd:noderm --help @@ -24,14 +24,14 @@ end start:noderm_null description:noderm -label:mn_only,db +label:mn_only,ci_test,db cmd:noderm check:output=~Usage end start:noderm_err_node description:noderm err -label:mn_only,db +label:mn_only,ci_test,db cmd:rmdef -t node testnode cmd:noderm testnode check:rc!=0 diff --git a/xCAT-test/autotest/testcase/nodestat/cases0 b/xCAT-test/autotest/testcase/nodestat/cases0 index 3d8b3c84d..0444b9edb 100644 --- a/xCAT-test/autotest/testcase/nodestat/cases0 +++ b/xCAT-test/autotest/testcase/nodestat/cases0 @@ -6,6 +6,7 @@ check:output=~noping|sshd|install|snmp|pbs end start:nodestat_err_node +label:ci_test cmd:nodestat testnode check:rc!=0 check:output=~Error diff --git a/xCAT-test/autotest/testcase/restorexCATdb/cases0 b/xCAT-test/autotest/testcase/restorexCATdb/cases0 index f2cc5c43f..980712d2f 100644 --- a/xCAT-test/autotest/testcase/restorexCATdb/cases0 +++ b/xCAT-test/autotest/testcase/restorexCATdb/cases0 @@ -1,12 +1,12 @@ start:restorexCAT_h -label:mn_only,db +label:mn_only,ci_test,db cmd:restorexCATdb -h check:rc==0 check:output=~restorexCATdb end start:restorexCATdb_v -label:mn_only,db +label:mn_only,ci_test,db cmd:restorexCATdb -v check:rc==0 check:output=~Version @@ -14,7 +14,7 @@ end start:restorexcatdb_p description:restore the xcat database from the /tmp/db -label:mn_only,db +label:mn_only,ci_test,db cmd:chtab key=skiptables site.value="" check:rc==0 cmd:dumpxCATdb -p /tmp/db1 @@ -36,7 +36,7 @@ cmd:rm -rf /tmp/db1 /tmp/db2 /tmp/db.1 /tmp/db.2 end start:restorexCATdb_p_V -label:mn_only,db +label:mn_only,ci_test,db cmd:chtab key=skiptables site.value="" check:rc==0 cmd:dumpxCATdb -a -p /tmp/db @@ -51,7 +51,7 @@ cmd:rm -rf /tmp/db end start:restorexCATdb_a_p_V -label:mn_only,db +label:mn_only,ci_test,db cmd:chtab key=skiptables site.value="" check:rc==0 cmd:dumpxCATdb -a -p /tmp/db @@ -65,7 +65,7 @@ cmd:rm -rf /tmp/db end start:restorexCATdb_wrongpath -label:mn_only,db +label:mn_only,ci_test,db cmd:restorexCATdb -p /tmp/testpath check:rc!=0 end diff --git a/xCAT-test/autotest/testcase/rmdef/cases0 b/xCAT-test/autotest/testcase/rmdef/cases0 index 57c1c074c..84c928cfc 100644 --- a/xCAT-test/autotest/testcase/rmdef/cases0 +++ b/xCAT-test/autotest/testcase/rmdef/cases0 @@ -1,13 +1,13 @@ start:rmdef_null description:rmdef without any flag -label:mn_only,db +label:mn_only,ci_test,db cmd:rmdef check:output=~Usage end start:rmdef_t_o_node description:rmdef -t node -o -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode,testnode1 groups=all,aix check:rc==0 cmd:lsdef -t node testnode,testnode1 @@ -22,7 +22,7 @@ end start:rmdef_t_node description:rmdef -t node -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode,testnode1 groups=all,aix check:rc==0 cmd:lsdef -t node testnode,testnode1 @@ -37,7 +37,7 @@ end start:rmdef_node description:rmdef nodename -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode,testnode1 groups=all,aix check:rc==0 cmd:lsdef -t node testnode,testnode1 @@ -52,7 +52,7 @@ end start:rmdef_t_o_network description:rmdef -t network -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t network -o testnet net=1.2.3.0 mask=255.0.0.0 gateway=1.2.3.1 check:rc==0 cmd:lsdef -t network @@ -65,7 +65,7 @@ end start:rmdef_group description:rmdef to remove static node group -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode1-testnode2 mgt=hmc cons=hmc groups=all,systemp check:rc==0 cmd:mkdef -t group -o testgrp members=testnode1,testnode2 @@ -87,7 +87,7 @@ end start:rmdef_dynamic_group description:rmdef to remove dynamic node group -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode1-testnode2 mgt=hmc cons=hmc groups=all,systemp check:rc==0 cmd:mkdef -t group -o dyngrp -d -w mgt==hmc -w cons==hmc -w groups==all,systemp @@ -131,7 +131,7 @@ end start:rmdef_t_err description:rmdef -t wrongtype -label:mn_only,db +label:mn_only,ci_test,db cmd:rmdef -t wrongtype -o testnode check:rc!=0 check:output=~not a valid @@ -139,7 +139,7 @@ end start:rmdef_template description:try to delete a template, then error messages appear -label:mn_only,db +label:mn_only,ci_test,db cmd:result=`lsdef | grep switch-template`; if [[ $result =~ "switch-template" ]]; then echo $result; noderm switch-template; fi cmd:rmdef switch-template check:rc==1 diff --git a/xCAT-test/autotest/testcase/tabdump/cases0 b/xCAT-test/autotest/testcase/tabdump/cases0 index 0652fe1bf..a1f1a1127 100644 --- a/xCAT-test/autotest/testcase/tabdump/cases0 +++ b/xCAT-test/autotest/testcase/tabdump/cases0 @@ -1,13 +1,13 @@ start:tabdump_null description:display table list -label:mn_only,db +label:mn_only,ci_test,db cmd:tabdump check:rc==0 check:output=~site end start:tabdump_table -label:mn_only,db +label:mn_only,ci_test,db cmd:tabdump site | grep xcatiport check:rc==0 check:output=="xcatiport","3002",, @@ -15,7 +15,7 @@ end start:tabdump_v description:version -label:mn_only,db +label:mn_only,ci_test,db cmd:tabdump -v check:rc==0 check:output=~Version @@ -23,7 +23,7 @@ end start:tabdump_h description:usage -label:mn_only,db +label:mn_only,ci_test,db cmd:tabdump -h check:rc==0 check:output=~Usage @@ -31,7 +31,7 @@ end start:tabdump_help description:usage -label:mn_only,db +label:mn_only,ci_test,db cmd:tabdump -? check:rc==0 check:output=~Usage @@ -41,7 +41,7 @@ end start:tabdump_w_match description:-w flags to specify the selection string,Select nodes where the attribute value matches the SQL LIKE value. -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode01 groups="all,aix" check:rc==0 cmd:mkdef -t node -o testnode02 groups="aix" @@ -56,7 +56,7 @@ end start:tabdump_w_equal description:-w flags to specify the selection string,Select nodes where the attribute value is exactly this value -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode01 groups="all,aix" check:rc==0 cmd:mkdef -t node -o testnode02 groups="aix" @@ -70,7 +70,7 @@ cmd:rmdef testnode02 end start:tabdump_w_ne -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode01,testnode02,testnode03 groups="aix" check:rc==0 cmd:mkdef -t node -o testnode04 groups="linux" @@ -88,7 +88,7 @@ cmd:rmdef testnode04 end start:tabdump_w_notmatch -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode01 groups="all" check:rc==0 cmd:mkdef -t node -o testnode02 groups="aix" @@ -103,7 +103,7 @@ end start:tabdump_w_gt description:Select nodes where the attribute value is greater than this specific value -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode01 groups="aix" statustime=2011-04-19 check:rc==0 cmd:mkdef -t node -o testnode02 groups="aix" statustime=2011-04-18 @@ -116,7 +116,7 @@ end start:tabdump_w_ge description:Select nodes where the attribute value is greater than this specific value -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode01 groups="aix" statustime=2011-04-19 check:rc==0 cmd:mkdef -t node -o testnode02 groups="aix" statustime=2011-04-18 @@ -130,7 +130,7 @@ end start:tabdump_w_lt description:Select nodes where the attribute value is greater than this specific value -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode01 groups="aix" statustime=2011-04-19 check:rc==0 cmd:mkdef -t node -o testnode02 groups="aix" statustime=2011-04-18 @@ -143,7 +143,7 @@ end start:tabdump_w_le description:Select nodes where the attribute value is greater than this specific value -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node -o testnode01 groups="aix" statustime=2011-04-19 check:rc==0 cmd:mkdef -t node -o testnode02 groups="aix" statustime=2011-04-18 @@ -157,14 +157,14 @@ end start:tabdump_d -label:mn_only,db +label:mn_only,ci_test,db cmd:tabdump -d |grep site check:rc==0 check:output=~site: end start:tabdump_f_d -label:mn_only,db +label:mn_only,ci_test,db cmd:tabdump -f /tmp/table -d site|grep site check:rc==0 check:output=~site @@ -172,7 +172,7 @@ cmd:rm -f /tmp/table end start:tabdump_d_nodehm -label:mn_only,db +label:mn_only,ci_test,db cmd:tabdump -d site | grep xcatiport check:rc==0 check:output=~xcatiport diff --git a/xCAT-test/autotest/testcase/tabgrep/cases0 b/xCAT-test/autotest/testcase/tabgrep/cases0 index e9fbac170..282cdaf49 100644 --- a/xCAT-test/autotest/testcase/tabgrep/cases0 +++ b/xCAT-test/autotest/testcase/tabgrep/cases0 @@ -1,6 +1,6 @@ start:tabgrep_null description: tabgrep with no argument -label:mn_only,db +label:mn_only,ci_test,db cmd:tabgrep check:output=~Usage end @@ -9,7 +9,7 @@ end start:tabgrep_h description:tabgrep -h an d -? and --help -label:mn_only,db +label:mn_only,ci_test,db cmd:tabgrep -h check:output=~Usage cmd:tabgrep -? @@ -20,7 +20,7 @@ end start:tabgrep_node -label:mn_only,db +label:mn_only,ci_test,db cmd:mkdef -t node testnode groups=all check:rc==0 cmd:tabgrep testnode @@ -32,7 +32,7 @@ end start:tabgrep_err description:tabgrep with error noderange -label:mn_only,db +label:mn_only,ci_test,db cmd:rmdef -t node testnode cmd:tabgrep testnode check:rc!=0 diff --git a/xCAT-test/autotest/testcase/tabprune/cases0 b/xCAT-test/autotest/testcase/tabprune/cases0 index f17f21ad4..d5c8e25a0 100644 --- a/xCAT-test/autotest/testcase/tabprune/cases0 +++ b/xCAT-test/autotest/testcase/tabprune/cases0 @@ -1,6 +1,6 @@ start:tabprune_h description:tabprune -h -label:mn_only,db +label:mn_only,ci_test,db cmd:tabprune -h check:rc==0 check:output=~Usage @@ -8,7 +8,7 @@ end start:tabprune_v description:tabprune -v -label:mn_only,db +label:mn_only,ci_test,db cmd:tabprune -v check:rc==0 check:output=~Version @@ -16,7 +16,7 @@ end start:tabprune_a_eventlog description:tabprune eventlog -a -label:mn_only,db +label:mn_only,ci_test,db cmd:tabprune eventlog -a check:rc==0 check:output!~not a valid xCAT object type @@ -24,7 +24,7 @@ end start:tabprune_V_a_eventlog description:tabprune eventlog -V -a > /tmp/eventlog.csv -label:mn_only,db +label:mn_only,ci_test,db cmd:tabprune eventlog -V -a > /tmp/eventlog.csv check:rc==0 cmd:ls /tmp/eventlog.csv @@ -35,7 +35,7 @@ end start:tabprune_p_auditlog description:to remove 50% of the auditlog table,if the original number is odd number,the final result is 1;or else the final number is 0; -label:mn_only,db +label:mn_only,ci_test,db #cmd:n1=`lsdef -t auditlog|wc -l`;tabprune auditlog -p 50;n2=`lsdef -t auditlog|wc -l`;echo $((n1-($n2-2)*2)) cmd:n1=`lsdef -t auditlog|wc -l`;tabprune auditlog -p 50;n2=`lsdef -t auditlog|wc -l`;echo $($n2 /tmp/site.csv check:rc==0 cmd:chtab key=db2installloc site.value=/test @@ -22,14 +22,14 @@ cmd:rm -f /tmp/site.csv /tmp/site1.csv end start:tabrestore_h -label:mn_only,db +label:mn_only,ci_test,db cmd:tabrestore -h check:output=~Usage end start:tabrestore_err description:tabrestore wrong.csv -label:mn_only,db +label:mn_only,ci_test,db cmd:tabrestore wrong.csv check:rc!=0 check:output=~Error diff --git a/xCAT-test/autotest/testcase/xcatd/case0 b/xCAT-test/autotest/testcase/xcatd/case0 index 046073d51..3720bc169 100644 --- a/xCAT-test/autotest/testcase/xcatd/case0 +++ b/xCAT-test/autotest/testcase/xcatd/case0 @@ -1,6 +1,6 @@ start:xcatd_start description:stop then start xcatd daemon, and check all the 6 processes are running -label:mn_only,xcatd +label:mn_only,ci_test,xcatd cmd:if [ -d "/tmp/xcatd_start" ]; then mv /tmp/xcatd_start /tmp/xcatd_start.org; fi; mkdir -p /tmp/xcatd_start check:rc==0 cmd:service xcatd status @@ -48,7 +48,7 @@ end start:xcatd_stop description:stop xcatd daemon, then check all the 6 processes are stopped -label:mn_only,xcatd +label:mn_only,ci_test,xcatd cmd:service xcatd status check:rc==0 check:output=~xcatd service|xcatd.service @@ -94,7 +94,7 @@ end start:run_command_with_XCATBYPASS description:with XCATBYPASS=YES, the command works either xcatd deamon running or not -label:mn_only,xcatd +label:mn_only,ci_test,xcatd cmd:service xcatd status check:rc==0 check:output=~xcatd service|xcatd.service @@ -121,7 +121,7 @@ end start:disable_root_permission_in_policy_table description:disable root permission, only with XCATBYPASS=YES, the command works -label:mn_only,xcatd +label:mn_only,ci_test,xcatd cmd:service xcatd status check:rc==0 check:output=~ xcatd service|xcatd.service @@ -141,7 +141,7 @@ end start:assign_certain_command_permission description:assign root permission to certain command, only this command works -label:mn_only,xcatd +label:mn_only,ci_test,xcatd cmd:service xcatd status check:rc==0 check:output=~ xcatd service |xcatd.service diff --git a/xCAT-test/autotest/testcase/xcatsnap/cases0 b/xCAT-test/autotest/testcase/xcatsnap/cases0 index 52607b868..f2cd9171d 100644 --- a/xCAT-test/autotest/testcase/xcatsnap/cases0 +++ b/xCAT-test/autotest/testcase/xcatsnap/cases0 @@ -1,6 +1,6 @@ start:xcatsnap_null description:xcatsnap with no argument -label:mn_only +label:mn_only,ci_test cmd:xcatsnap check:rc==0 check:output=~Send .* to IBM Support @@ -9,7 +9,7 @@ end start:xcatsnap_b_d description:xcatsnap -B -d -label:mn_only +label:mn_only,ci_test cmd:xcatsnap -B -d /tmp/testdir check:rc==0 check:output=~Send .* to IBM Support @@ -20,7 +20,7 @@ end start:xcatsnap_h description:xcatsnap -h and --help -label:mn_only +label:mn_only,ci_test cmd:xcatsnap -h check:output=~Usage cmd:xcatsnap --help diff --git a/xCAT-test/autotest/testcase/xcatstanzafile/cases0 b/xCAT-test/autotest/testcase/xcatstanzafile/cases0 index 2a6c7167d..6ccab47a2 100644 --- a/xCAT-test/autotest/testcase/xcatstanzafile/cases0 +++ b/xCAT-test/autotest/testcase/xcatstanzafile/cases0 @@ -22,7 +22,7 @@ end start:xcatstanzafile_colon description:xcatstanzafile's header without colon -label:mn_only,db +label:mn_only,ci_test,db cmd:echo 'default-node: groups=all,compute testnode @@ -41,7 +41,7 @@ end start:xcatstanzafile_attribute description:xcatstanzafile with error attribute line -label:mn_only,db +label:mn_only,ci_test,db cmd:echo 'default-node: groups=all,compute testnode: @@ -82,7 +82,7 @@ end start:xcatstanzafile_objtype description:xcatstanzafile,a stanza without objtype definition -label:mn_only,db +label:mn_only,ci_test,db cmd:echo 'default-node: groups=all,compute testnode: @@ -98,7 +98,7 @@ end #start:xcatstanzafile_comment #description:xcatstanzafile,a stanza without objtype definition -#label:mn_only,db +#label:mn_only,ci_test,db #cmd:echo 'default-node: # groups=all,compute #testnode: @@ -171,7 +171,7 @@ end start:xcatstanzafile_specificvalue description:When a specific value for an attribute is provided in the stanza, it takes priority over any default value that had been set. -label:mn_only,db +label:mn_only,ci_test,db cmd:echo 'default-node: groups=all,compute testnode: From 78a32bad301e9e15b48d8866249c2a110a3ca04e Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Mon, 29 Oct 2018 15:42:56 +0800 Subject: [PATCH 022/121] Fix github issue #5740 - Avoid remove symbolic link as directory --- xCAT-genesis-builder/xCAT-genesis-base.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/xCAT-genesis-builder/xCAT-genesis-base.spec b/xCAT-genesis-builder/xCAT-genesis-base.spec index 76bd5644b..cc77653c4 100644 --- a/xCAT-genesis-builder/xCAT-genesis-base.spec +++ b/xCAT-genesis-builder/xCAT-genesis-base.spec @@ -112,11 +112,16 @@ local function remove_directory_deep(directory) -- print(directory) - num_dirs, num_files = remove_directory(directory, 0, '') + local info = assert(posix.stat(directory)) + if info.type == 'directory' then + num_dirs, num_files = remove_directory(directory, 0, '') - -- printf('\ndropped %d directories, %d files\n', num_dirs, num_files) + -- printf('\ndropped %d directories, %d files\n', num_dirs, num_files) - posix.rmdir(directory) + posix.rmdir(directory) + else + posix.unlink(directory) + end end remove_directory_deep("/opt/xcat/share/xcat/netboot/genesis/%{tarch}/fs/bin") From cda300faa74be551c95964bd09a3405e30a0fef7 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Mon, 29 Oct 2018 15:44:35 +0800 Subject: [PATCH 023/121] Fix indents --- xCAT-genesis-builder/xCAT-genesis-base.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xCAT-genesis-builder/xCAT-genesis-base.spec b/xCAT-genesis-builder/xCAT-genesis-base.spec index cc77653c4..aa9f5bc4e 100644 --- a/xCAT-genesis-builder/xCAT-genesis-base.spec +++ b/xCAT-genesis-builder/xCAT-genesis-base.spec @@ -89,7 +89,7 @@ local function remove_directory(directory, level, prefix) posix.unlink(full_name) end - -- printf('%s%s%s%s\n', prefix, prefix2, name, link) + -- printf('%s%s%s%s\n', prefix, prefix2, name, link) if info.type == 'directory' then local indent = is_tail and tail_leaf_indent or leaf_indent @@ -132,13 +132,13 @@ remove_directory_deep("/opt/xcat/share/xcat/netboot/genesis/%{tarch}/fs/var/run" %post if [ "$1" == "2" ]; then #only on upgrade, as on install it's probably not going to work... - if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image - . /etc/profile.d/xcat.sh - #mknb %{tarch} + if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image + . /etc/profile.d/xcat.sh + #mknb %{tarch} echo "If you are installing/updating xCAT-genesis-base separately, not as part of installing/updating all of xCAT, run 'mknb ' manually" mkdir -p /etc/xcat touch /etc/xcat/genesis-base-updated - fi + fi fi %Files From fe33d7d98f2aa9b8c37f2b12d0fa5c44d8edca95 Mon Sep 17 00:00:00 2001 From: cxhong Date: Mon, 29 Oct 2018 05:12:20 -0400 Subject: [PATCH 024/121] Log Number of Nodes for xCAT command to command.log (#5729) * Log Number of Nodes for chdef/mkdef/rmdef/lsdef/nodels command to command.log * Create a new tag for reponse object --- xCAT-server/lib/xcat/plugins/DBobjectdefs.pm | 4 ++++ xCAT-server/lib/xcat/plugins/tabutils.pm | 9 ++++++++- xCAT-server/sbin/xcatd | 13 +++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm index 748d07792..91e4a49e9 100755 --- a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm +++ b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm @@ -2080,6 +2080,7 @@ sub defmk $rsp->{data}->[0] = "$nodenum object definitions have been created or modified."; if ($nodenum > 0) { # Some objects were created, report as success + $rsp->{numofnodes}->[0] = $nodenum; xCAT::MsgUtils->message("I", $rsp, $::callback); } else { @@ -2962,6 +2963,7 @@ sub defch if ($nodenum) { $rsp->{data}->[0] = "$nodenum object definitions have been created or modified."; + $rsp->{numofnodes}->[0] = $nodenum; } else { $rsp->{data}->[0] = "No object definitions have been created or modified."; } @@ -4155,6 +4157,7 @@ sub defls # Display the definition of objects if (defined($rsp_info->{data}) && scalar(@{ $rsp_info->{data} }) > 0) { + $rsp_info->{numofnodes}->[0] = $numobjects; xCAT::MsgUtils->message("I", $rsp_info, $::callback); } @@ -4522,6 +4525,7 @@ sub defrm my $rsp; my $nodenum = scalar(keys %objhash); $rsp->{data}->[0] = "$nodenum object definitions have been removed."; + $rsp->{numofnodes}->[0] = $nodenum; xCAT::MsgUtils->message("I", $rsp, $::callback); } diff --git a/xCAT-server/lib/xcat/plugins/tabutils.pm b/xCAT-server/lib/xcat/plugins/tabutils.pm index 2bc3a5c14..0d428a5d9 100644 --- a/xCAT-server/lib/xcat/plugins/tabutils.pm +++ b/xCAT-server/lib/xcat/plugins/tabutils.pm @@ -1882,6 +1882,8 @@ sub nodels my $VERSION; my $HELP; + my $nodenum; + my $nodels_usage = sub { my $exitcode = shift @_; @@ -2154,6 +2156,7 @@ sub nodels } } $callback->($rsp); + $nodenum = scalar (@$nodes); } else { @@ -2205,8 +2208,12 @@ sub nodels #} } + $nodenum = scalar (@nodes); } } + my $rsp_info; + $rsp_info->{numofnodes}->[0] = $nodenum; + $callback->($rsp_info); return 0; } @@ -2328,7 +2335,7 @@ sub tabch { { my $tab = xCAT::Table->new($_, -create => 1, -autocommit => 0); unless ($tab) { - my %rsp; + my %rsp; $rsp{data}->[0] = "Table $_ does not exist."; $rsp{errorcode}->[0] = 1; $callback->(\%rsp); diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index b9729d12c..5ecc294de 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -30,6 +30,8 @@ my $udpctl; my $pid_UDP; my $pid_MON; +my $numofnodes=0; + # ----used for command log start--------- my $cmdlog_svrpid; @@ -2165,6 +2167,7 @@ sub plugin_command { } } } + } my $dispatch_parentfd; @@ -2661,6 +2664,9 @@ sub send_response { if ( (ref($rsp) eq 'ARRAY') && scalar(@$rsp) > 0 ) { foreach (@$rsp) { $_->{xcatdsource}->[0] = $MYXCATSERVER unless ($_->{xcatdsource}); + if ($_->{numofnodes}) { + $numofnodes = $_->{numofnodes}->[0]; + } } } } @@ -2803,6 +2809,12 @@ sub service_connection { if ($enable_perf) { xCAT::MsgUtils->perf_log_process('immediate', $req); } + + if (exists($req->{noderange}) && defined($req->{noderange}->[0])) { + my @nnodes = xCAT::NodeRange::noderange($req->{noderange}->[0]); + $numofnodes = (scalar(@nnodes)); + } + # ----used for command log start---------- $cmdlog_starttime = time(); my ($sec, $min, $hour, $mday, $mon, $year) = localtime($cmdlog_starttime); @@ -3018,6 +3030,7 @@ sub service_connection { } # ----used for command log start------- + $cmdlog_alllog .= "[NumberNodes] $numofnodes \n"; my $reqhandletime = sprintf("%.3f", time()-$cmdlog_starttime); $cmdlog_alllog .= "[ElapsedTime] $reqhandletime s\n"; cmdlog_submitlog(); From e7176d7093ae9e5d69fdae3539d731b446e133e3 Mon Sep 17 00:00:00 2001 From: Yuan Bai Date: Tue, 30 Oct 2018 16:57:39 +0800 Subject: [PATCH 025/121] log tag support for common scripts (#5743) * log tag support for common scripts * enhancements * typo fixed --- .../share/xcat/install/scripts/post.xcat | 3 +- xCAT/postscripts/configeth | 32 ++--- xCAT/postscripts/nicutils.sh | 9 +- xCAT/postscripts/ospkgs | 52 ++++---- xCAT/postscripts/otherpkgs | 56 ++++---- xCAT/postscripts/remoteshell | 123 +++++++++--------- xCAT/postscripts/syncfiles | 20 ++- xCAT/postscripts/syslog | 12 +- xCAT/postscripts/xcatdsklspost | 2 +- xCAT/postscripts/xcatpostinit1.netboot | 18 ++- xCAT/postscripts/xcatpostinit1.service | 1 + 11 files changed, 179 insertions(+), 149 deletions(-) diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index 0abaf48c5..fe4442c05 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -198,6 +198,7 @@ run_ps () { scriptype=\"postscript\" fi log_label=\"xcat.deployment.\"\$scriptype + export LOGLABEL=\$log_label if [ -f \$1 ]; then msgutil_r \"\$MASTER_IP\" \"info\" "\"\$scriptype start..: \$1\"" \"\$logfile\" \"\$log_label\" if [ \"\$XCATDEBUGMODE\" = \"1\" ] || [ \"\$XCATDEBUGMODE\" = \"2\" ]; then @@ -207,7 +208,7 @@ run_ps () { bash -x ./\$@ 2>&1 ret_local=\$? else - ./\$@ 2>&1 | logger -t xcat -p debug + ./\$@ 2>&1 | logger -t \$log_label -p debug ret_local=\${PIPESTATUS[0]} fi else diff --git a/xCAT/postscripts/configeth b/xCAT/postscripts/configeth index c56996770..0dfe77213 100755 --- a/xCAT/postscripts/configeth +++ b/xCAT/postscripts/configeth @@ -9,6 +9,11 @@ if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then . $str_dir_name/nicutils.sh fi error_code=0 +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi ######################################################################### # ifdown/ifup will not be executed in diskful provision postscripts stage ######################################################################### @@ -367,16 +372,13 @@ else fi -logger -t xcat -p local4.err "configeth: os type: $str_os_type" log_info "configeth on $NODE: os type: $str_os_type" if [ "$1" = "-r" ];then if [ $# -ne 2 ];then - logger -t xcat -p local4.err "configeth: remove nic, but the nic name is missed" log_error "configeth on $NODE: remove nic, but the nic name is missed" exit 1 fi str_nic_name=$2 - logger -t xcat -p local4.err "configeth: remove nic $str_nic_name" log_info "configeth on $NODE: remove nic $str_nic_name" if [ "$str_os_type" = "aix" ];then @@ -405,7 +407,6 @@ if [ "$1" = "-r" ];then chdev -l $str_nic_name -a delalias6=$str_ip_alias6 fi done - logger -t xcat -p local4.err "configeth run command: chdev -l $str_nic_name -a netaddr='' -a netmask='' -a netaddr6='' -a prefixlen='' -a state=down" log_info "configeth on $NODE run command: chdev -l $str_nic_name -a netaddr='' -a netmask='' -a netaddr6='' -a prefixlen='' -a state=down" chdev -l $str_nic_name -a netaddr='' -a netmask='' -a netaddr6='' -a prefixlen='' -a state=down else @@ -425,7 +426,6 @@ if [ "$1" = "-r" ];then exit $error_code elif [ "$1" = "-s" ];then if [ $# -lt 2 ];then - logger -t xcat -p local4.err "configeth: config install nic, but the nic name is missed" log_error "configeth on $NODE: config install nic, but the nic name is missed" exit 1 fi @@ -435,7 +435,6 @@ elif [ "$1" = "-s" ];then str_inst_gateway='' str_inst_mtu='' if [ "$str_os_type" = "aix" ];then - logger -t xcat -p local4.err "configeth: aix does not support -s flag" log_error "configeth on $NODE: aix does not support -s flag" exit 1 elif [ -f "/etc/debian_version" ];then @@ -517,7 +516,6 @@ elif [ "$1" = "-s" ];then str_inst_mac=`ip link show $netdev | grep ether | awk '{print $2}'` fi if [ -z "$str_inst_ip" -o -z "$str_inst_mask" ];then - logger -t xcat -p local4.err "configeth: config install nic, can not find the information from lease file, return." log_info "configeth on $NODE: config install nic, can not find information from dhcp lease file, return." exit 1 fi @@ -673,7 +671,6 @@ fi #5. no modification, return directly #3. on linux modify the configuration files if [ $# -ne 3 ];then - logger -t xcat -p local4.err "configeth: paramters error currently is $@" log_error "configeth on $NODE: paramters error currently is $@" exit 1 fi @@ -690,7 +687,7 @@ else str_temp=`ip addr show dev $str_nic_name` fi -logger -t xcat -p local4.err "configeth: old configuration: $str_temp" +logger -t $log_label -p local4.err "configeth: old configuration: $str_temp" echo "configeth on $NODE: old configuration: $str_temp" @@ -731,7 +728,6 @@ while [ $num_index -le $NETWORKS_LINES ];do num_index=$((num_index+1)) done -logger -t xcat -p local4.err "configeth: new configuration" log_info "configeth on $NODE: new configuration" num_index=0 str_ipv6_gateway='' @@ -740,7 +736,6 @@ while [ $num_index -lt ${#array_nic_ips[*]} ];do str_ip=${array_nic_ips[$num_index]} str_netname=${array_nic_networks[$num_index]} if [ ! $str_netname ];then - logger -t xcat -p local4.err "configeth: Network name is not defined on $str_nic_name for $str_ip." log_error "configeth on $NODE: Network name is not defined on $str_nic_name for $str_ip." error_code=1 num_index=$((num_index+1)) @@ -750,7 +745,6 @@ while [ $num_index -lt ${#array_nic_ips[*]} ];do #find out the network definition str_line=${array_nic_network_config[$num_index]} if [ ! $str_line ];then - logger -t xcat -p local4.err "configeth: Network object $str_netname is not defined." log_error "configeth on $NODE: Network object $str_netname is not defined." error_code=1 num_index=$((num_index+1)) @@ -764,7 +758,6 @@ while [ $num_index -lt ${#array_nic_ips[*]} ];do str_mtu=`echo $str_line | awk -F'mtu=' '{print $2}' | awk -F'|' '{print $1}'` if [ ! $str_subnet -o ! $str_netmask ];then - logger -t xcat -p local4.err "configeth: subnet or netmask is not defined in network object $str_netname." log_error "configeth on $NODE: subnet or netmask is not defined in network object $str_netname." error_code=1 num_index=$((num_index+1)) @@ -779,7 +772,7 @@ while [ $num_index -lt ${#array_nic_ips[*]} ];do if [ $? -eq 0 ];then str_ipv6_gateway=$str_gateway fi - logger -t xcat -p local4.err "configeth: $str_ip, $str_subnet, $str_netmask, $str_gateway" + logger -t $log_label -p local4.info "configeth: $str_ip, $str_subnet, $str_netmask, $str_gateway" echo " $str_ip, $str_subnet, $str_netmask, $str_gateway" #on linux, call sub rutine to define ipv4 or ipv6 address for the persitent configuration if [ `echo $str_ip | grep -E '^([0-9]{1,3}\.){3}[0-9]{1,3}$'` ];then @@ -796,7 +789,6 @@ while [ $num_index -lt ${#array_nic_ips[*]} ];do hashset hash_new_config "${str_ip}_${str_netmask}" "new" str_ip_mask_pair=$str_ip_mask_pair"${str_ip}_${str_netmask} " else - logger -t xcat -p local4.err "configeth: the ipaddress( $str_ip ) for $str_nic_name is invalid." log_error "configeth on $NODE: the ipaddress( $str_ip ) for $str_nic_name is invalid." error_code=1 fi @@ -817,7 +809,6 @@ if [ "$str_os_type" = "aix" ];then hashset hash_new_config $str_old_ip "old" else chdev -l $str_nic_name -a netaddr='' -a netmask='' - logger -t xcat -p local4.err "configeth: delete undefined ip address $str_old_ip" log_error "configeth on $NODE: delete undefined ip address $str_old_ip" error_code=1 fi @@ -833,8 +824,7 @@ if [ "$str_os_type" = "aix" ];then hashset hash_new_config $str_old_ip "old" else chdev -l $str_nic_name -a netaddr6='' -a prefixlen='' - logger -t xcat -p local4.err "configeth: delete undefined ipv6 address $str_old_ip" - echo "configeth on $NODE: delete undefined ipv6 address $str_old_ip" + log_error "configeth on $NODE: delete undefined ipv6 address $str_old_ip" fi fi @@ -886,7 +876,6 @@ if [ "$str_os_type" = "aix" ];then do str_ip_status=$(hashget hash_new_config $str_new_ip) if [ "$str_ip_status" = "new" ];then - logger -t xcat -p local4.err "configeth: add $str_new_ip for $str_nic_name temporary." log_info "configeth on $NODE: add $str_new_ip for $str_nic_name temporary." add_ip_temporary $str_new_ip $str_nic_name fi @@ -925,7 +914,6 @@ else hashset hash_new_config $str_old_ip "old" else bool_modify_flag=1 - logger -t xcat -p local4.err "configeth: delete $str_old_ip for $str_nic_name temporary." log_info "configeth on $NODE: delete $str_old_ip for $str_nic_name temporary." str_old_ip=`echo $str_old_ip | tr '_' '/'` ip addr del $str_old_ip dev $str_nic_name @@ -967,7 +955,6 @@ else if [ "$str_ip_status" = "new" ];then bool_modify_flag=1 if [ $bool_restart_flag -eq 0 ];then - logger -t xcat -p local4.err "configeth: add $str_new_ip for $str_nic_name temporary." log_info "configeth on $NODE: add $str_new_ip for $str_nic_name temporary." add_ip_temporary $str_new_ip $str_nic_name fi @@ -978,7 +965,6 @@ else if [ $bool_restart_flag -eq 0 -a -n "$str_ipv6_gateway" ];then ip -6 route | grep default | grep $str_ipv6_gateway if [ $? -ne 0 ];then - logger -t xcat -p local4.err "configeth: the default ipv6 route changes to $str_ipv6_gateway." log_info "configeth on $NODE: the default ipv6 route changes to $str_ipv6_gateway." ip -6 route del default ip -6 route add default $str_ipv6_gateway dev $str_dev_name @@ -1003,7 +989,6 @@ else ip addr del $str_old_ip dev $str_nic_name done fi - logger -t xcat -p local4.err "configeth: $str_nic_name changed, modify the configuration files" log_info "configeth on $NODE: $str_nic_name changed, modify the configuration files" num_ipv4_index=0 num_ipv6_index=0 @@ -1060,7 +1045,6 @@ else num_index=$((num_index+1)) done else - logger -t xcat -p local4.err "configeth: $str_nic_name no changed, return directly." log_warn "configeth on $NODE: $str_nic_name no changed, return directly." fi diff --git a/xCAT/postscripts/nicutils.sh b/xCAT/postscripts/nicutils.sh index 9d1666b2f..8e1fa0551 100755 --- a/xCAT/postscripts/nicutils.sh +++ b/xCAT/postscripts/nicutils.sh @@ -27,7 +27,11 @@ brctl="brctl" uniq="uniq" xargs="xargs" modprobe="modprobe" - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi ######################################################################### # ifdown/ifup will not be executed in diskful provision postscripts stage ######################################################################### @@ -87,6 +91,7 @@ function log_lines { function log_error { local __msg="$*" $log_print_cmd $log_print_arg "[E]:Error: $__msg" + logger -t $log_label -p local4.err "$__msg" return 1 } @@ -103,6 +108,7 @@ function log_error { function log_warn { local __msg="$*" $log_print_cmd $log_print_arg "[W]: $__msg" + logger -t $log_label -p local4.info "$__msg" return 0 } @@ -119,6 +125,7 @@ function log_warn { function log_info { local __msg="$*" $log_print_cmd $log_print_arg "[I]: $__msg" + logger -t $log_label -p local4.info "$__msg" return 0 } diff --git a/xCAT/postscripts/ospkgs b/xCAT/postscripts/ospkgs index 1ebf9132d..f3dfea148 100755 --- a/xCAT/postscripts/ospkgs +++ b/xCAT/postscripts/ospkgs @@ -23,6 +23,12 @@ #=cut #------------------------------------------------------------------------------- +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi + # pmatch determines if 1st argument string is matched by 2nd argument pattern pmatch () { @@ -350,9 +356,9 @@ IFS=$OIFS # fi #fi -logger -t xcat -p local4.info "NFSSERVER=$NFSSERVER" -logger -t xcat -p local4.info "OSPKGDIR=$OSPKGDIR" -logger -t xcat -p local4.info "OSPKGS=$OSPKGS" +logger -t $log_label -p local4.info "NFSSERVER=$NFSSERVER" +logger -t $log_label -p local4.info "OSPKGDIR=$OSPKGDIR" +logger -t $log_label -p local4.info "OSPKGS=$OSPKGS" if [ $debug -ne 0 ]; then echo NFSSERVER=$NFSSERVER @@ -472,13 +478,13 @@ if ( pmatch "$OSVER" "sles10*" ); then fi result=`rug sa $path $OSVER` if [ $? -ne 0 ]; then - logger -t xcat -p local4.info "ospkgs: rug sa $path $OSVER\n $result" + logger -t $log_label -p local4.info "ospkgs: rug sa $path $OSVER\n $result" echo "ospkgs: rug sa $path $OSVER" echo " $result" fi result=`rug sub $OSVER` if [ $? -ne 0 ]; then - logger -t xcat -p local4.info "ospkgs: rug sub $OSVER\n $result" + logger -t $log_label -p local4.info "ospkgs: rug sub $OSVER\n $result" echo "ospkgs: rug sub $OSVER" echo " $result" fi @@ -492,7 +498,7 @@ if ( pmatch "$OSVER" "sles10*" ); then R=$? if [ $R -ne 0 ]; then RETURNVAL=$R - logger -t xcat -p local4.info "rug update -y --agree-to-third-party-licences\n $result" + logger -t $log_label -p local4.info "rug update -y --agree-to-third-party-licences\n $result" echo "ospkgs: rug update -y --agree-to-third-party-licences" echo " $result" else @@ -510,7 +516,7 @@ if ( pmatch "$OSVER" "sles10*" ); then R=$? if [ $R -ne 0 ]; then RETURNVAL=$R - logger -t xcat -p local4.info "ospkgs: $cmd\n $result" + logger -t $log_label -p local4.info "ospkgs: $cmd\n $result" echo "ospkgs: $cmd" echo $result else @@ -528,7 +534,7 @@ if ( pmatch "$OSVER" "sles10*" ); then R=$? if [ $R -ne 0 ]; then RETURNVAL=$R - logger -t xcat -p local4.info "ospkgs: $cmd\n $result" + logger -t $log_label -p local4.info "ospkgs: $cmd\n $result" echo "ospkgs: $cmd" echo $result else @@ -546,7 +552,7 @@ if ( pmatch "$OSVER" "sles10*" ); then R=$? if [ $R -ne 0 ]; then RETURNVAL=$R - logger -t xcat -p local4.info "ospkgs: $cmd\n $result" + logger -t $log_label -p local4.info "ospkgs: $cmd\n $result" echo "ospkgs: $cmd" echo $result else @@ -591,7 +597,7 @@ elif ( pmatch "$OSVER" "sle*" ); then result=`zypper ar $path xCAT-$OSVER 2>&1` if [ $? -ne 0 ]; then if ( ! pmatch "$result" "*exists*" ); then - logger -t xcat -p local4.info "ospkgs: zypper ar $path xCAT-$OSVER\n $result" + logger -t $log_label -p local4.info "ospkgs: zypper ar $path xCAT-$OSVER\n $result" echo "ospkgs: zypper ar $path xCAT-OSVER" echo " $result" fi @@ -607,7 +613,7 @@ elif ( pmatch "$OSVER" "sle*" ); then result=`zypper ar $path xCAT-$OSVER-"path$i" 2>&1` if [ $? -ne 0 ]; then if ( ! pmatch "$result" "*exists*" ); then - logger -t xcat -p local4.info "ospkgs: zypper ar $path xCAT-$OSVER-path$i\n $result" + logger -t $log_label -p local4.info "ospkgs: zypper ar $path xCAT-$OSVER-path$i\n $result" echo "ospkgs: zypper ar $path xCAT-$OSVER-path$i" echo " $result" fi @@ -633,7 +639,7 @@ elif ( pmatch "$OSVER" "sle*" ); then result=`zypper ar $sdk_src xCAT-$OSVER-$bname 2>&1` if [ $? -ne 0 ]; then if ( ! pmatch "$result" "*exists*" ); then - logger -t xcat -p local4.info "ospkgs: zypper ar $sdk_src xCAT-$OSVER-bname\n $result" + logger -t $log_label -p local4.info "ospkgs: zypper ar $sdk_src xCAT-$OSVER-bname\n $result" echo "ospkgs: zypper ar $sdk_src xCAT-$OSVER-bname" echo " $result" fi @@ -653,7 +659,7 @@ elif ( pmatch "$OSVER" "sle*" ); then R=$? if [ $R -ne 0 ]; then RETURNVAL=$R - logger -t xcat -p local4.info "ospkgs: zypper --non-interactive update --auto-agree-with-licenses\n $result" + logger -t $log_label -p local4.info "ospkgs: zypper --non-interactive update --auto-agree-with-licenses\n $result" echo "ospkgs: zypper --non-interactive update --auto-agree-with-licenses" echo " $result" else @@ -670,7 +676,7 @@ elif ( pmatch "$OSVER" "sle*" ); then R=$? if [ $R -ne 0 ]; then RETURNVAL=$R - logger -t xcat -p local4.info "ospkgs: $cmd\n $result" + logger -t $log_label -p local4.info "ospkgs: $cmd\n $result" echo "ospkgs: $cmd" echo $result else @@ -688,7 +694,7 @@ elif ( pmatch "$OSVER" "sle*" ); then R=$? if [ $R -ne 0 ]; then RETURNVAL=$R - logger -t xcat -p local4.info "ospkgs: $cmd $result" + logger -t $log_label -p local4.info "ospkgs: $cmd $result" echo "ospkgs: $cmd" echo $result else @@ -708,7 +714,7 @@ elif ( pmatch "$OSVER" "sle*" ); then R=$? if [ $R -ne 0 ]; then RETURNVAL=$R - logger -t xcat -p local4.info "ospkgs: $cmd\n $result" + logger -t $log_label -p local4.info "ospkgs: $cmd\n $result" echo "ospkgs: $cmd" echo $result else @@ -726,7 +732,7 @@ elif ( pmatch "$OSVER" "sle*" ); then R=$? if [ $R -ne 0 ]; then RETURNVAL=$R - logger -t xcat -p local4.info "ospkgs: $cmd $result" + logger -t $log_label -p local4.info "ospkgs: $cmd $result" echo "ospkgs: $cmd" echo $result else @@ -900,7 +906,7 @@ else R=$? if [ $R -ne 0 ]; then RETURNVAL=$R - logger -t xcat -p local4.info "ospkgs: yum -y upgrade\n $result" + logger -t $log_label -p local4.info "ospkgs: yum -y upgrade\n $result" echo "ospkgs: yum -y upgrade" echo " $result" else @@ -918,7 +924,7 @@ else R=$? if [ $R -ne 0 ]; then RETURNVAL=$R - logger -t xcat -p local4.info "ospkgs: $cmd\n $result" + logger -t $log_label -p local4.info "ospkgs: $cmd\n $result" echo "ospkgs: $cmd" echo $result else @@ -936,7 +942,7 @@ else R=$? if [ $R -ne 0 ]; then RETURNVAL=$R - logger -t xcat -p local4.info "ospkgs: $cmd\n $result" + logger -t $log_label -p local4.info "ospkgs: $cmd\n $result" echo "ospkgs: $cmd" echo $result else @@ -959,7 +965,7 @@ else R=$? if [ $R -ne 0 ]; then RETURNVAL=$R - logger -t xcat -p local4.info "ospkgs: $cmd\n $result" + logger -t $log_label -p local4.info "ospkgs: $cmd\n $result" echo "ospkgs: $cmd" echo $result else @@ -977,7 +983,7 @@ else R=$? if [ $R -ne 0 ]; then RETURNVAL=$R - logger -t xcat -p local4.info "ospkgs: $cmd\n $result" + logger -t $log_label -p local4.info "ospkgs: $cmd\n $result" echo "ospkgs: $cmd" echo $result else @@ -995,7 +1001,7 @@ else R=$? if [ $R -ne 0 ]; then RETURNVAL=$R - logger -t xcat -p local4.info "ospkgs: $cmd\n $result" + logger -t $log_label -p local4.info "ospkgs: $cmd\n $result" echo "ospkgs: $cmd" echo $result else diff --git a/xCAT/postscripts/otherpkgs b/xCAT/postscripts/otherpkgs index a97cb73f7..0eb856964 100755 --- a/xCAT/postscripts/otherpkgs +++ b/xCAT/postscripts/otherpkgs @@ -24,11 +24,16 @@ #enable debug #set -x +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi if [ -f /etc/os-release ] && cat /etc/os-release |grep -i -e "^NAME=[ \"']*Cumulus Linux[ \"']*$" >/dev/null 2>&1 ; then #TODO echo "Cumulus OS is not supported yet, nothing to do..." - logger -t xcat -p local4.info "Cumulus OS is not supported yet, nothing to do..." + logger -t $log_label -p local4.info "Cumulus OS is not supported yet, nothing to do..." exit 0 fi @@ -210,10 +215,10 @@ apt_get_update_if_repos_changed() RETURNVAL=0 if [ "$(uname -s)" = "AIX" ]; then - logger -p local4.info -t xcat "otherpkgs not support on AIX, exiting " + logger -p local4.info -t $log_label "otherpkgs not support on AIX, exiting " exit 0 else - logger -p local4.info -t xcat "Running otherpkgs " + logger -p local4.info -t $log_label "Running otherpkgs " fi if [ -z "$UPDATENODE" ] || [ $UPDATENODE -ne 1 ]; then if [ "$NODESETSTATE" = "netboot" -o \ @@ -385,11 +390,11 @@ fi if [ $VERBOSE ]; then echo NFSSERVER=$NFSSERVER fi -logger -p local4.info -t xcat "NFSSERVER=$NFSSERVER" +logger -p local4.info -t $log_label "NFSSERVER=$NFSSERVER" if [ $VERBOSE ]; then echo OTHERPKGDIR=$OTHERPKGDIR fi -logger -p local4.info -t xcat "OTHERPKGDIR=$OTHERPKGDIR" +logger -p local4.info -t $log_label "OTHERPKGDIR=$OTHERPKGDIR" #if [ -x "/sbin/dhcpcd" ]; then # dhcpcd -n $PRIMARYNIC @@ -461,7 +466,7 @@ if ( ! ( pmatch "$OSVER" "sles10*" ) && [ $haszypper -eq 1 ] ); then result=`zypper ar $path xCAT-$OSVER 2>&1` if [ $? -ne 0 ]; then if ( ! pmatch "$result" "*exists*" ); then - logger -t xcat -p local4.info "ospkgs: zypper ar $path xCAT-$OSVER\n $result" + logger -t $log_label -p local4.info "ospkgs: zypper ar $path xCAT-$OSVER\n $result" if [ $VERBOSE ]; then echo "ospkgs: zypper ar $path xCAT-$OSVER" echo " $result" @@ -479,7 +484,7 @@ if ( ! ( pmatch "$OSVER" "sles10*" ) && [ $haszypper -eq 1 ] ); then result=`zypper ar $path xCAT-$OSVER-"path$i" 2>&1` if [ $? -ne 0 ]; then if ( ! pmatch "$result" "*exists*" ); then - logger -t xcat -p local4.info "ospkgs: zypper ar $path xCAT-$OSVER-path$i\n $result" + logger -t $log_label -p local4.info "ospkgs: zypper ar $path xCAT-$OSVER-path$i\n $result" if [ $VERBOSE ]; then echo "ospkgs: zypper ar $path xCAT-$OSVER-path$i" echo " $result" @@ -507,7 +512,7 @@ if ( ! ( pmatch "$OSVER" "sles10*" ) && [ $haszypper -eq 1 ] ); then result=`zypper ar $sdk_src xCAT-$OSVER-$bname 2>&1` if [ $? -ne 0 ]; then if ( ! pmatch "$result" "*exists*" ); then - logger -t xcat -p local4.info "otherpkgs: zypper ar $sdk_src xCAT-$OSVER-bname\n $result" + logger -t $log_label -p local4.info "otherpkgs: zypper ar $sdk_src xCAT-$OSVER-bname\n $result" if [ $VERBOSE ]; then echo "otherpkgs: zypper ar $sdk_src xCAT-$OSVER-bname" echo " $result" @@ -818,7 +823,7 @@ EOF` if [ $R -ne 0 ]; then RETURNVAL=$R fi - logger -p local4.info -t xcat "$result" + logger -p local4.info -t $log_label "$result" if [ $VERBOSE ]; then echo "$result" fi @@ -832,7 +837,7 @@ EOF` if [ $R -ne 0 ]; then RETURNVAL=$R fi - logger -p local4.info -t xcat "$result" + logger -p local4.info -t $log_label "$result" if [ $VERBOSE ]; then echo "$result" fi @@ -846,7 +851,7 @@ EOF` if [ $R -ne 0 ]; then RETURNVAL=$R fi - logger -p local4.info -t xcat "$result" + logger -p local4.info -t $log_label "$result" if [ $VERBOSE ]; then echo "$result" fi @@ -867,7 +872,7 @@ EOF` if [ $R -ne 0 ]; then RETURNVAL=$R fi - logger -p local4.info -t xcat "$result" + logger -p local4.info -t $log_label "$result" if [ $VERBOSE ]; then echo "$result" fi @@ -880,7 +885,7 @@ EOF` if [ $R -ne 0 ]; then RETURNVAL=$R fi - logger -p local4.info -t xcat "$result" + logger -p local4.info -t $log_label "$result" if [ $VERBOSE ]; then echo "$result" fi @@ -894,7 +899,7 @@ EOF` if [ $R -ne 0 ]; then RETURNVAL=$R fi - logger -p local4.info -t xcat "$result" + logger -p local4.info -t $log_label "$result" if [ $VERBOSE ]; then echo "$result" fi @@ -910,7 +915,7 @@ EOF` if [ $R -ne 0 ]; then RETURNVAL=$R fi - logger -p local4.info -t xcat "$result" + logger -p local4.info -t $log_label "$result" if [ $VERBOSE ]; then echo "$result" fi @@ -927,8 +932,9 @@ EOF` R=$? if [ $R -ne 0 ]; then RETURNVAL=$R + logger -p local4.err -t $log_label "$envlist yum -y install $repo_pkgs failed." fi - logger -p local4.info -t xcat "$result" + logger -p local4.info -t $log_label "$repo_pkgs installed." if [ $VERBOSE ]; then echo "$result" fi @@ -940,8 +946,9 @@ EOF` R=$? if [ $R -ne 0 ]; then RETURNVAL=$R + logger -p local4.err -t $log_label "$envlist zypper install -y $repo_pkgs 2>&1 failed." fi - logger -p local4.info -t xcat "$result" + logger -p local4.info -t $log_label "$repo_pkgs installed." if [ $VERBOSE ]; then echo "$result" fi @@ -960,8 +967,9 @@ EOF` R=$? if [ $R -ne 0 ]; then RETURNVAL=$R + logger -p local4.err -t $log_label "install $repo_pkgs failed." fi - logger -p local4.info -t xcat "$result" + logger -p local4.info -t $log_label "$repo_pkgs installed." if [ $VERBOSE ]; then echo "$result" fi @@ -971,7 +979,7 @@ EOF` #Handle the rest with rpm if [ "$plain_pkgs" != "" -a -n "$OTHERPKGDIR" ]; then echo "Warning: the packages $plain_pkgs could not be found in the yum/apt repository, falling back to rpm/dpkg command. If you want your packages to be installed with yum/apt, verify yum/apt is installed and createrepo/dpkg-scanpackages has been run." - logger -p local4.info -t xcat "Warning: the packages $plain_pkgs could not be found in the yum/apt repository, falling back to rpm/dpkg command. If you want your packages to be installed with yum/apt, verify yum/apt is installed and createrepo/dpkg-scanpackages has been run." + logger -p local4.info -t $log_label "Warning: the packages $plain_pkgs could not be found in the yum/apt repository, falling back to rpm/dpkg command. If you want your packages to be installed with yum/apt, verify yum/apt is installed and createrepo/dpkg-scanpackages has been run." if [ $mounted -eq 0 ]; then dir_no_ftproot=${OTHERPKGDIR#*$INSTALLDIR/} mkdir -p /xcatpost/$dir_no_ftproot @@ -998,7 +1006,7 @@ EOF` if [ $R -ne 0 ]; then RETURNVAL=$R fi - logger -p local4.info -t xcat "$result" + logger -p local4.info -t $log_label "$plain_pkgs installed." if [ $VERBOSE ]; then echo "$result" fi @@ -1022,7 +1030,7 @@ EOF` if [ $R -ne 0 ]; then RETURNVAL=$R fi - logger -p local4.info -t xcat "$result" + logger -p local4.info -t $log_label "$repo_pkgs_postremove removed." if [ $VERBOSE ]; then echo "$result" fi @@ -1035,7 +1043,7 @@ EOF` if [ $R -ne 0 ]; then RETURNVAL=$R fi - logger -p local4.info -t xcat "$result" + logger -p local4.info -t $log_label "$repo_pkgs_postremove removed." if [ $VERBOSE ]; then echo "$result" fi @@ -1049,7 +1057,7 @@ EOF` if [ $R -ne 0 ]; then RETURNVAL=$R fi - logger -p local4.info -t xcat "$result" + logger -p local4.info -t $log_label "$repo_pkgs_postremove removed." if [ $VERBOSE ]; then echo "$result" fi @@ -1065,7 +1073,7 @@ EOF` if [ $R -ne 0 ]; then RETURNVAL=$R fi - logger -p local4.info -t xcat "$result" + logger -p local4.info -t $log_label "$plain_pkgs_postremove removed." if [ $VERBOSE ]; then echo "$result" fi diff --git a/xCAT/postscripts/remoteshell b/xCAT/postscripts/remoteshell index a0b8e42b2..0c266d9b6 100755 --- a/xCAT/postscripts/remoteshell +++ b/xCAT/postscripts/remoteshell @@ -11,11 +11,16 @@ # id.rsa # # if on the Management Node, exit +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi umask 0077 if [ -f /etc/os-release ] && cat /etc/os-release |grep -i -e "^NAME=[ \"']*Cumulus Linux[ \"']*$" >/dev/null 2>&1 ; then #TODO echo "Cumulus OS is not supported yet, nothing to do..." - logger -t xcat -p local4.info "Cumulus OS is not supported yet, nothing to do..." + logger -t $log_label -p local4.info "Cumulus OS is not supported yet, nothing to do..." exit 0 fi @@ -25,7 +30,7 @@ if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then fi if [ -e /etc/xCATMN ]; then - logger -t xcat -p local4.info "remoteshell:Running on the Management Node , exiting " + logger -t $log_label -p local4.info "remoteshell:Running on the Management Node , exiting " exit 0 fi # if -p input, do special PCM setup @@ -39,7 +44,7 @@ fi # Linux or if AIX call aixremoteshell -d if [ "$(uname -s)" = "AIX" ]; then ./aixremoteshell -d 2>&1 - logger -t xcat -p local4.info "Install: On AIX , remoteshell calling aixremoteshell -d " + logger -t $log_label -p local4.info "Install: On AIX , remoteshell calling aixremoteshell -d " exit 0 fi master=$MASTER @@ -51,7 +56,7 @@ fi if [ -r /etc/ssh/sshd_config ] then - logger -t xcat -p local4.info "remoteshell: setup /etc/ssh/sshd_config and ssh_config" + logger -t $log_label -p local4.info "remoteshell: setup /etc/ssh/sshd_config and ssh_config" cp /etc/ssh/sshd_config /etc/ssh/sshd_config.ORIG #delete all occurance of the attribute and then add xCAT settings sed -i '/X11Forwarding /'d /etc/ssh/sshd_config @@ -78,7 +83,7 @@ fi xcatpost="xcatpost" if [ -d /xcatpost/_ssh ] then - logger -p local4.info -t xcat "Install: setup root .ssh" + logger -p local4.info -t $log_label "Install: setup root .ssh" cd /xcatpost/_ssh mkdir -p /root/.ssh cp -f * /root/.ssh @@ -88,7 +93,7 @@ then fi if [ ! -x /usr/bin/openssl ]; then - logger -t xcat -p local4.err "Install: /usr/bin/openssl is not executable." + logger -t $log_label -p local4.err "Install: /usr/bin/openssl is not executable." exit 0 fi allowcred.awk & @@ -98,12 +103,12 @@ sleep 1 #download the ssh host dsa private keys if [ $useflowcontrol = "1" ]; then #first contact daemon xcatflowrequest 3001 - logger -t xcat -p local4.info "remoteshell: sending xcatflowrequest $master 3001" + logger -t $log_label -p local4.info "remoteshell: sending xcatflowrequest $master 3001" /$xcatpost/xcatflowrequest $master 3001 rc=$? - logger -t xcat -p local4.info "remoteshell:xcatflowrequest received response return=$rc" + logger -t $log_label -p local4.info "remoteshell:xcatflowrequest received response return=$rc" if [ $rc -ne 0 ]; then - logger -t xcat -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control" + logger -t $log_label -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control" useflowcontrol=0 fi @@ -116,7 +121,7 @@ grep -E '' /tmp/ssh_dsa_hostkey > /dev/null 2>&1 if [ $? -ne 0 ]; then #the message received is the data cat /tmp/ssh_dsa_hostkey | grep -E -v '|/{0,1}data>||' >/etc/ssh/ssh_host_dsa_key - logger -t xcat -p local4.info "remoteshell: getting ssh_host_dsa_key" + logger -t $log_label -p local4.info "remoteshell: getting ssh_host_dsa_key" MAX_RETRIES=10 RETRY=0 MYCONT=`cat /etc/ssh/ssh_host_dsa_key` @@ -135,12 +140,12 @@ if [ $? -ne 0 ]; then fi if [ $useflowcontrol = "1" ]; then #first contact daemon xcatflowrequest 3001 - logger -t xcat -p local4.info "remoteshell: sending xcatflowrequest $master 3001" + logger -t $log_label -p local4.info "remoteshell: sending xcatflowrequest $master 3001" /$xcatpost/xcatflowrequest $master 3001 rc=$? - logger -t xcat -p local4.info "remoteshell:xcatflowrequest return=$rc" + logger -t $log_label -p local4.info "remoteshell:xcatflowrequest return=$rc" if [ $rc -ne 0 ]; then - logger -t xcat -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control" + logger -t $log_label -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control" useflowcontrol=0 fi fi @@ -158,19 +163,19 @@ if [ $? -ne 0 ]; then else #the message received is an error, so parse it ERR_MSG=`sed -n 's%.*\(.*\).*%\1%p' /tmp/ssh_dsa_hostkey` - logger -s -t xcat -p local4.err Error: $ERR_MSG + logger -s -t $log_label -p local4.err Error: $ERR_MSG fi rm /tmp/ssh_dsa_hostkey # download the host rsa key if [ $useflowcontrol = "1" ]; then #first contact daemon xcatflowrequest 3001 - logger -t xcat -p local4.info "remoteshell: sending xcatflowrequest $master 3001" + logger -t $log_label -p local4.info "remoteshell: sending xcatflowrequest $master 3001" /$xcatpost/xcatflowrequest $master 3001 rc=$? - logger -t xcat -p local4.info "remoteshell:xcatflowrequest return=$rc" + logger -t $log_label -p local4.info "remoteshell:xcatflowrequest return=$rc" if [ $rc -ne 0 ]; then - logger -t xcat -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control" + logger -t $log_label -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control" useflowcontrol=0 fi fi @@ -182,7 +187,7 @@ grep -E '' /tmp/ssh_rsa_hostkey > /dev/null 2>&1 if [ $? -ne 0 ]; then #the message received is the data we request cat /tmp/ssh_rsa_hostkey | grep -E -v '|/{0,1}data>||' >/etc/ssh/ssh_host_rsa_key - logger -t xcat -p local4.info ssh_rsa_hostkey + logger -t $log_label -p local4.info ssh_rsa_hostkey MYCONT=`cat /etc/ssh/ssh_host_rsa_key` MAX_RETRIES=10 RETRY=0 @@ -200,12 +205,12 @@ if [ $? -ne 0 ]; then fi if [ $useflowcontrol = "1" ]; then #first contact daemon xcatflowrequest 3001 - logger -t xcat -p local4.info "remoteshell: sending xcatflowrequest $master 3001" + logger -t $log_label -p local4.info "remoteshell: sending xcatflowrequest $master 3001" /$xcatpost/xcatflowrequest $master 3001 rc=$? - logger -t xcat -p local4.info "remoteshell:xcatflowrequest return=$rc" + logger -t $log_label -p local4.info "remoteshell:xcatflowrequest return=$rc" if [ $rc -ne 0 ]; then - logger -t xcat -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control" + logger -t $log_label -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control" useflowcontrol=0 fi fi @@ -224,7 +229,7 @@ if [ $? -ne 0 ]; then else #This is an error message ERR_MSG=`sed -n 's%.*\(.*\).*%\1%p' /tmp/ssh_rsa_hostkey` - logger -s -t xcat -p local4.err Error: $ERR_MSG + logger -s -t $log_label -p local4.err Error: $ERR_MSG fi rm /tmp/ssh_rsa_hostkey @@ -236,12 +241,12 @@ if ssh-keygen -t ecdsa -f /tmp/ecdsa_key -P "" &>/dev/null ; then # download the host ecdsa key if [ $useflowcontrol = "1" ]; then #first contact daemon xcatflowrequest 3001 - logger -t xcat -p local4.info "remoteshell: sending xcatflowrequest $master 3001" + logger -t $log_label -p local4.info "remoteshell: sending xcatflowrequest $master 3001" /$xcatpost/xcatflowrequest $master 3001 rc=$? - logger -t xcat -p local4.info "remoteshell:xcatflowrequest return=$rc" + logger -t $log_label -p local4.info "remoteshell:xcatflowrequest return=$rc" if [ $rc -ne 0 ]; then - logger -t xcat -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control" + logger -t $log_label -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control" useflowcontrol=0 fi fi @@ -253,7 +258,7 @@ if ssh-keygen -t ecdsa -f /tmp/ecdsa_key -P "" &>/dev/null ; then if [ $? -ne 0 ]; then #the message received is the data we request cat /tmp/ssh_ecdsa_hostkey | grep -E -v '|/{0,1}data>||' >/etc/ssh/ssh_host_ecdsa_key - logger -t xcat -p local4.info ssh_ecdsa_hostkey + logger -t $log_label -p local4.info ssh_ecdsa_hostkey MYCONT=`cat /etc/ssh/ssh_host_ecdsa_key` MAX_RETRIES=10 RETRY=0 @@ -271,12 +276,12 @@ if ssh-keygen -t ecdsa -f /tmp/ecdsa_key -P "" &>/dev/null ; then fi if [ $useflowcontrol = "1" ]; then #first contact daemon xcatflowrequest 3001 - logger -t xcat -p local4.info "remoteshell: sending xcatflowrequest $master 3001" + logger -t $log_label -p local4.info "remoteshell: sending xcatflowrequest $master 3001" /$xcatpost/xcatflowrequest $master 3001 rc=$? - logger -t xcat -p local4.info "remoteshell:xcatflowrequest return=$rc" + logger -t $log_label -p local4.info "remoteshell:xcatflowrequest return=$rc" if [ $rc -ne 0 ]; then - logger -t xcat -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control" + logger -t $log_label -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control" useflowcontrol=0 fi fi @@ -303,7 +308,7 @@ if ssh-keygen -t ecdsa -f /tmp/ecdsa_key -P "" &>/dev/null ; then else #This is an error message ERR_MSG=`sed -n 's%.*\(.*\).*%\1%p' /tmp/ssh_ecdsa_hostkey` - logger -s -t xcat -p local4.err Error: $ERR_MSG + logger -s -t $log_label -p local4.err Error: $ERR_MSG fi rm /tmp/ssh_ecdsa_hostkey fi @@ -327,26 +332,26 @@ then zonename=$ZONENAME rootsshpvtkey=ssh_root_key:$zonename rootsshpubkey=ssh_root_pub_key:$zonename - logger -t xcat -p local4.info "remoteshell: gathering root ssh keys for $zonename" + logger -t $log_label -p local4.info "remoteshell: gathering root ssh keys for $zonename" fi # always get the id_rsa.pub key for the node and put in authorized_keys if [ $useflowcontrol = "1" ]; then #first contact daemon xcatflowrequest 3001 - logger -t xcat -p local4.info "remoteshell: sending xcatflowrequest $master 3001" + logger -t $log_label -p local4.info "remoteshell: sending xcatflowrequest $master 3001" /$xcatpost/xcatflowrequest $master 3001 rc=$? - logger -t xcat -p local4.info "remoteshell:xcatflowrequest return=$rc" + logger -t $log_label -p local4.info "remoteshell:xcatflowrequest return=$rc" if [ $rc -ne 0 ]; then - logger -t xcat -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control" + logger -t $log_label -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control" useflowcontrol=0 fi fi getcredentials.awk $rootsshpubkey | grep -E -v '|'|sed -e 's/<//' -e 's/&/&/' -e 's/"/"/' -e "s/'/'/" > /tmp/ssh_root_pub_key - logger -t xcat -p local4.info "remoteshell: gathering $rootsshpubkey " + logger -t $log_label -p local4.info "remoteshell: gathering $rootsshpubkey " #check whether the message is an error or not grep -E '' /tmp/ssh_root_pub_key if [ $? -ne 0 ]; then @@ -354,7 +359,7 @@ if [ $? -ne 0 ]; then cat /tmp/ssh_root_pub_key | grep -E -v '|||' > /root/.ssh/id_rsa.pub # no add to authorized_keys, so the node can ssh to itself cat /tmp/ssh_root_pub_key | grep -E -v '|||' >> /root/.ssh/authorized_keys - logger -t xcat -p local4.info ssh_root_pub_key + logger -t $log_label -p local4.info ssh_root_pub_key MYCONT=`cat /root/.ssh/id_rsa.pub` MAX_RETRIES=10 RETRY=0 @@ -371,12 +376,12 @@ if [ $? -ne 0 ]; then fi if [ $useflowcontrol = "1" ]; then #first contact daemon xcatflowrequest 3001 - logger -t xcat -p local4.info "remoteshell: sending xcatflowrequest $master 3001" + logger -t $log_label -p local4.info "remoteshell: sending xcatflowrequest $master 3001" /$xcatpost/xcatflowrequest $master 3001 rc=$? - logger -t xcat -p local4.info "remoteshell:xcatflowrequest return=$rc" + logger -t $log_label -p local4.info "remoteshell:xcatflowrequest return=$rc" if [ $rc -ne 0 ]; then - logger -t xcat -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control" + logger -t $log_label -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control" useflowcontrol=0 fi fi @@ -387,34 +392,34 @@ if [ $? -ne 0 ]; then else #This is an error message ERR_MSG=`sed -n 's%.*\(.*\).*%\1%p' /tmp/ssh_root_pub_key` - logger -t xcat -p local4.err $rootsshpubkey Error: $ERR_MSG + logger -t $log_label -p local4.err $rootsshpubkey Error: $ERR_MSG fi rm /tmp/ssh_root_pub_key # if sshbetweennodes is enabled then we get id_rsa ( private key) if [ $ENABLESSHBETWEENNODES = "YES" ]; # want nodes to be able to ssh to each other without password then - logger -t xcat -p local4.info "remoteshell:sshbetweennodes is yes" + logger -t $log_label -p local4.info "remoteshell:sshbetweennodes is yes" if [ $useflowcontrol = "1" ]; then #first contact daemon xcatflowrequest 3001 - logger -t xcat -p local4.info "remoteshell: sending xcatflowrequest $master 3001" + logger -t $log_label -p local4.info "remoteshell: sending xcatflowrequest $master 3001" /$xcatpost/xcatflowrequest $master 3001 rc=$? - logger -t xcat -p local4.info "remoteshell:xcatflowrequest return=$rc" + logger -t $log_label -p local4.info "remoteshell:xcatflowrequest return=$rc" if [ $rc -ne 0 ]; then - logger -t xcat -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control" + logger -t $log_label -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control" useflowcontrol=0 fi fi getcredentials.awk $rootsshpvtkey | grep -E -v '|'|sed -e 's/<//' -e 's/&/&/' -e 's/"/"/' -e "s/'/'/" > /tmp/ssh_root_key - logger -t xcat -p local4.info "remoteshell: gathering $rootsshpvtkey " + logger -t $log_label -p local4.info "remoteshell: gathering $rootsshpvtkey " #check whether the message is an error or not grep -E '' /tmp/ssh_root_key if [ $? -ne 0 ]; then #The message contains the data we request cat /tmp/ssh_root_key | grep -E -v '|/{0,1}data>||' > /root/.ssh/id_rsa - logger -t xcat -p local4.info ssh_root_key + logger -t $log_label -p local4.info ssh_root_key MYCONT=`cat /root/.ssh/id_rsa` MAX_RETRIES=10 RETRY=0 @@ -431,12 +436,12 @@ then fi if [ $useflowcontrol = "1" ]; then #first contact daemon xcatflowrequest 3001 - logger -t xcat -p local4.info "remoteshell: sending xcatflowrequest $master 3001" + logger -t $log_label -p local4.info "remoteshell: sending xcatflowrequest $master 3001" /$xcatpost/xcatflowrequest $master 3001 rc=$? - logger -t xcat -p local4.info "remoteshell:xcatflowrequest return=$rc" + logger -t $log_label -p local4.info "remoteshell:xcatflowrequest return=$rc" if [ $rc -ne 0 ]; then - logger -t xcat -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control" + logger -t $log_label -p local4.info "remoteshell: error from xcatflowrequest, will not use flow control" useflowcontrol=0 fi fi @@ -446,7 +451,7 @@ then else #This is an error message ERR_MSG=`sed -n 's%.*\(.*\).*%\1%p' /tmp/ssh_root_key` - logger -t xcat -p local4.err $rootsshpvtkey Error: $ERR_MSG + logger -t $log_label -p local4.err $rootsshpvtkey Error: $ERR_MSG fi rm /tmp/ssh_root_key @@ -457,26 +462,26 @@ then if [ ! -f /root/.ssh/id_rsa.pub ]; then if [ -r /root/.ssh/id_rsa ]; then ssh-keygen -y -f /root/.ssh/id_rsa > /root/.ssh/id_rsa.pub - logger -t xcat -p local4.err remoteshell:transfer of the id_rsa.pub key failed. Had to generate a public key. + logger -t $log_label -p local4.err remoteshell:transfer of the id_rsa.pub key failed. Had to generate a public key. fi fi fi # if secureroot is enabled then we get root password hash, not for updatenode if [ "x$SECUREROOT" = "x1" ] && [ "x$UPDATENODE" != "x1" ]; then - logger -t xcat -p local4.info "remoteshell: secure root is enabled" + logger -t $log_label -p local4.info "remoteshell: secure root is enabled" if [ $useflowcontrol = "1" ]; then - logger -t xcat -p local4.info "remoteshell: sending xcatflowrequest $master 3001" + logger -t $log_label -p local4.info "remoteshell: sending xcatflowrequest $master 3001" /$xcatpost/xcatflowrequest $master 3001 rc=$? if [ $rc -ne 0 ]; then - logger -t xcat -p local4.info "remoteshell: error from xcatflowrequest (rc=$rc), will not use flow control" + logger -t $log_label -p local4.info "remoteshell: error from xcatflowrequest (rc=$rc), will not use flow control" useflowcontrol=0 fi fi getcredentials.awk xcat_secure_pw:root | grep -E -v '|'|sed -e 's/<//' -e 's/&/&/' -e 's/"/"/' -e "s/'/'/" > /tmp/secure_root_hash - logger -t xcat -p local4.info "remoteshell: gathering password hash for root" + logger -t $log_label -p local4.info "remoteshell: gathering password hash for root" #check whether the message is an error or not grep -E '' /tmp/secure_root_hash > /dev/null if [ $? -ne 0 ]; then @@ -498,11 +503,11 @@ if [ "x$SECUREROOT" = "x1" ] && [ "x$UPDATENODE" != "x1" ]; then fi if [ $useflowcontrol = "1" ]; then #first contact daemon xcatflowrequest 3001 - logger -t xcat -p local4.info "remoteshell: sending xcatflowrequest $master 3001" + logger -t $log_label -p local4.info "remoteshell: sending xcatflowrequest $master 3001" /$xcatpost/xcatflowrequest $master 3001 rc=$? if [ $rc -ne 0 ]; then - logger -t xcat -p local4.info "remoteshell: error from xcatflowrequest (rc=$rc), will not use flow control" + logger -t $log_label -p local4.info "remoteshell: error from xcatflowrequest (rc=$rc), will not use flow control" useflowcontrol=0 fi fi @@ -525,12 +530,12 @@ if [ "x$SECUREROOT" = "x1" ] && [ "x$UPDATENODE" != "x1" ]; then fi rm /tmp/secure_root_hash if [ "x" != "x$ERR_MSG" ]; then - logger -t xcat -p local4.err "Failed to acquire secure root password: $ERR_MSG" + logger -t $log_label -p local4.err "Failed to acquire secure root password: $ERR_MSG" fi fi # start up the sshd for syncfiles postscript to do the sync work -logger -t xcat -p local4.info "start up sshd" +logger -t $log_label -p local4.info "start up sshd" if [[ $OSVER == ubuntu* || $OSVER == debian* ]] then if [ ! -d /var/run/sshd ];then diff --git a/xCAT/postscripts/syncfiles b/xCAT/postscripts/syncfiles index 4990d7a63..1ff4088f2 100755 --- a/xCAT/postscripts/syncfiles +++ b/xCAT/postscripts/syncfiles @@ -7,17 +7,23 @@ # ##################################################### +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi +bname=$(basename $0) #statelite does not support syncfiles if [ -d /.statelite ]; then echo "Statelite does not support syncfiles, nothing to do..." - logger -t xcat -p local4.info "Statelite does not support syncfiles, nothing to do..." + logger -t $log_label -p local4.info "Statelite does not support syncfiles, nothing to do..." exit 0 fi # do nothing when UPDATENODE=1 because it is done from the top down if [ -n "$UPDATENODE" ] && [ $UPDATENODE -eq 1 ]; then #echo " Did not sync any files. Use updatenode -F to sync the files." - logger -t xcat -p local4.err "$0: Did not sync any files. Use updatenode -F to sync the files." + logger -t $log_label -p local4.warning "$bname: Did not sync any files. Use updatenode -F to sync the files." exit 0 fi @@ -25,7 +31,7 @@ fi #do nothing id there is no sync file template for the node if [ -n "$NOSYNCFILES" ] && [ $NOSYNCFILES -eq 1 ]; then echo " Did not sync any files." - logger -t xcat -p local4.err "$0: there is no sync file template for the node" + logger -t $log_label -p local4.info "$bname: there is no sync file template for the node" exit 0 fi @@ -34,13 +40,13 @@ if [ ! -e "/usr/bin/rsync" ]; then [ -e "/usr/bin/scp" ] && RCP="/usr/bin/scp" fi -logger -t xcat -p local4.info "Performing syncfiles postscript" +logger -t $log_label -p local4.info "Performing syncfiles postscript" osname=`uname` # run the xdcp on the MN/SN xcatpostdir="/xcatpost" -logger -t xcat -p local4.info "$0: the OS name = $osname" +logger -t $log_label -p local4.info "$bname: the OS name = $osname" quit="no" count=5 returncode=0 @@ -70,9 +76,9 @@ done if [ $returncode -eq 0 ] then - logger -t xcat -p local4.info "$0: Perform Syncing File action successfully" + logger -t $log_label -p local4.info "$bname: Perform Syncing File action successfully" else - logger -t xcat -p local4.err "$0: Perform Syncing File action encountered error" + logger -t $log_label -p local4.err "$bname: Perform Syncing File action encountered error" fi [ $returncode -eq 0 ] diff --git a/xCAT/postscripts/syslog b/xCAT/postscripts/syslog index e0c964589..d9b971a3b 100755 --- a/xCAT/postscripts/syslog +++ b/xCAT/postscripts/syslog @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash # IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html #------------------------------------------------------------------------------- @@ -13,6 +13,12 @@ # OSVER: possible values are sles10, fedora8, redhat5, aix etc. #=cut #------------------------------------------------------------------------------- +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi + if [ "$SYSLOG" = "ignore" ]; then echo "The value of syslog is '$SYSLOG'." exit 0 @@ -303,7 +309,7 @@ if [ -e "/sbin/rsyslogd" -o -e "/usr/sbin/rsyslogd" ]; then if ( pmatch $SYSLOGPROD "*rsyslogd*" ) && ( pmatch $SYSLOGVER "8*" ); then config_rsyslog_V8 #keep a record - logger -t xcat -p local4.info "Install: rsyslog version 8 setup" + logger -t $log_label -p local4.info "Install: rsyslog version 8 setup" exit 0 fi fi @@ -527,5 +533,5 @@ else fi #keep a record -logger -t xcat -p local4.info "Install: syslog setup" +logger -t $log_label -p local4.info "Install: syslog setup" exit 0 diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index d1af92cc3..f0671501d 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -893,6 +893,7 @@ run_ps () { else log_label=\"xcat.updatenode.\"\$scriptype fi + export LOGLABEL=\$log_label if [ -f \$1 ]; then echo \"\$scriptype start..: \$1\" msgutil_r \"\$MASTER_IP\" \"info\" "\"\$scriptype start..: \$1\"" \"\$logfile\" \"\$log_label\" @@ -993,7 +994,6 @@ fi #tell user it is done when this is called by updatenode command if [ "$MODE" = "1" ] || [ "$MODE" = "2" ] || [ "$MODE" = "5" ]; then - echolog "info" "returned from postscript" echolog "info" "=============updatenode ending====================" fi diff --git a/xCAT/postscripts/xcatpostinit1.netboot b/xCAT/postscripts/xcatpostinit1.netboot index f21ba9c73..0128cefeb 100755 --- a/xCAT/postscripts/xcatpostinit1.netboot +++ b/xCAT/postscripts/xcatpostinit1.netboot @@ -19,9 +19,15 @@ if [ -x /etc/rc.d/init.d/functions ]; then . /etc/rc.d/init.d/functions fi +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi + XCATSERVER=$(grep --only-matching "\" /proc/cmdline |cut -d= -f2 |cut -d: -f1 2>/dev/null) -logger -t xcat -p local4.info "$0: action is $1" +logger -t $log_label -p local4.info "$0: action is $1" case $1 in restart) $0 stop @@ -29,11 +35,11 @@ restart) ;; status) echo -n "xcatpostinit runs only at boot, runs additional post scripts" - logger -t xcat -p local4.info "xcatpostinit runs only at boot, runs additional post scripts" + logger -t $log_label -p local4.info "xcatpostinit runs only at boot, runs additional post scripts" ;; stop) echo -n "nothing to stop " - logger -t xcat -p local4.info "nothing to stop" + logger -t $log_label -p local4.info "nothing to stop" grep nonodestatus /proc/cmdline 2>/dev/null || [ -n "$XCATSERVER" ] && /xcatpost/updateflag.awk $XCATSERVER 3002 "installstatus powering-off" ;; start) @@ -55,7 +61,7 @@ start) # Test for script existance if ! [ -x "$SCRIPT" ]; then - msg "can't locate executable $SCRIPT" + logger -t $log_label -p local4.info "Unable to locate script $SCRIPT." grep nonodestatus /proc/cmdline 2>/dev/null || [ -n "$XCATSERVER" ] && /xcatpost/updateflag.awk $XCATSERVER 3002 "installstatus failed" exit -1 fi @@ -63,10 +69,10 @@ start) # Run $SCRIPT according to node type grep nonodestatus /proc/cmdline 2>/dev/null || [ -n "$XCATSERVER" ] && /xcatpost/updateflag.awk $XCATSERVER 3002 "installstatus postbooting" if [ $STATELITE -ne 0 ]; then - logger -t xcat -p local4.info "Call $SCRIPT for statelite mode" + logger -t $log_label -p local4.info "Call $SCRIPT for statelite mode" "$SCRIPT" 4 else - logger -t xcat -p local4.info "Call $SCRIPT for stateless mode" + logger -t $log_label -p local4.info "Call $SCRIPT for stateless mode" "$SCRIPT" fi ;; diff --git a/xCAT/postscripts/xcatpostinit1.service b/xCAT/postscripts/xcatpostinit1.service index 99ec0353f..9ad4407cf 100644 --- a/xCAT/postscripts/xcatpostinit1.service +++ b/xCAT/postscripts/xcatpostinit1.service @@ -6,6 +6,7 @@ After=network.target rsyslog.service Type=oneshot ExecStart=/opt/xcat/xcatpostinit1 start ExecStop=/opt/xcat/xcatpostinit1 stop +StandardOutput=null RemainAfterExit=yes [Install] From 50d282584601f7805c0777434d3c8d90f8f981df Mon Sep 17 00:00:00 2001 From: huweihua Date: Tue, 30 Oct 2018 22:44:45 -0400 Subject: [PATCH 026/121] fix issue #5735 --- xCAT-test/autotest/testcase/installation/setup_vm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-test/autotest/testcase/installation/setup_vm b/xCAT-test/autotest/testcase/installation/setup_vm index e863b21fc..176b34546 100644 --- a/xCAT-test/autotest/testcase/installation/setup_vm +++ b/xCAT-test/autotest/testcase/installation/setup_vm @@ -1,7 +1,7 @@ start:setup_vm description:reset up vm environment if need label:others -cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" -a "__GETNODEATTR($$CN,mgt)__" != "openbmc" ];then echo "CN node $$CN is a vm which mgt is __GETNODEATTR($$CN,mgt)__, start to recreate the vm now"; echo "rpower $$CN off"; rpower $$CN off; sleep 3; echo "rpower $$CN stat"; rpower $$CN stat; var=`expr substr "__GETNODEATTR($$CN,vmstorage)__" 1 3`; echo "The disk create way of $$CN is $var"; if [ "$var" = "phy" ]; then echo "mkvm $$CN"; mkvm $$CN; echo "rmvm $$CN -f -p"; rmvm $$CN -f -p; echo "mkvm $$CN"; mkvm $$CN; exit $?; elif [ "$var" = "dir" ]; then echo "mkvm $$CN -s 20G"; mkvm $$CN -s 20G; echo "rmvm $$CN -f -p"; rmvm $$CN -f -p; echo "mkvm $$CN -s 20G"; mkvm $$CN -s 20G; exit $?; elif ["$var" = "nfs" -o "$var" = "lvm" ];then echo "Need to fix me"; exit 2; else echo "unsupported disk creation way"; exit 3;fi;else echo "CN node $$CN is a non-VM; do not need to recreate it";fi +cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" -a "__GETNODEATTR($$CN,mgt)__" != "openbmc" ];then echo "CN node $$CN is a vm which mgt is __GETNODEATTR($$CN,mgt)__, start to recreate the vm now"; echo "rpower $$CN off"; rpower $$CN off; sleep 3; echo "rpower $$CN stat"; rpower $$CN stat; var=`expr substr "__GETNODEATTR($$CN,vmstorage)__" 1 3`; echo "The disk create way of $$CN is $var"; if [ "$var" = "phy" ]; then echo "mkvm $$CN"; mkvm $$CN; echo "rmvm $$CN -f -p"; rmvm $$CN -f -p; echo "mkvm $$CN"; mkvm $$CN; exit $?; elif [ "$var" = "dir" ]; then echo "mkvm $$CN -s 20G -f"; mkvm $$CN -s 20G -f; echo "rmvm $$CN -f -p"; rmvm $$CN -f -p; echo "mkvm $$CN -s 20G -f"; mkvm $$CN -s 20G -f; exit $?; elif ["$var" = "nfs" -o "$var" = "lvm" ];then echo "Need to fix me"; exit 2; else echo "unsupported disk creation way"; exit 3;fi;else echo "CN node $$CN is a non-VM; do not need to recreate it";fi check:rc==0 cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" -a "__GETNODEATTR($$CN,mgt)__" != "openbmc" ]; then echo "CN node is a vm, need to repower it on"; echo "rpower $$CN on"; rpower $$CN on; else echo "CN node $$CN is a non-VM; do not need to repower on it"; fi @@ -13,7 +13,7 @@ check:output=~on cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" -a "__GETNODEATTR($$CN,mgt)__" != "openbmc" ]; then tabdump -w node==$$CN kvm_nodedata; fi check:rc==0 -cmd:if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" -a "__GETNODEATTR($$SN,mgt)__" != "openbmc" ];then echo "SN node $$SN is a vm which mgt is __GETNODEATTR($$SN,mgt)__, start to recreate the vm now"; echo "rpower $$SN off"; rpower $$SN off; sleep 3; echo "rpower $$SN stat"; rpower $$SN stat; var=`expr substr "__GETNODEATTR($$SN,vmstorage)__" 1 3`; echo "The disk create way of $$SN is $var"; if [ "$var" = "phy" ]; then echo "mkvm $$SN"; mkvm $$SN; echo "rmvm $$SN -f -p"; rmvm $$SN -f -p; echo "mkvm $$SN"; mkvm $$SN; exit $?; elif [ "$var" = "dir" ]; then echo "mkvm $$SN -s 20G"; mkvm $$SN -s 20G; echo "rmvm $$SN -f -p"; rmvm $$SN -f -p; echo "mkvm $$SN -s 20G"; mkvm $$SN -s 20G; exit $?; elif ["$var" = "nfs" -o "$var" = "lvm" ];then echo "Need to fix me"; exit 2; else echo "unsupported disk creation way"; exit 3;fi;else echo "SN node $$SN is a non-VM; do not need to recreate it";fi +cmd:if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" -a "__GETNODEATTR($$SN,mgt)__" != "openbmc" ];then echo "SN node $$SN is a vm which mgt is __GETNODEATTR($$SN,mgt)__, start to recreate the vm now"; echo "rpower $$SN off"; rpower $$SN off; sleep 3; echo "rpower $$SN stat"; rpower $$SN stat; var=`expr substr "__GETNODEATTR($$SN,vmstorage)__" 1 3`; echo "The disk create way of $$SN is $var"; if [ "$var" = "phy" ]; then echo "mkvm $$SN"; mkvm $$SN; echo "rmvm $$SN -f -p"; rmvm $$SN -f -p; echo "mkvm $$SN"; mkvm $$SN; exit $?; elif [ "$var" = "dir" ]; then echo "mkvm $$SN -s 20G -f"; mkvm $$SN -s 20G -f; echo "rmvm $$SN -f -p"; rmvm $$SN -f -p; echo "mkvm $$SN -s 20G -f"; mkvm $$SN -s 20G -f; exit $?; elif ["$var" = "nfs" -o "$var" = "lvm" ];then echo "Need to fix me"; exit 2; else echo "unsupported disk creation way"; exit 3;fi;else echo "SN node $$SN is a non-VM; do not need to recreate it";fi check:rc==0 From 17dea7d5904ddd23c6180c65586b1a3b5083d619 Mon Sep 17 00:00:00 2001 From: Yuan Bai Date: Wed, 31 Oct 2018 14:05:53 +0800 Subject: [PATCH 027/121] log tag support for servicenode and fix updatenode testcase (#5749) --- xCAT/postscripts/otherpkgs | 2 +- xCAT/postscripts/servicenode | 126 +++++++++++++++++---------------- xCAT/postscripts/xcatdsklspost | 1 + 3 files changed, 67 insertions(+), 62 deletions(-) diff --git a/xCAT/postscripts/otherpkgs b/xCAT/postscripts/otherpkgs index 0eb856964..00a84f8e8 100755 --- a/xCAT/postscripts/otherpkgs +++ b/xCAT/postscripts/otherpkgs @@ -232,7 +232,7 @@ if [ -z "$UPDATENODE" ] || [ $UPDATENODE -ne 1 ]; then fi if [ -z "$OTHERPKGS_INDEX" ]; then - echo "$0: no extra rpms to install" + echo "$(basename $0): no extra rpms to install" exit 0 fi diff --git a/xCAT/postscripts/servicenode b/xCAT/postscripts/servicenode index 91c026ff9..7dc208e97 100755 --- a/xCAT/postscripts/servicenode +++ b/xCAT/postscripts/servicenode @@ -62,6 +62,10 @@ my $msg = ""; $::osname = `uname`; chomp $::osname; +my $log_label=$ENV{'LOGLABEL'}; +if (!$log_label) { + $log_label="xcat" +} $::sdate = `/bin/date`; chomp $::sdate; @@ -91,8 +95,8 @@ if ($ENV{UPDATESECURITY} && $ENV{UPDATESECURITY} eq "1") { my $mounted = xCAT::Utils->isMounted($installdir); if ($mounted == 0) { # not mounted if (&runcmd("mkdir -p $installdir/postscripts; cp -p -R /xcatpost/* $installdir/postscripts > /dev/null 2>&1") != 0) { - $msg = "$::sdate servicenode: Could not copy postscripts to $installdir/postscripts.\n"; - `logger -t xcat -p local4.warning $msg`; + $msg = "servicenode: Could not copy postscripts to $installdir/postscripts.\n"; + `logger -t $log_label -p local4.warning $msg`; } } @@ -104,9 +108,9 @@ if ($ENV{UPDATESECURITY} && $ENV{UPDATESECURITY} eq "1") { &getcreds; } else { # Linux # call xcatserver,xcatclient to transfer the SSL credentials and cfgloc - `logger -t xcat -p local4.info $::sdate servicenode: running 'xcatserver -d'`; + `logger -t $log_label -p local4.info servicenode: running 'xcatserver -d'`; &runcmd("xcatserver -d"); - `logger -t xcat -p local4.info $::sdate servicenode: running 'xcatclient -d'`; + `logger -t $log_label -p local4.info servicenode: running 'xcatclient -d'`; &runcmd("xcatclient -d"); } @@ -120,10 +124,10 @@ if ($::osname eq 'AIX') # AIX service node setup $rc = &setupAIXsn; if ($rc != 0) { - my $msg = "$::sdate servicenode: One or more errors occurred when attempting to configure node $::hname as an xCAT service node.\n"; + my $msg = "servicenode: One or more errors occurred when attempting to configure node $::hname as an xCAT service node.\n"; # print "$msg\n"; - `logger -t xcat -p local4.warning $msg`; + `logger -t $log_label -p local4.warning $msg`; } } else @@ -132,21 +136,21 @@ else # remove OpenIPMI-tools # install xcat from /install/xcat # Copy Certificates, and config file to apprpriate directories - # from /install and restart xcatd + # from /install and restart xcat &runcmd("rpm -e OpenIPMI-tools"); ©certs; - `logger -t xcat -p local4.info $::sdate servicenode: running 'xcatserver -d'`; + `logger -t $log_label -p local4.info servicenode: running 'xcatserver -d'`; &runcmd("xcatserver -d"); - `logger -t xcat -p local4.info $::sdate servicenode: running 'xcatclient -d'`; + `logger -t $log_label -p local4.info servicenode: running 'xcatclient -d'`; &runcmd("xcatclient -d"); - # start xcatd if it is not up when stateless or statelite + # start xcat if it is not up when stateless or statelite if ($ENV{NODESETSTATE} && ($ENV{NODESETSTATE} eq "netboot" || $ENV{NODESETSTATE} eq "statelite")) { $rc = &runcmd("$::XCATROOT/bin/lsxcatd -v 2>/dev/null || service xcatd restart"); if ($rc != 0) { - $msg = "$::sdate servicenode: Could not start xcatd.\n\n $::outref \n"; - `logger -t xcat -p local4.warning $msg`; + $msg = " servicenode: Could not start xcat.\n\n $::outref \n"; + `logger -t $log_label -p local4.warning $msg`; } } } @@ -175,8 +179,8 @@ sub runcmd $rc = $? >> 8; if ($rc > 0) { - my $msg = "$::sdate servicenode: $cmd returned rc=$rc \n"; - `logger -t xcat -p local4.info $msg`; + my $msg = "servicenode: $cmd returned rc=$rc \n"; + `logger -t $log_label -p local4.info $msg`; return 1; } } @@ -193,14 +197,14 @@ sub setupAIXsn # makes it a service node if (&runcmd("touch /etc/xCATSN") != 0) { - $msg = "$::sdate servicenode: Could not touch /etc/xCATSN\n"; - `logger -t xcat -p local4.warning $msg`; + $msg = "servicenode: Could not touch /etc/xCATSN\n"; + `logger -t $log_label -p local4.warning $msg`; } # copy the postscripts to /install/postscripts if (&runcmd("mkdir -p $installdir/postscripts; cp -p -R /xcatpost/* $installdir/postscripts > /dev/null 2>&1") != 0) { - $msg = "$::sdate servicenode: Could not copy postscripts to $installdir/postscripts.\n"; - `logger -t xcat -p local4.warning $msg`; + $msg = "servicenode: Could not copy postscripts to $installdir/postscripts.\n"; + `logger -t $log_label -p local4.warning $msg`; } # check if /install/postscripts is in /etc/exports @@ -218,16 +222,16 @@ sub setupAIXsn } if ($res != 0) { - $msg = "$::sdate servicenode: Could not update the /etc/exports file.\n"; - `logger -t xcat -p local4.warning $msg`; + $msg = "servicenode: Could not update the /etc/exports file.\n"; + `logger -t $log_label -p local4.warning $msg`; } } # make sure we don't have xCATMN file if (-f "/etc/xCATMN") { if (&runcmd("rm /etc/xCATMN") != 0) { - $msg = "$::sdate servicenode: Could not remove /etc/xCATMN\n"; - `logger -t xcat -p local4.warning $msg`; + $msg = "servicenode: Could not remove /etc/xCATMN\n"; + `logger -t $log_label -p local4.warning $msg`; } } @@ -241,14 +245,14 @@ sub setupAIXsn my $mkssys_cmd = "mkssys -p $::XCATROOT/sbin/xcatd -s xcatd -u 0 -S -n 15 -f 15 -a '-f' "; if (&runcmd($mkssys_cmd) != 0) { - $msg = "$::sdate servicenode: Could not create subsystem for xcatd. It maybe already have been added.\n"; - `logger -t xcat -p local4.warning $msg`; + $msg = "servicenode: Could not create subsystem for xcatd. It maybe already have been added.\n"; + `logger -t $log_label -p local4.warning $msg`; } # start xcatd if (&runcmd("$::XCATROOT/sbin/restartxcatd") != 0) { - $msg = "$::sdate servicenode: Could not start xcatd.\n\n $::outref \n"; - `logger -t xcat -p local4.warning $msg`; + $msg = "servicenode: Could not start xcat.\n\n $::outref \n"; + `logger -t $log_label -p local4.warning $msg`; } # add xcatd to /etc/inittab??? @@ -259,31 +263,31 @@ sub setupAIXsn # error might just mean that the entry is already there! # $msg = "$::sdate servicenode: Could not add xcatd to /etc/inittab.\n"; - # `logger -t xcat $msg`; + # `logger -t $log_label $msg`; } # set ulimit - so we can copy over large files - like spot if (&runcmd("/usr/bin/chuser fsize=-1 root") != 0) { - $msg = "$::sdate servicenode: Could not change ulimit\n"; - `logger -t xcat -p local4.warning $msg`; + $msg = "servicenode: Could not change ulimit\n"; + `logger -t $log_label -p local4.warning $msg`; } # stop inetd, make sure bootp & tftp are in /etc/inetd.conf and restart if (&runcmd("stopsrc -s inetd") != 0) { - $msg = "$::sdate servicenode: Could not stop inetd.\n"; - `logger -t xcat -p local4.warning $msg`; + $msg = "servicenode: Could not stop inetd.\n"; + `logger -t $log_label -p local4.warning $msg`; } my $tmp_inetd_file = "/etc/inetd.conf.tmp"; unless (open(TMPINETD, ">>$tmp_inetd_file")) { - $msg = "$::sdate servicenode: Could not open $tmp_inetd_file.\n"; - `logger -t xcat -p local4.warning $msg`; + $msg = "servicenode: Could not open $tmp_inetd_file.\n"; + `logger -t $log_label -p local4.warning $msg`; } my $inetd_file_name = "/etc/inetd.conf"; unless (open(INETDFILE, "<$inetd_file_name")) { - $msg = "$::sdate servicenode: Could not open $inetd_file_name.\n"; - `logger -t xcat -p local4.warning $msg`; + $msg = "servicenode: Could not open $inetd_file_name.\n"; + `logger -t $log_label -p local4.warning $msg`; } while (my $l = ) { @@ -299,19 +303,19 @@ sub setupAIXsn close(INETDFILE); if (&runcmd("mv $tmp_inetd_file $inetd_file_name > /dev/null 2>&1") != 0) { - $msg = "$::sdate servicenode: Could not update /etc/inetd.conf.\n"; - `logger -t xcat -p local4.warning $msg`; + $msg = "servicenode: Could not update /etc/inetd.conf.\n"; + `logger -t $log_label -p local4.warning $msg`; } if (&runcmd("startsrc -s inetd") != 0) { - $msg = "$::sdate servicenode: Could not restart inetd.\n"; - `logger -t xcat -p local4.warning $msg`; + $msg = "servicenode: Could not restart inetd.\n"; + `logger -t $log_label -p local4.warning $msg`; } # do nim master setup - master fileset already installed if (&runcmd("/usr/sbin/nim_master_setup -a mk_resource=no") != 0) { - $msg = "$::sdate servicenode: Could not run nim_master_setup.\n"; - `logger -t xcat -p local4.warning $msg`; + $msg = "servicenode: Could not run nim_master_setup.\n"; + `logger -t $log_label -p local4.warning $msg`; } # @@ -321,8 +325,8 @@ sub setupAIXsn # restore the original .rhosts that was removed by NIM setup if (&runcmd("cp /.rhosts.prev /.rhosts ") != 0) { - $msg = "$::sdate servicenode: Could not restore the .rhosts file.\n"; - `logger -t xcat -p local4.warning $msg`; + $msg = "servicenode: Could not restore the .rhosts file.\n"; + `logger -t $log_label -p local4.warning $msg`; } return 0; @@ -352,8 +356,8 @@ sub getcreds &runcmd($cmd); } else { - $msg = "$::sdate servicenode: Could not get client-cred.pem file.\n"; - `logger -t xcat -p local4.warning $msg`; + $msg = "servicenode: Could not get client-cred.pem file.\n"; + `logger -t $log_label -p local4.warning $msg`; } $response = &getresponse("xcat_server_cred"); @@ -370,8 +374,8 @@ sub getcreds &runcmd($cmd); } else { - $msg = "$::sdate servicenode: Could not get server-cred.pem file.\n"; - `logger -t xcat -p local4.warning $msg`; + $msg = "servicenode: Could not get server-cred.pem file.\n"; + `logger -t $log_label -p local4.warning $msg`; } $response = &getresponse("xcat_cfgloc"); @@ -401,8 +405,8 @@ sub getcreds &runcmd($cmd); } else { - $msg = "$::sdate servicenode: Could not get cfgloc file.\n"; - `logger -t xcat -p local4.warning $msg`; + $msg = "servicenode: Could not get cfgloc file.\n"; + `logger -t $log_label -p local4.warning $msg`; } return 0; @@ -450,8 +454,8 @@ sub getresponse } unless ($sock) { - my $msg = "$::sdate servicenode: Cannot connect to host \'$::servnode\'\n"; - `logger -t xcat -p local4.err $msg`; + my $msg = "servicenode: Cannot connect to host \'$::servnode\'\n"; + `logger -t $log_label -p local4.err $msg`; print $msg; return undef; } @@ -507,8 +511,8 @@ sub openlistener unless (defined $pid) { # fork failed - $msg = "$::sdate servicenode: Could not fork process.\n"; - `logger -t xcat -p local4.err $msg`; + $msg = "servicenode: Could not fork process.\n"; + `logger -t $log_label -p local4.err $msg`; #print $msg; return undef; @@ -528,8 +532,8 @@ sub openlistener ); unless ($listener) { - my $msg = "$::sdate servicenode: Cannot open socket on \'$node\'\n"; - `logger -t xcat -p local4.err $msg`; + my $msg = "servicenode: Cannot open socket on \'$node\'\n"; + `logger -t $log_label -p local4.err $msg`; print $msg; exit 1; } @@ -583,8 +587,8 @@ sub copycerts } else { - $msg = "$::sdate servicenode: /xcatpost/_xcat directory does not exist\n"; - `logger -t xcat -p local4.warning $msg`; + $msg = "servicenode: /xcatpost/_xcat directory does not exist\n"; + `logger -t $log_label -p local4.warning $msg`; } if (-d "/xcatpost/ca") @@ -602,8 +606,8 @@ sub copycerts } else { - $msg = "$::sdate servicenode: /xcatpost/ca directory does not exist\n"; - `logger -t xcat -p local4.warning $msg`; + $msg = "servicenode: /xcatpost/ca directory does not exist\n"; + `logger -t $log_label -p local4.warning $msg`; } @@ -624,8 +628,8 @@ sub copycerts } else { - $msg = "$::sdate servicenode: /xcatpost/_xcat directory does not exist\n"; - `logger -t xcat -p local4.warning $msg`; + $msg = "servicenode: /xcatpost/_xcat directory does not exist\n"; + `logger -t $log_label -p local4.warning $msg`; } } return $rc; diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index f0671501d..948f2de12 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -994,6 +994,7 @@ fi #tell user it is done when this is called by updatenode command if [ "$MODE" = "1" ] || [ "$MODE" = "2" ] || [ "$MODE" = "5" ]; then + echo "returned from postscript" echolog "info" "=============updatenode ending====================" fi From 5b13cbc9f31483c3998aa3902dae64f2e4507a59 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Wed, 31 Oct 2018 16:08:30 +0800 Subject: [PATCH 028/121] Revise the error handling for directory detecting --- xCAT-genesis-builder/xCAT-genesis-base.spec | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/xCAT-genesis-builder/xCAT-genesis-base.spec b/xCAT-genesis-builder/xCAT-genesis-base.spec index aa9f5bc4e..a7f121dee 100644 --- a/xCAT-genesis-builder/xCAT-genesis-base.spec +++ b/xCAT-genesis-builder/xCAT-genesis-base.spec @@ -72,7 +72,7 @@ end local function remove_directory(directory, level, prefix) local num_dirs = 0 local num_files = 0 - if posix.access(directory,"rw") then + if posix.access(directory, "rw") then local files = posix.dir(directory) local last_file_index = table.getn(files) table.sort(files) @@ -112,15 +112,17 @@ local function remove_directory_deep(directory) -- print(directory) - local info = assert(posix.stat(directory)) - if info.type == 'directory' then - num_dirs, num_files = remove_directory(directory, 0, '') + if posix.access(directory, "rw") then + local info = assert(posix.stat(directory)) + if info.type == 'directory' then + num_dirs, num_files = remove_directory(directory, 0, '') - -- printf('\ndropped %d directories, %d files\n', num_dirs, num_files) + -- printf('\ndropped %d directories, %d files\n', num_dirs, num_files) - posix.rmdir(directory) - else - posix.unlink(directory) + posix.rmdir(directory) + else + posix.unlink(directory) + end end end From 0e6365d8c6c8dcc99c7976f7898d025a4b56bec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=E1=B4=8F=C9=B4=C9=A2=20Jie?= Date: Wed, 31 Oct 2018 17:33:25 +0800 Subject: [PATCH 029/121] Fix github issue #5500. Do not restart service openibd in the installation stage (#5723) --- .../xcat/ib/scripts/Mellanox/mlnxofed_ib_install.v2 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/xCAT-server/share/xcat/ib/scripts/Mellanox/mlnxofed_ib_install.v2 b/xCAT-server/share/xcat/ib/scripts/Mellanox/mlnxofed_ib_install.v2 index f6ee043c7..e16445aac 100755 --- a/xCAT-server/share/xcat/ib/scripts/Mellanox/mlnxofed_ib_install.v2 +++ b/xCAT-server/share/xcat/ib/scripts/Mellanox/mlnxofed_ib_install.v2 @@ -331,11 +331,13 @@ EOF env -i "PATH=${PATH}" /tmp/ofed/mountpoint/mlnxofedinstall "${MLNXOFED_OPTS[@]}" #force openibd load all modules in need, restart again - sleep 1 - service openibd restart - if [ "$?" != "0" ] ;then - echo "[Error] service openibd restart failed." - exit 1 + if [ "$NODESETSTATE" = "boot" ]; then + sleep 1 + service openibd restart + if [ "$?" != "0" ]; then + echo "[Error] service openibd restart failed." + exit 1 + fi fi fi From 8ff0bb805e80aac8a0c042d0a9a35b7899e6dbfe Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 29 Oct 2018 14:48:23 -0400 Subject: [PATCH 030/121] Have xCAT client try IPv6 if IPv4 fails If IPv6 support is added to a system after xcat is running, then trying to reach 'localhost' may end up being '::1' instead of '127.0.0.1'. This will be fine after xCAT restarts from before IPv6 support being available, but until that time the daemon is IPv4 only. Have Client try IPv4 if IPv6 fails to accomodate this situation. --- perl-xCAT/xCAT/Client.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/Client.pm b/perl-xCAT/xCAT/Client.pm index 888c9242a..e6b1e1d04 100644 --- a/perl-xCAT/xCAT/Client.pm +++ b/perl-xCAT/xCAT/Client.pm @@ -232,7 +232,8 @@ sub submit_request { $pclient = IO::Socket::INET6->new( %connargs, ); - } else { + } + unless ($pclient) { $pclient = IO::Socket::INET->new( PeerAddr => $xcathost, Timeout => 15, From 5c910eca26c8aee83fdf38cae86d3a9521191aa7 Mon Sep 17 00:00:00 2001 From: yangsbj Date: Thu, 1 Nov 2018 05:00:05 -0400 Subject: [PATCH 031/121] add support for site.httpport for post.xcat and updatenode --- xCAT-server/lib/xcat/plugins/updatenode.pm | 31 +++++++-- .../share/xcat/install/scripts/post.xcat | 8 ++- xCAT/postscripts/xcatdsklspost | 65 ++++++++++++++----- 3 files changed, 80 insertions(+), 24 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/updatenode.pm b/xCAT-server/lib/xcat/plugins/updatenode.pm index e53e7aec7..60f8403ed 100644 --- a/xCAT-server/lib/xcat/plugins/updatenode.pm +++ b/xCAT-server/lib/xcat/plugins/updatenode.pm @@ -1564,6 +1564,11 @@ sub updatenoderunps if ($fc[0] && ($fc[0] =~ /1|Yes|yes|YES|Y|y/)) { $flowcontrol = 1; } + my $httpport="80"; + my @hports=xCAT::TableUtils->get_site_attribute("httpport"); + if ($hports[0]){ + $httpport=$hports[0]; + } # if running postscript report status here, if requested. if ((defined($request->{status})) && ($request->{status} eq "yes")) { @@ -1625,10 +1630,10 @@ sub updatenoderunps if ($::SETSERVER) { # update the xcatinfo file on the node and run setuppostbootscripts $runpscmd = -"$installdir/postscripts/xcatdsklspost $mode -M $snkey '$postscripts' --tftp $tftpdir --installdir $installdir --nfsv4 $nfsv4 -c"; +"$installdir/postscripts/xcatdsklspost $mode -M $snkey:$httpport '$postscripts' --tftp $tftpdir --installdir $installdir --nfsv4 $nfsv4 -c"; } else { $runpscmd = -"$installdir/postscripts/xcatdsklspost $mode -m $snkey '$postscripts' --tftp $tftpdir --installdir $installdir --nfsv4 $nfsv4 -c" +"$installdir/postscripts/xcatdsklspost $mode -m $snkey:$httpport '$postscripts' --tftp $tftpdir --installdir $installdir --nfsv4 $nfsv4 -c" } # add flowcontrol flag @@ -2084,6 +2089,12 @@ sub updatenodesoftware $flowcontrol = 1; } + my $httpport="80"; + my @hports=xCAT::TableUtils->get_site_attribute("httpport"); + if ($hports[0]){ + $httpport=$hports[0]; + } + # this drives getdata to report status complete for software updatees $::TYPECALL = "S"; @@ -2117,7 +2128,7 @@ sub updatenodesoftware my $cmd; my $args1; $cmd = -"$installdir/postscripts/xcatdsklspost 2 -m $snkey 'ospkgs,otherpkgs,syscloneimgupdate' --tftp $tftpdir --installdir $installdir --nfsv4 $nfsv4 -c"; +"$installdir/postscripts/xcatdsklspost 2 -m $snkey:$httpport 'ospkgs,otherpkgs,syscloneimgupdate' --tftp $tftpdir --installdir $installdir --nfsv4 $nfsv4 -c"; # add flowcontrol flag if ($flowcontrol == 1) { @@ -3301,6 +3312,12 @@ sub updateOS # Get install directory my $installDIR = xCAT::TableUtils->getInstallDir(); + my $httpport="80"; + my @hports=xCAT::TableUtils->get_site_attribute("httpport"); + if ($hports[0]){ + $httpport=$hports[0]; + } + # Get HTTP server my $http; my @httpd = xCAT::NetworkUtils->my_ip_facing($node); @@ -3372,7 +3389,7 @@ sub updateOS { # SUSE repository path - http://10.1.100.1/install/sles10.3/s390x/1/ - $path = "http://$http$installDIR/$os/$arch/1/"; + $path = "http://$http:$httpport$installDIR/$os/$arch/1/"; if (!(-e "$installDIR/$os/$arch/1/")) { push @{ $rsp->{data} }, @@ -3406,7 +3423,7 @@ sub updateOS { # SUSE repository path - http://10.1.100.1/install/sles10.3/s390x/1/ - $path = "http://$http$installDIR/$os/$arch/1/"; + $path = "http://$http$httpport$installDIR/$os/$arch/1/"; if (!(-e "$installDIR/$os/$arch/1/")) { push @{ $rsp->{data} }, @@ -3438,7 +3455,7 @@ sub updateOS my $verifyOS = $os; $verifyOS =~ s/^\D+([\d.]+)$/$1/; if (xCAT::Utils->version_cmp($verifyOS, "7.0") < 0) { - $path = "http://$http$installDIR/$os/$arch/Server/"; + $path = "http://$http:$httpport$installDIR/$os/$arch/Server/"; if (!(-e "$installDIR/$os/$arch/Server/")) { push @{ $rsp->{data} }, @@ -3449,7 +3466,7 @@ sub updateOS } else { - $path = "http://$http$installDIR/$os/$arch/"; + $path = "http://$http:$httpport$installDIR/$os/$arch/"; if (!(-e "$installDIR/$os/$arch/")) { push @{ $rsp->{data} }, diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index fe4442c05..c6b3c7eec 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -8,6 +8,7 @@ export XCATIPORT=#TABLE:site:key=xcatiport:value# export INSTALLDIR=#TABLE:site:key=installdir:value# export TFTPDIR=#TABLE:site:key=tftpdir:value# export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#" +export HTTPPORT="#TABLE:site:key=httpport:value#" #INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib# @@ -27,6 +28,9 @@ fi if [[ $TFTPDIR != /* ]]; then TFTPDIR="/"$TFTPDIR fi +if [ -z "$HTTPPORT" ]; then + HTTPPORT="80" +fi NODESTATUS=$(echo "$NODESTATUS"| tr -d \'\"| tr A-Z a-z) @@ -89,7 +93,7 @@ if [ ! -x /usr/bin/wget ]; then sleep 36500d fi -wget -l inf -N -r --waitretry=10 --random-wait --retry-connrefused -e robots=off -nH --cut-dirs=2 --reject "index.html*" --no-parent -t 20 -T 60 http://$MASTER_IP$INSTALLDIR/postscripts/ -P /xcatpost 2> /tmp/wget.log +wget -l inf -N -r --waitretry=10 --random-wait --retry-connrefused -e robots=off -nH --cut-dirs=2 --reject "index.html*" --no-parent -t 20 -T 60 http://${MASTER_IP}:${HTTPPORT}${INSTALLDIR}/postscripts/ -P /xcatpost 2> /tmp/wget.log if [ "$?" != "0" ]; then msgutil_r "$MASTER_IP" "error" "failed to download postscripts from http://$MASTER_IP$INSTALLDIR/postscripts/,check /tmp/wget.log on the node, halt ..." "/var/log/xcat/xcat.log" "$log_label" /tmp/updateflag $MASTER $XCATIPORT "installstatus failed" @@ -106,7 +110,7 @@ export NODE=#TABLE:nodelist:THISNODE:node# msgutil_r "$MASTER_IP" "info" "trying to get mypostscript from $MASTER_IP..." "/var/log/xcat/xcat.log" "$log_label" -wget -N --waitretry=10 --random-wait --retry-connrefused -t 20 -T 60 http://$MASTER_IP$TFTPDIR/mypostscripts/mypostscript.$NODE -P /xcatpost 2> /tmp/wget.log +wget -N --waitretry=10 --random-wait --retry-connrefused -t 20 -T 60 http://${MASTER_IP}:${HTTPPORT}${TFTPDIR}/mypostscripts/mypostscript.$NODE -P /xcatpost 2> /tmp/wget.log if [ "$?" = "0" ]; then if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then msgutil_r "$MASTER_IP" "debug" "precreated mypostscript downloaded successfully" "/var/log/xcat/xcat.log" "$log_label" diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index 948f2de12..6fea01ef3 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -210,6 +210,30 @@ pmatch () return 1 # non-zero return code means string not matched by pattern } + +#parse the http server ":" +#usgae: parsehttpserver(,) +parsehttpserver () +{ + rawserver=$1 + option=$2 + server=$(echo "$rawserver"|cut -d: -f1 -s 2>/dev/null) + port="80" + if [ -z "$server" ];then + server=$rawserver + else + port=$(echo "$rawserver"|cut -d: -f2 -s 2>/dev/null) + fi + + if [ "$option" = "server" ];then + return $server + fi + + if [ "$option" = "port" ];then + return $port + fi +} + # Main # parse the arguments ARGNUM=$#; @@ -226,10 +250,14 @@ else MODE=$1 if [ $ARGNUM -gt 1 ]; then if [ $2 = "-m" ]; then - P_SIP=$3 + P_SVR=$3 + P_SIP=parsehttpserver "$P_SVR" 'server' + HTTPPORT=parsehttpserver "$P_SVR" 'port' else if [ $2 = "-M" ]; then - P_SIP=$3 + P_SVR=$3 + P_SIP=parsehttpserver "$P_SVR" 'server' + HTTPPORT=parsehttpserver "$P_SVR" 'port' new_ms=$P_SIP # -M means we will update xcatinfo file XCATSERVER fi fi @@ -395,7 +423,7 @@ else # for common mode MODE=1,2,3,5 (updatenode,moncfg,node deployment) # also update the XCATSERVER in the /etc/xcat/xcatinfo file with this # address if [ -n "$P_SIP" ]; then # passed in with updatenode on -M/-m - SIP=$P_SIP + SIP="${P_SIP}:${HTTPPORT}" download_postscripts $SIP if [ $? -eq 0 ]; then downloaded=1 @@ -420,8 +448,10 @@ else # for common mode MODE=1,2,3,5 (updatenode,moncfg,node deployment) # if not updatenode, then look in xcatinfo for the xcatmaster if [ -f /opt/xcat/xcatinfo ]; then SIP=`grep 'XCATSERVER' /opt/xcat/xcatinfo |cut -d= -f2` + HTTPPORT=`grep 'HTTPPORT' /opt/xcat/xcatinfo |cut -d= -f2` + [ -z "$HTTPPORT" ] && HTTPPORT="80" if [ -n "$SIP" ]; then - download_postscripts $SIP + download_postscripts ${SIP}:${HTTPPORT} if [ $? -eq 0 ]; then downloaded=1 fi @@ -438,15 +468,20 @@ else # for common mode MODE=1,2,3,5 (updatenode,moncfg,node deployment) if [ "$KEY" = "XCAT" ]; then TMP=`echo $i | awk -F= '{print $2}'` SIP=`echo $TMP | cut -d: -f1` - if [ -n "$SIP" ]; then - download_postscripts $SIP - if [ $? -eq 0 ]; then - downloaded=1 - break - fi - fi - fi - done + + elif [ "$KEY" = "HTTPPORT" ];then + HTTPPORT=$(echo $i | awk -F= '{print $1}') + [ -z "$HTTPPORT" ] && HTTPPORT="80" + fi + done + + if [ -n "$SIP" ]; then + download_postscripts "${SIP}:${HTTPPORT}" + if [ $? -eq 0 ]; then + downloaded=1 + break + fi + fi fi # download poscripts has not worked yet @@ -549,11 +584,11 @@ echolog "info" "trying to get mypostscript from $SIP..." max_retries=2 # try short hostname first if [ -n "$node_short" ]; then - download_mypostscript $SIP $node_short $max_retries $TFTPDIR + download_mypostscript "${SIP}:${HTTPPORT}" $node_short $max_retries $TFTPDIR if [ $? -ne 0 ]; then # try long hostname if [ "$node" != "$node_short" ]; then - download_mypostscript $SIP $node $postfix $max_retries $TFTPDIR + download_mypostscript "${SIP}:${HTTPPORT}" $node $postfix $max_retries $TFTPDIR fi fi fi From c4fe5ad5d9318cb29428bb436291c65ca1a217ff Mon Sep 17 00:00:00 2001 From: yangsbj Date: Thu, 1 Nov 2018 23:08:01 -0400 Subject: [PATCH 032/121] support site.httpport in dhcp lease and config --- xCAT-server/lib/xcat/plugins/dhcp.pm | 31 +++++++++++++++++++--------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index ff9e5b411..151133c7f 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -488,6 +488,12 @@ sub addnode my $ntent; my $tftpserver; + my $httpport="80"; + my @hports=xCAT::TableUtils->get_site_attribute("httpport"); + if ($hports[0]){ + $httpport=$hports[0]; + } + if ($chainents and $chainents->{$node}) { $chainent = $chainents->{$node}->[0]; } @@ -680,12 +686,12 @@ sub addnode if (proxydhcp($nrent)) { #proxy dhcp required in uefi invocation $lstatements = 'if option client-architecture = 00:00 or option client-architecture = 00:07 or option client-architecture = 00:09 { filename = \"\"; option vendor-class-identifier \"PXEClient\"; } else { filename = \"\"; }' . $lstatements; #If proxydhcp daemon is enable, use it. } else { - $lstatements = 'if option user-class-identifier = \"xNBA\" and option client-architecture = 00:00 { always-broadcast on; filename = \"http://' . $nxtsrv . '/tftpboot/xcat/xnba/nodes/' . $node . '\"; } else if option client-architecture = 00:07 or option client-architecture = 00:09 { filename = \"\"; option vendor-class-identifier \"PXEClient\"; } else if option client-architecture = 00:00 { filename = \"xcat/xnba.kpxe\"; } else { filename = \"\"; }' . $lstatements; #Only PXE compliant clients should ever receive xNBA + $lstatements = 'if option user-class-identifier = \"xNBA\" and option client-architecture = 00:00 { always-broadcast on; filename = \"http://' . $nxtsrv . ':' . $httpport . '/tftpboot/xcat/xnba/nodes/' . $node . '\"; } else if option client-architecture = 00:07 or option client-architecture = 00:09 { filename = \"\"; option vendor-class-identifier \"PXEClient\"; } else if option client-architecture = 00:00 { filename = \"xcat/xnba.kpxe\"; } else { filename = \"\"; }' . $lstatements; #Only PXE compliant clients should ever receive xNBA } } elsif ($douefi and $chainent->{currstate} ne "boot" and $chainent->{currstate} ne "iscsiboot") { - $lstatements = 'if option user-class-identifier = \"xNBA\" and option client-architecture = 00:00 { always-broadcast on; filename = \"http://' . $nxtsrv . '/tftpboot/xcat/xnba/nodes/' . $node . '\"; } else if option user-class-identifier = \"xNBA\" and option client-architecture = 00:09 { filename = \"http://' . $nxtsrv . '/tftpboot/xcat/xnba/nodes/' . $node . '.uefi\"; } else if option client-architecture = 00:07 { filename = \"xcat/xnba.efi\"; } else if option client-architecture = 00:00 { filename = \"xcat/xnba.kpxe\"; } else { filename = \"\"; }' . $lstatements; #Only PXE compliant clients should ever receive xNBA + $lstatements = 'if option user-class-identifier = \"xNBA\" and option client-architecture = 00:00 { always-broadcast on; filename = \"http://' . $nxtsrv . ':' . $httpport . '/tftpboot/xcat/xnba/nodes/' . $node . '\"; } else if option user-class-identifier = \"xNBA\" and option client-architecture = 00:09 { filename = \"http://' . $nxtsrv .':' . $httpport . '/tftpboot/xcat/xnba/nodes/' . $node . '.uefi\"; } else if option client-architecture = 00:07 { filename = \"xcat/xnba.efi\"; } else if option client-architecture = 00:00 { filename = \"xcat/xnba.kpxe\"; } else { filename = \"\"; }' . $lstatements; #Only PXE compliant clients should ever receive xNBA } else { - $lstatements = 'if option user-class-identifier = \"xNBA\" and option client-architecture = 00:00 { filename = \"http://' . $nxtsrv . '/tftpboot/xcat/xnba/nodes/' . $node . '\"; } else if option client-architecture = 00:00 { filename = \"xcat/xnba.kpxe\"; } else { filename = \"\"; }' . $lstatements; #Only PXE compliant clients should ever receive xNBA + $lstatements = 'if option user-class-identifier = \"xNBA\" and option client-architecture = 00:00 { filename = \"http://' . $nxtsrv .':' . $httpport . '/tftpboot/xcat/xnba/nodes/' . $node . '\"; } else if option client-architecture = 00:00 { filename = \"xcat/xnba.kpxe\"; } else { filename = \"\"; }' . $lstatements; #Only PXE compliant clients should ever receive xNBA } } } #TODO: warn when windows @@ -702,7 +708,7 @@ sub addnode } elsif ($nrent and $nrent->{netboot} and $nrent->{netboot} eq 'grub2') { $lstatements = 'filename = \"/boot/grub2/grub2-' . $node . '\";' . $lstatements; } elsif ($nrent and $nrent->{netboot} and $nrent->{netboot} eq 'petitboot') { - $lstatements = 'option conf-file \"http://' . $nxtsrv . '/tftpboot/petitboot/' . $node . '\";' . $lstatements; + $lstatements = 'option conf-file \"http://' . $nxtsrv .':' . $httpport . '/tftpboot/petitboot/' . $node . '\";' . $lstatements; } elsif ($nrent and $nrent->{netboot} and $nrent->{netboot} eq 'onie') { my $provmethod = $ntent->{provmethod}; if ($provmethod) { @@ -714,7 +720,7 @@ sub addnode my $validpkgdir; foreach my $mypkgdir (@pkgdirs){ if (-f $mypkgdir) { - $lstatements = 'if substring (option vendor-class-identifier,0,11) = \"onie_vendor\" { option www-server = \"http://' . $nxtsrv . $mypkgdir . '\";}' . $lstatements; + $lstatements = 'if substring (option vendor-class-identifier,0,11) = \"onie_vendor\" { option www-server = \"http://' . $nxtsrv .':' . $httpport . $mypkgdir . '\";}' . $lstatements; $validpkgdir = 1; last; } @@ -2383,6 +2389,11 @@ sub addnet my $mask = shift; my $nic; my $domain; + my $httpport="80"; + my @hports=xCAT::TableUtils->get_site_attribute("httpport"); + if ($hports[0]){ + $httpport=$hports[0]; + } my $firstoctet = $net; $firstoctet =~ s/^(\d+)\..*/$1/; if ($net eq "169.254.0.0" or ($firstoctet >= 224 and $firstoctet <= 239)) { @@ -2666,7 +2677,7 @@ sub addnet } } #for cumulus ZTP process - push @netent, " option cumulus-provision-url \"http://$tftp/install/postscripts/cumulusztp\";\n"; + push @netent, " option cumulus-provision-url \"http://$tftp.':' . $httpport/install/postscripts/cumulusztp\";\n"; my $ddnserver = $nameservers; $ddnserver =~ s/,.*//; @@ -2706,9 +2717,9 @@ sub addnet # $lstatements = 'if exists gpxe.bus-id { filename = \"\"; } else if exists client-architecture { filename = \"xcat/xnba.kpxe\"; } '.$lstatements; push @netent, " if option user-class-identifier = \"xNBA\" and option client-architecture = 00:00 { #x86, xCAT Network Boot Agent\n"; push @netent, " always-broadcast on;\n"; - push @netent, " filename = \"http://$tftp/tftpboot/xcat/xnba/nets/" . $net . "_" . $maskbits . "\";\n"; + push @netent, " filename = \"http://$tftp.':' . $httpport/tftpboot/xcat/xnba/nets/" . $net . "_" . $maskbits . "\";\n"; push @netent, " } else if option user-class-identifier = \"xNBA\" and option client-architecture = 00:09 { #x86, xCAT Network Boot Agent\n"; - push @netent, " filename = \"http://$tftp/tftpboot/xcat/xnba/nets/" . $net . "_" . $maskbits . ".uefi\";\n"; + push @netent, " filename = \"http://$tftp.':' . $httpport/tftpboot/xcat/xnba/nets/" . $net . "_" . $maskbits . ".uefi\";\n"; push @netent, " } else if option client-architecture = 00:00 { #x86\n"; push @netent, " filename \"xcat/xnba.kpxe\";\n"; push @netent, " } else if option vendor-class-identifier = \"Etherboot-5.4\" { #x86\n"; @@ -2724,10 +2735,10 @@ sub addnet push @netent, " filename \"elilo.efi\";\n"; push @netent, " } else if option client-architecture = 00:0e { #OPAL-v3\n "; - push @netent, " option conf-file = \"http://$tftp/tftpboot/pxelinux.cfg/p/" . $net . "_" . $maskbits . "\";\n"; + push @netent, " option conf-file = \"http://$tftp.':' . $httpport/tftpboot/pxelinux.cfg/p/" . $net . "_" . $maskbits . "\";\n"; push @netent, " } else if substring (option vendor-class-identifier,0,11) = \"onie_vendor\" { #for onie on cumulus switch\n"; - push @netent, " option www-server = \"http://$tftp/install/onie/onie-installer\";\n"; + push @netent, " option www-server = \"http://$tftp.':' . $httpport/install/onie/onie-installer\";\n"; push @netent, " } else if substring(filename,0,1) = null { #otherwise, provide yaboot if the client isn't specific\n "; push @netent, " filename \"/yaboot\";\n"; From 9e9c4d2cf9efbbebe1e5bd726b56527a6e51c290 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Thu, 1 Nov 2018 23:14:32 -0400 Subject: [PATCH 033/121] update --- .../testcase/xcat-inventory/cases.environment | 30 +++++++++++++++++-- .../test.environments.osimage.stanza | 14 ++++----- .../test.environments.osimage.update.json | 16 +++++----- .../test.environments.osimage.update.yaml | 14 ++++----- .../test.environments.osimage.yaml | 14 ++++----- 5 files changed, 56 insertions(+), 32 deletions(-) diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.environment b/xCAT-test/autotest/testcase/xcat-inventory/cases.environment index ab7b69d2a..a05f6a706 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.environment +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.environment @@ -7,7 +7,7 @@ check:rc==0 cmd:makedns -n check:rc==0 -cmd:sleep 20 +#cmd:sleep 20 cmd:if [[ "__GETNODEATTR($$CN,arch)__" = "ppc64" ]] && [[ "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]]; then getmacs -D $$CN; fi check:rc==0 cmd:makedhcp -n @@ -16,11 +16,17 @@ cmd:makedhcp -a check:rc==0 cmd:a=0;while true; do [ $a -eq 100 ] && exit 1;output=$(makedhcp -q $$CN);[ $? -ne 0 ] && exit 1;echo $output|grep $$CN 2>/dev/null && exit 0;a=$[$a+1];sleep 1;done check:rc==0 -cmd:copycds $$ISO +#cmd:copycds $$ISO check:rc==0 cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then mv $rootimgdir $rootimgdir.regbak -f;fi check:rc==0 +cmd:osarch=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osarch|awk -F'=' '{print $2}');sed -i "s/OSARCH/$osarch/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml +cmd:osvers=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osvers|awk -F'=' '{print $2}');sed -i "s/OSVERS/$osvers/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml +cmd:pkgdir=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w pkgdir|awk -F'=' '{print $2}');sed -i "s!PKGDIR!$pkgdir!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml +cmd:pkglist=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w pkglist|awk -F'=' '{print $2}');sed -i "s!PKGLIST!$pkglist!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml +cmd:postinstall=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w postinstall|awk -F'=' '{print $2}');sed -i "s!POSTINSTALL!$postinstall!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml +cmd:osmajor=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osvers|awk -F'=' '{print $2}');sed -i "s/OSMAJOR/$osmajor/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml cmd:xcat-inventory import -f /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml -e GITREPO=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo -e SWDIR=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir check:output=~Inventory import successfully! check:rc==0 @@ -84,11 +90,23 @@ label:others,xcat_inventory cmd:lsdef -t osimage -o test.environments.osimage >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o test.environments.osimage -z >/tmp/test.environments.osimage_image.stanza ;rmdef -t osimage -o test.environments.osimage;fi check:rc==0 cmd:dir="/tmp/export";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi; mkdir -p $dir +cmd:osarch=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osarch|awk -F'=' '{print $2}');sed -i "s/OSARCH/$osarch/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml +cmd:osvers=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osvers|awk -F'=' '{print $2}');sed -i "s/OSVERS/$osvers/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml +cmd:pkgdir=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w pkgdir|awk -F'=' '{print $2}');sed -i "s!PKGDIR!$pkgdir!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml +cmd:pkglist=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w pkglist|awk -F'=' '{print $2}');sed -i "s!PKGLIST!$pkglist!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml +cmd:postinstall=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w postinstall|awk -F'=' '{print $2}');sed -i "s!POSTINSTALL!$postinstall!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml +cmd:osmajor=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osvers|awk -F'=' '{print $2}');sed -i "s/OSMAJOR/$osmajor/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml cmd:xcat-inventory import -f /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml -e GITREPO=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo -e SWDIR=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir check:output=~Inventory import successfully! check:rc==0 cmd:lsdef -t osimage -o test.environments.osimage -z >> /tmp/export/test.environments.osimage.yaml.stanza check:rc==0 +cmd:osarch=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osarch|awk -F'=' '{print $2}');sed -i "s/OSARCH/$osarch/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza +cmd:osvers=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osvers|awk -F'=' '{print $2}');sed -i "s/OSVERS/$osvers/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza +cmd:pkgdir=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w pkgdir|awk -F'=' '{print $2}');sed -i "s!PKGDIR!$pkgdir!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza +cmd:pkglist=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w pkglist|awk -F'=' '{print $2}');sed -i "s!PKGLIST!$pkglist!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza +cmd:postinstall=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w postinstall|awk -F'=' '{print $2}');sed -i "s!POSTINSTALL!$postinstall!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza +cmd:osmajor=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osvers|awk -F'=' '{print $2}');sed -i "s/OSMAJOR/$osmajor/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza cmd:diff -y /tmp/export/test.environments.osimage.yaml.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza check:rc==0 cmd:xcat-inventory export -t osimage -o test.environments.osimage -f /tmp/export/test.environments.osimage.yaml --format yaml @@ -98,6 +116,12 @@ cmd:diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templat check:rc==0 cmd:rmdef -t osimage -o test.environments.osimage check:rc==0 +cmd:osarch=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osarch|awk -F'=' '{print $2}');sed -i "s/OSARCH/$osarch/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json +cmd:osvers=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osvers|awk -F'=' '{print $2}');sed -i "s/OSVERS/$osvers/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json +cmd:pkgdir=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w pkgdir|awk -F'=' '{print $2}');sed -i "s!PKGDIR!$pkgdir!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json +cmd:pkglist=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w pkglist|awk -F'=' '{print $2}');sed -i "s!PKGLIST!$pkglist!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json +cmd:postinstall=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w postinstall|awk -F'=' '{print $2}');sed -i "s!POSTINSTALL!$postinstall!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json +cmd:osmajor=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osvers|awk -F'=' '{print $2}');sed -i "s/OSMAJOR/$osmajor/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json cmd:xcat-inventory import -f /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json -e GITREPO=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo -e SWDIR=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir check:output=~Inventory import successfully! check:rc==0 @@ -105,7 +129,7 @@ cmd:lsdef -t osimage -o test.environments.osimage -z >> /tmp/export/test.environ check:rc==0 cmd:diff -y /tmp/export/test.environments.osimage.json.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza check:rc==0 -cmd:xcat-inventory export -t osimage -o test.environments.osimage -f /tmp/export/test.environments.osimage.json --format json +cmd:xcat-inventory export -t osimage -o test.environments.osimage -f /tmp/export/test.environments.osimage.json check:rc==0 cmd:diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json /tmp/export/test.environments.osimage.json --ignore-blank-lines -I "^#" check:rc==0 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza index 86faff377..79166e511 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza @@ -4,18 +4,18 @@ test.environments.osimage: objtype=osimage environvar=GITREPO=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo,OBJNAME=test.environments.osimage,SWDIR=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir imagetype=linux - osarch=ppc64le - osdistroname=rhels7.5-alternate-ppc64le + osarch=OSARCH + osdistroname=OSVERS-OSARCH osname=Linux - osvers=rhels7.5-alternate + osvers=OSVERS otherpkgdir=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/ otherpkglist=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/otherpkglist/test1.otherpkglist,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/otherpkglist/test2.otherpkglist, permission=755 - pkgdir=/install/rhels7.5-alternate/ppc64le,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/ - pkglist=/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test1.pkglist,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test2.pkglist - postinstall=/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/postinstall/test1.postinstall + pkgdir=PKGDIR,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/ + pkglist=PKGLIST,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test1.pkglist,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test2.pkglist + postinstall=POSTINSTALL,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/postinstall/test1.postinstall profile=compute provmethod=netboot rootimgdir=/install/custom/test.environments.osimage synclists=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/syncfiles/synclist - usercomment=rhels7.5,test_environment_variables + usercomment=OSMAJOR,test_environment_variables diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json index 5e7680b40..2dad18b47 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json @@ -2,14 +2,14 @@ "osimage": { "test.environments.osimage": { "basic_attributes": { - "arch": "ppc64le", - "distribution": "rhels7.5-alternate", - "osdistro": "rhels7.5-alternate-ppc64le", + "arch": "OSARCH", + "distribution": "OSVERS", + "osdistro": "OSARCH-OSVERS", "osname": "Linux" }, "deprecated": { "comments": [ - "rhels7.5", + "OSMAJOR", "test_environment_variables" ] }, @@ -19,7 +19,7 @@ "genimgoptions": { "permission": "755", "postinstall": [ - "/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall", + "POSTINSTALL", "{{GITREPO}}/postinstall/test1.postinstall" ], "rootimgdir": "/install/custom/{{OBJNAME}}" @@ -35,11 +35,11 @@ "" ], "pkgdir": [ - "/install/rhels7.5-alternate/ppc64le", + "PKGDIR", "{{SWDIR}}/pkgdir/" ], "pkglist": [ - "/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist", + "PKGLIST", "{{GITREPO}}/pkglist/test1.pkglist", "{{GITREPO}}/pkglist/test2.pkglist" ] @@ -50,4 +50,4 @@ }, "schema_version": "1.0" } -#Version 2.14.4 (git commit 722709b61e63feb7f6d3ee787afa8113eefbe27e, built Wed Sep 26 06:17:57 EDT 2018) \ No newline at end of file +#Version 2.14.4 (git commit 722709b61e63feb7f6d3ee787afa8113eefbe27e, built Wed Sep 26 06:17:57 EDT 2018) diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml index ced0777ea..65a19b703 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml @@ -1,20 +1,20 @@ osimage: test.environments.osimage: basic_attributes: - arch: ppc64le - distribution: rhels7.5-alternate - osdistro: rhels7.5-alternate-ppc64le + arch: OSARCH + distribution: OSVERS + osdistro: OSVERS-OSARCH osname: Linux deprecated: comments: - - rhels7.5 + - OSMAJOR - test_environment_variables filestosync: - '{{GITREPO}}/syncfiles/synclist' genimgoptions: permission: '755' postinstall: - - /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall + - POSTINSTALL - '{{GITREPO}}/postinstall/test1.postinstall' rootimgdir: /install/custom/{{OBJNAME}} imagetype: linux @@ -26,10 +26,10 @@ osimage: - '{{GITREPO}}/otherpkglist/test2.otherpkglist' - '' pkgdir: - - /install/rhels7.5-alternate/ppc64le + - PKGDIR - '{{SWDIR}}/pkgdir/' pkglist: - - /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist + - PKGLIST - '{{GITREPO}}/pkglist/test1.pkglist' - '{{GITREPO}}/pkglist/test2.pkglist' provision_mode: netboot diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml index b6649accf..38a1d0b28 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml @@ -1,20 +1,20 @@ osimage: test.environments.osimage: basic_attributes: - arch: ppc64le - distribution: rhels7.5 - osdistro: rhels7.5-ppc64le + arch: OSARCH + distribution: OSMAJOR + osdistro: OSVERS-OSARCH osname: Linux filestosync: - {{GITREPO}}/syncfiles/synclist deprecated: comments: - - rhels7.5 + - OSMAJOR - test_environment_variables genimgoptions: permission: '755' postinstall: - - /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall + - POSTINSTALL - {{GITREPO}}/postinstall/test1.postinstall rootimgdir: /install/custom/{{OBJNAME}} imagetype: linux @@ -24,10 +24,10 @@ osimage: - {{GITREPO}}/otherpkglist/test1.otherpkglist - {{GITREPO}}/otherpkglist/test2.otherpkglist, pkgdir: - - /install/rhels7.5/ppc64le + - PKGDIR - {{SWDIR}}/pkgdir/ pkglist: - - /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist + - PKGLIST - {{GITREPO}}/pkglist/test1.pkglist - {{GITREPO}}/pkglist/test2.pkglist provision_mode: netboot From 1889ec879d2ba721869217ad2e4f03d47b7fba40 Mon Sep 17 00:00:00 2001 From: yangsbj Date: Thu, 1 Nov 2018 23:29:01 -0400 Subject: [PATCH 034/121] support site.httpport in nodeset and mknb --- xCAT-server/lib/xcat/plugins/debian.pm | 14 ++++++++++---- xCAT-server/lib/xcat/plugins/mknb.pm | 26 ++++++++++++++++---------- xCAT-server/lib/xcat/plugins/sles.pm | 4 ++-- xCAT-server/lib/xcat/plugins/xnba.pm | 22 ++++++++++++++-------- 4 files changed, 42 insertions(+), 24 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm index eced2b293..5e5a74146 100644 --- a/xCAT-server/lib/xcat/plugins/debian.pm +++ b/xCAT-server/lib/xcat/plugins/debian.pm @@ -859,11 +859,17 @@ sub mkinstall { $instserver = '!myipfn!'; } + my $httpport="80"; + my @hports=xCAT::TableUtils->get_site_attribute("httpport"); + if ($hports[0]){ + $httpport=$hports[0]; + } + if ($ent and $ent->{nfsserver}) { $instserver = $ent->{nfsserver}; } - my $kcmdline = "nofb utf8 auto url=http://" . $instserver . "/install/autoinst/" . $node; + my $kcmdline = "nofb utf8 auto url=http://" . $instserver . ":$httpport/install/autoinst/" . $node; $kcmdline .= " xcatd=" . $instserver; $kcmdline .= " mirror/http/hostname=" . $instserver; @@ -927,7 +933,7 @@ sub mkinstall { #from 12.10, the live install changed, so add the live-installer if (-r "$pkgdir/install/filesystem.squashfs") { - $kcmdline .= " live-installer/net-image=http://${instserver}${pkgdir}/install/filesystem.squashfs"; + $kcmdline .= " live-installer/net-image=http://${instserver}:$httpport${pkgdir}/install/filesystem.squashfs"; } xCAT::MsgUtils->trace($verbose_on_off, "d", "debian->mkinstall: kcmdline=$kcmdline kernal=$rtftppath/vmlinuz initrd=$rtftppath/initrd.img"); @@ -1326,7 +1332,7 @@ sub mknetboot $kcmdline = "NFSROOT=$nfssrv:$nfsdir STATEMNT="; } } else { - $kcmdline = "imgurl=http://$imgsrv/$rootimgdir/rootimg-statelite.gz STATEMNT="; + $kcmdline = "imgurl=http://$imgsrv:$httpport/$rootimgdir/rootimg-statelite.gz STATEMNT="; } @@ -1384,7 +1390,7 @@ sub mknetboot else { $kcmdline = - "imgurl=http://$imgsrv/$rootimgdir/$compressedrootimg "; + "imgurl=http://$imgsrv:$httpport/$rootimgdir/$compressedrootimg "; $kcmdline .= "XCAT=$xcatmaster:$xcatdport "; } diff --git a/xCAT-server/lib/xcat/plugins/mknb.pm b/xCAT-server/lib/xcat/plugins/mknb.pm index 1d2eb753d..b352f6a5f 100644 --- a/xCAT-server/lib/xcat/plugins/mknb.pm +++ b/xCAT-server/lib/xcat/plugins/mknb.pm @@ -46,6 +46,12 @@ sub process_request { $xcatdport = $t_entry; } + my $httpport="80"; + my @hports=xCAT::TableUtils->get_site_attribute("httpport"); + if ($hports[0]){ + $httpport=$hports[0]; + } + @entries = xCAT::TableUtils->get_site_attribute("dhcpinterfaces"); $t_entry = $entries[0]; if (defined($t_entry)) { @@ -289,15 +295,15 @@ sub process_request { open($cfg, ">", "$tftpdir/xcat/xnba/nets/$net"); print $cfg "#!gpxe\n"; if ($invisibletouch) { - print $cfg 'imgfetch -n kernel http://${next-server}/tftpboot/xcat/genesis.kernel.' . "$arch quiet xcatd=" . $normnets->{$_} . ":$xcatdport $consolecmdline BOOTIF=01-" . '${netX/machyp}' . "\n"; + print $cfg 'imgfetch -n kernel http://${next-server}:'.$httpport.'/tftpboot/xcat/genesis.kernel.' . "$arch quiet xcatd=" . $normnets->{$_} . ":$xcatdport $consolecmdline BOOTIF=01-" . '${netX/machyp}' . "\n"; if ($lzma_exit_value) { - print $cfg 'imgfetch -n nbfs http://${next-server}/tftpboot/xcat/genesis.fs.' . "$arch.gz\n"; + print $cfg 'imgfetch -n nbfs http://${next-server}:'.$httpport.'/tftpboot/xcat/genesis.fs.' . "$arch.gz\n"; } else { - print $cfg 'imgfetch -n nbfs http://${next-server}/tftpboot/xcat/genesis.fs.' . "$arch.lzma\n"; + print $cfg 'imgfetch -n nbfs http://${next-server}:'.$httpport.'/tftpboot/xcat/genesis.fs.' . "$arch.lzma\n"; } } else { - print $cfg 'imgfetch -n kernel http://${next-server}/tftpboot/xcat/nbk.' . "$arch quiet xcatd=" . $normnets->{$_} . ":$xcatdport $consolecmdline\n"; - print $cfg 'imgfetch -n nbfs http://${next-server}/tftpboot/xcat/nbfs.' . "$arch.gz\n"; + print $cfg 'imgfetch -n kernel http://${next-server}:'.$httpport.'/tftpboot/xcat/nbk.' . "$arch quiet xcatd=" . $normnets->{$_} . ":$xcatdport $consolecmdline\n"; + print $cfg 'imgfetch -n nbfs http://${next-server}:'.$httpport.'/tftpboot/xcat/nbfs.' . "$arch.gz\n"; } print $cfg "imgload kernel\n"; print $cfg "imgexec kernel\n"; @@ -317,7 +323,7 @@ sub process_request { close($cfg); open($cfg, ">", "$tftpdir/xcat/xnba/nets/$net.uefi"); print $cfg "#!gpxe\n"; - print $cfg 'chain http://${next-server}/tftpboot/xcat/elilo-x64.efi -C /tftpboot/xcat/xnba/nets/' . "$net.elilo\n"; + print $cfg 'chain http://${next-server}:'.$httpport.'/tftpboot/xcat/elilo-x64.efi -C /tftpboot/xcat/xnba/nets/' . "$net.elilo\n"; close($cfg); } } elsif ($arch =~ /ppc/) { @@ -325,8 +331,8 @@ sub process_request { print $cfgfile "default \"xCAT Genesis (" . $normnets->{$_} . ")\"\n"; print $cfgfile " delay=10\n"; print $cfgfile " label \"xCAT Genesis (" . $normnets->{$_} . ")\"\n"; - print $cfgfile " kernel http://" . $normnets->{$_} . ":80/$tftpdir/xcat/genesis.kernel.$arch\n"; - print $cfgfile " initrd http://" . $normnets->{$_} . ":80/$initrd_file\n"; + print $cfgfile " kernel http://" . $normnets->{$_} . ":$httpport/$tftpdir/xcat/genesis.kernel.$arch\n"; + print $cfgfile " initrd http://" . $normnets->{$_} . ":$httpport/$initrd_file\n"; print $cfgfile ' append "quiet xcatd=' . $normnets->{$_} . ":$xcatdport $consolecmdline\"\n"; close($cfgfile); } @@ -363,8 +369,8 @@ sub process_request { print $cfgfile "default \"xCAT Genesis (" . $normnets->{$_} . ")\"\n"; print $cfgfile " delay=10\n"; print $cfgfile " label \"xCAT Genesis (" . $normnets->{$_} . ")\"\n"; - print $cfgfile " kernel http://" . $hexnets->{$_} . ":80/$tftpdir/xcat/genesis.kernel.$arch\n"; - print $cfgfile " initrd http://" . $hexnets->{$_} . ":80/$initrd_file\n"; + print $cfgfile " kernel http://" . $hexnets->{$_} . ":$httpport/$tftpdir/xcat/genesis.kernel.$arch\n"; + print $cfgfile " initrd http://" . $hexnets->{$_} . ":$httpport/$initrd_file\n"; print $cfgfile ' append "quiet xcatd=' . $hexnets->{$_} . ":$xcatdport $consolecmdline\"\n"; close($cfgfile); } diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index 46e3a8b79..789b00a6e 100644 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -459,7 +459,7 @@ sub mknetboot $kcmdline = "NFSROOT=$nfssrv:$nfsdir STATEMNT="; } } else { - $kcmdline = "imgurl=$httpmethod://$imgsrv/$rootimgdir/rootimg-statelite.gz STATEMNT="; + $kcmdline = "imgurl=$httpmethod://$imgsrv:$httpport/$rootimgdir/rootimg-statelite.gz STATEMNT="; } # add support for subVars in the value of "statemnt" @@ -512,7 +512,7 @@ sub mknetboot else { $kcmdline = - "imgurl=$httpmethod://$imgsrv/$rootimgdir/$compressedrootimg "; + "imgurl=$httpmethod://$imgsrv:$httpport/$rootimgdir/$compressedrootimg "; } $kcmdline .= "XCAT=$xcatmaster:$xcatdport quiet "; diff --git a/xCAT-server/lib/xcat/plugins/xnba.pm b/xCAT-server/lib/xcat/plugins/xnba.pm index cdca59850..88702a0e6 100644 --- a/xCAT-server/lib/xcat/plugins/xnba.pm +++ b/xCAT-server/lib/xcat/plugins/xnba.pm @@ -111,6 +111,12 @@ sub setstate { my $imgaddkcmdline = $linuximghashref->{'addkcmdline'}; my $imgboottarget = $linuximghashref->{'boottarget'}; + my $httpport="80"; + my @hports=xCAT::TableUtils->get_site_attribute("httpport"); + if ($hports[0]){ + $httpport=$hports[0]; + } + # get kernel and initrd from boottarget table my $bttab; my $btentry; @@ -246,8 +252,8 @@ sub setstate { my $kernel; ($kernel, $hypervisor) = split /!/, $kern->{kernel}; print $pcfg " set 209:string xcat/xnba/nodes/$node.pxelinux\n"; - print $pcfg " set 210:string http://" . '${next-server}' . "/tftpboot/\n"; - print $pcfg " imgfetch -n pxelinux.0 http://" . '${next-server}' . "/tftpboot/xcat/pxelinux.0\n"; + print $pcfg " set 210:string http://" . '${next-server}'. ':' . $httpport . "/tftpboot/\n"; + print $pcfg " imgfetch -n pxelinux.0 http://" . '${next-server}' . ':' . $httpport . "/tftpboot/xcat/pxelinux.0\n"; print $pcfg " imgload pxelinux.0\n"; print $pcfg " imgexec pxelinux.0\n"; close($pcfg); @@ -257,8 +263,8 @@ sub setstate { } else { if ($kern->{kernel} =~ /\.c32\z/ or $kern->{kernel} =~ /memdisk\z/) { #gPXE comboot support seems insufficient, chain pxelinux instead print $pcfg " set 209:string xcat/xnba/nodes/$node.pxelinux\n"; - print $pcfg " set 210:string http://" . '${next-server}' . "/tftpboot/\n"; - print $pcfg " imgfetch -n pxelinux.0 http://" . '${next-server}' . "/tftpboot/xcat/pxelinux.0\n"; + print $pcfg " set 210:string http://" . '${next-server}' . ':' . $httpport . "/tftpboot/\n"; + print $pcfg " imgfetch -n pxelinux.0 http://" . '${next-server}' . ':' . $httpport . "/tftpboot/xcat/pxelinux.0\n"; print $pcfg " imgload pxelinux.0\n"; print $pcfg " imgexec pxelinux.0\n"; close($pcfg); @@ -286,11 +292,11 @@ sub setstate { $kern->{kcmdline} =~ s/xcat\/netboot/\/tftpboot\/xcat\/netboot/; } print $ucfg "#!gpxe\n"; - print $ucfg 'chain http://${next-server}/tftpboot/xcat/esxboot-x64.efi ' . $kern->{kcmdline} . "\n"; + print $ucfg 'chain http://${next-server}:'.$httpport.'/tftpboot/xcat/esxboot-x64.efi ' . $kern->{kcmdline} . "\n"; close($ucfg); } } else { #other than comboot/multiboot, we won't have need of pxelinux - print $pcfg "imgfetch -n kernel http://" . '${next-server}/tftpboot/' . $kern->{kernel} . "\n"; + print $pcfg "imgfetch -n kernel http://" . '${next-server}:' . $httpport.'/tftpboot/' . $kern->{kernel} . "\n"; print $pcfg "imgload kernel\n"; if ($kern->{kcmdline}) { print $pcfg "imgargs kernel " . $kern->{kcmdline} . ' BOOTIF=01-${netX/machyp}' . "\n"; @@ -298,14 +304,14 @@ sub setstate { print $pcfg "imgargs kernel BOOTIF=" . '${netX/mac}' . "\n"; } if ($kern->{initrd}) { - print $pcfg "imgfetch http://" . '${next-server}' . "/tftpboot/" . $kern->{initrd} . "\n"; + print $pcfg "imgfetch http://" . '${next-server}:' . "$httpport/tftpboot/" . $kern->{initrd} . "\n"; } print $pcfg "imgexec kernel\n"; if ($kern->{kcmdline} and $kern->{initrd}) { #only a linux kernel/initrd pair should land here, write elilo config and uefi variant of xnba config file my $ucfg; open($ucfg, '>', $tftpdir . "/xcat/xnba/nodes/" . $node . ".uefi"); print $ucfg "#!gpxe\n"; - print $ucfg 'chain http://${next-server}/tftpboot/xcat/elilo-x64.efi -C /tftpboot/xcat/xnba/nodes/' . $node . ".elilo\n"; + print $ucfg 'chain http://${next-server}:'.$httpport.'/tftpboot/xcat/elilo-x64.efi -C /tftpboot/xcat/xnba/nodes/' . $node . ".elilo\n"; close($ucfg); open($ucfg, '>', $tftpdir . "/xcat/xnba/nodes/" . $node . ".elilo"); print $ucfg 'default="xCAT"' . "\n"; From 2e4bbcff1da25f1563d87954bc6d01e3707c1101 Mon Sep 17 00:00:00 2001 From: yangsbj Date: Fri, 2 Nov 2018 01:58:41 -0400 Subject: [PATCH 035/121] add patch for test --- .../installation/change_apache_listen_port | 26 +++++++++++++++++++ .../testcase/installation/change_http_port.sh | 24 +++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 xCAT-test/autotest/testcase/installation/change_apache_listen_port create mode 100755 xCAT-test/autotest/testcase/installation/change_http_port.sh diff --git a/xCAT-test/autotest/testcase/installation/change_apache_listen_port b/xCAT-test/autotest/testcase/installation/change_apache_listen_port new file mode 100644 index 000000000..996482ef1 --- /dev/null +++ b/xCAT-test/autotest/testcase/installation/change_apache_listen_port @@ -0,0 +1,26 @@ +start:change_apache_listen_port_flat +cmd:netstat -nlp|grep -E "apache2|httpd" +check:output =~ 80 +cmd:lsdef -t site -i httpport -c |awk -F"=" '{print $2}' +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/installation/change_http_port.sh +cmd:netstat -nlp|grep -E "apache2|httpd" +check:output =~ 8899 +check:rc==0 +cmd:chdef -t site httpport=8899 +check:rc==0 +cmd:lsdef -t site -i httpport -c +check:output =~ 8899 +check:rc==0 +end + +start:change_apache_listen_port_hierarchy +cmd:xdsh $$SN "netstat -nlp|grep -E 'apache2|httpd'" +check:output =~ 80 +cmd:xdsh $$SN "lsdef -t site -i httpport -c |awk -F'=' '{print $2}'" +cmd:scp /opt/xcat/share/xcat/tools/autotest/testcase/installation/change_http_port.sh $$SN:/tmp +cmd:xdsh $$SN "ls -l /tmp/ |grep change_http_port.sh" +cmd:xdsh $$SN "chmod +x /tmp/change_http_port.sh && /tmp/change_http_port.sh" +cmd:xdsh $$SN "netstat -nlp|grep -E 'apache2|httpd' |grep 8899" +check:output =~ 8899 +check:rc==0 +end diff --git a/xCAT-test/autotest/testcase/installation/change_http_port.sh b/xCAT-test/autotest/testcase/installation/change_http_port.sh new file mode 100755 index 000000000..a7f859c38 --- /dev/null +++ b/xCAT-test/autotest/testcase/installation/change_http_port.sh @@ -0,0 +1,24 @@ +#!/bin/bash +if [ -f "/etc/httpd/conf/httpd.conf" ]; then + config="/etc/httpd/conf/httpd.conf" +elif [ -f "/etc/apache2/ports.conf" ]; then + config="/etc/apache2/ports.conf" +elif [ -f "/etc/apache2/listen.conf" ]; then + config="/etc/apache2/listen.conf" +fi +port=`awk -F' ' '/^[Ll]isten / {print $2}' $config` +echo "The original httpd port is $port in $config" + +echo "start to change httpd listen port to 8899" +sed -i "s/^Listen 80/Listen 8899/g" $config +if [ -f "/etc/apache2/sites-enabled/000-default.conf" ]; then + sed -i "s/VirtualHost \*:80/VirtualHost \*:8899/g" /etc/apache2/sites-enabled/000-default.conf + service apache2 stop + sleep 1 + service apache2 start +else + service httpd stop + sleep 1 + service httpd start +fi +exit From ad3d2b26c2ac3e88dd4c5f2c635b3c16044ec9e1 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Fri, 2 Nov 2018 02:12:14 -0400 Subject: [PATCH 036/121] update to remove blank --- .../test.environments.osimage.update.yaml | 14 +++++++------- .../environment/test.environments.osimage.yaml | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml index 65a19b703..6ace48a22 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml @@ -1,20 +1,20 @@ osimage: test.environments.osimage: basic_attributes: - arch: OSARCH - distribution: OSVERS - osdistro: OSVERS-OSARCH + arch: OSARCH + distribution: OSVERS + osdistro: OSVERS-OSARCH osname: Linux deprecated: comments: - - OSMAJOR + - OSMAJOR - test_environment_variables filestosync: - '{{GITREPO}}/syncfiles/synclist' genimgoptions: permission: '755' postinstall: - - POSTINSTALL + - POSTINSTALL - '{{GITREPO}}/postinstall/test1.postinstall' rootimgdir: /install/custom/{{OBJNAME}} imagetype: linux @@ -26,10 +26,10 @@ osimage: - '{{GITREPO}}/otherpkglist/test2.otherpkglist' - '' pkgdir: - - PKGDIR + - PKGDIR - '{{SWDIR}}/pkgdir/' pkglist: - - PKGLIST + - PKGLIST - '{{GITREPO}}/pkglist/test1.pkglist' - '{{GITREPO}}/pkglist/test2.pkglist' provision_mode: netboot diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml index 38a1d0b28..adb23f662 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml @@ -1,20 +1,20 @@ osimage: test.environments.osimage: basic_attributes: - arch: OSARCH - distribution: OSMAJOR - osdistro: OSVERS-OSARCH + arch: OSARCH + distribution: OSMAJOR + osdistro: OSVERS-OSARCH osname: Linux filestosync: - {{GITREPO}}/syncfiles/synclist deprecated: comments: - - OSMAJOR + - OSMAJOR - test_environment_variables genimgoptions: permission: '755' postinstall: - - POSTINSTALL + - POSTINSTALL - {{GITREPO}}/postinstall/test1.postinstall rootimgdir: /install/custom/{{OBJNAME}} imagetype: linux @@ -24,10 +24,10 @@ osimage: - {{GITREPO}}/otherpkglist/test1.otherpkglist - {{GITREPO}}/otherpkglist/test2.otherpkglist, pkgdir: - - PKGDIR + - PKGDIR - {{SWDIR}}/pkgdir/ pkglist: - - PKGLIST + - PKGLIST - {{GITREPO}}/pkglist/test1.pkglist - {{GITREPO}}/pkglist/test2.pkglist provision_mode: netboot From 8f23be188822b7a5f8a11778654d71e23456a576 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Fri, 2 Nov 2018 03:18:10 -0400 Subject: [PATCH 037/121] fix typo --- xCAT-test/autotest/testcase/xcat-inventory/cases.environment | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.environment b/xCAT-test/autotest/testcase/xcat-inventory/cases.environment index a05f6a706..2c057ec18 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.environment +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.environment @@ -7,7 +7,7 @@ check:rc==0 cmd:makedns -n check:rc==0 -#cmd:sleep 20 +cmd:sleep 20 cmd:if [[ "__GETNODEATTR($$CN,arch)__" = "ppc64" ]] && [[ "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]]; then getmacs -D $$CN; fi check:rc==0 cmd:makedhcp -n @@ -16,7 +16,7 @@ cmd:makedhcp -a check:rc==0 cmd:a=0;while true; do [ $a -eq 100 ] && exit 1;output=$(makedhcp -q $$CN);[ $? -ne 0 ] && exit 1;echo $output|grep $$CN 2>/dev/null && exit 0;a=$[$a+1];sleep 1;done check:rc==0 -#cmd:copycds $$ISO +cmd:copycds $$ISO check:rc==0 cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then mv $rootimgdir $rootimgdir.regbak -f;fi From a33cd3b15eb98ba7fa98ffe303ff1fa476c0819f Mon Sep 17 00:00:00 2001 From: Bin Xu Date: Fri, 2 Nov 2018 16:22:14 +0800 Subject: [PATCH 038/121] xcatperftest enhance to support random noderange on existing cluster (#5759) * 1, enhance xcatperftest to support run testing on different number of nodes without changing DB 2, give a default DB command lists * 1, Using environment to customize TIMEOUT 2, Refine the screen output to ignore the node name lists 3, For run in existing cluster, finally run a full node range test. --- .../autotest/testcase/performance/DBcmds.lst | 27 +++++++ xCAT-test/bin/xcatperftest | 78 ++++++++++++++----- 2 files changed, 85 insertions(+), 20 deletions(-) create mode 100644 xCAT-test/autotest/testcase/performance/DBcmds.lst diff --git a/xCAT-test/autotest/testcase/performance/DBcmds.lst b/xCAT-test/autotest/testcase/performance/DBcmds.lst new file mode 100644 index 000000000..986cfd042 --- /dev/null +++ b/xCAT-test/autotest/testcase/performance/DBcmds.lst @@ -0,0 +1,27 @@ +#SERIES# 1,50,100,250,500,1000,2500,5000,10000,20000 +# 1, For big table read +tabdump nodelist + +# 2, For node objects +# List names for node objects +lsdef -t node #NODES# +# List all attributes for node objects +lsdef -l -t node #NODES# +# List some attributes for node objects, attributes in nodelist table +lsdef -t node #NODES# -i groups,status,usercomment +# List some attributes for node objects, attributes in multiple table +lsdef -t node #NODES# -i groups,ip,mac,netboot,servicenode +# query with conditions +lsdef -t node #NODES# -l -w 'ip!=2.2.2.2' -w 'status==booted' +lsdef -S + +# 3, For group objects +lsdef -t group +lsdef -l -t group +lsdef -t group $FAKE_NODE_GROUP -i ip,mac + +# 4, For node* commands, it should be similar with lsdef -t node +nodels #NODES# +nodels #NODES# groups +nodels #NODES# noderes.netboot==pxe switch.switch + diff --git a/xCAT-test/bin/xcatperftest b/xCAT-test/bin/xcatperftest index f3da28651..7b6da3c73 100755 --- a/xCAT-test/bin/xcatperftest +++ b/xCAT-test/bin/xcatperftest @@ -1,5 +1,5 @@ #!/bin/bash -# IBM(c) 2017 EPL license http://www.eclipse.org/legal/epl-v10.html +# IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html #(C)IBM Corp # ################################################################### @@ -34,7 +34,7 @@ isNumber() # Give a simple usage if [ -z "$1" ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then echo "Run the performance testing for the commands listed in file:" - echo " [PERF_DRYRUN=y] $0 run " + echo " [PERF_DRYRUN=y] [PERF_RUN_NODELIST=/path/to/nodelist] $0 run " echo " " echo "Generate a bunch of fake nodes and Run the performance testing for the commands listed in file:" echo " [PERF_DRYRUN=y] [PERF_NOCREATE=y] $0 [command-list-file]" @@ -107,7 +107,14 @@ fi # Mandatory, to specify the number of total fake nodes which will be created for testing FAKE_NODE_TOTAL=$1 if [ "$PERF_RUN_WITH_ENV" = "1" ];then - FAKE_NODE_TOTAL=`nodels|wc -l` + if [ -z $PERF_RUN_NODELIST ]; then + PERF_RUN_NODELIST="/tmp/xcatperftest.nodels.$$" + nodels > $PERF_RUN_NODELIST + else + [ -f "$PERF_RUN_NODELIST" ] && ( echo "ERROR: $PERF_RUN_NODELIST does not exist."; exit 99 ) + fi + + FAKE_NODE_TOTAL=`cat $PERF_RUN_NODELIST|wc -l` fi # Optional, the prefix of the fake compute node name. @@ -153,6 +160,11 @@ if [ -z $PERF_NODETEMPL ]; then PERF_NODETEMPL="`arch`-template" fi +# Optional, The NIC used by simulator. +if [ -z $PERF_RUN_TIMEOUT ]; then + PERF_RUN_TIMEOUT=3600 +fi + # Optional, The NIC used by simulator. if [ -z $PERF_SIM_NIC ]; then PERF_SIM_NIC='eth1' @@ -179,6 +191,16 @@ if [ -z $PERF_RPT_FILE ]; then fi PERFORMANCE_REPORT=$PERFORMANCE_DIR/$PERF_RPT_FILE +# Get a random node list from a file +nodeRange() +{ + if [ "$PERF_RUN_WITH_ENV" = "1" ];then + cat "$PERF_RUN_NODELIST"|shuf -n$1|awk BEGIN{RS=EOF}'{gsub(/\n/,",");print}' + else + echo "$FAKE_NODE_PREFIX[1-$1]" + fi +} + # Get a random MAC address genMAC() { @@ -283,7 +305,7 @@ runTest() { cmd=$1 - [ -z $osimage ] || cmd="${cmd/\#OSIMAGE\#/$osimage}" + [ -z "$osimage" ] || cmd="${cmd/\#OSIMAGE\#/$osimage}" if [[ $cmd =~ '#STANZ#' ]]; then #mkdef -z execCmd "${cmd/\#STANZ\#/$PERFORMANCE_STANZ}" "$FAKE_NODE_TOTAL" @@ -295,12 +317,18 @@ runTest() execCmd "${cmd/\#NODES\#/$FAKE_NODE_GROUP}" "$FAKE_NODE_TOTAL" else # run the command for each number in SERIES + lastnum=0 for num in $2 do isNumber $num || continue + showcmd=$1 if [[ $num -le $FAKE_NODE_TOTAL ]]; then - #cmd=$1 - execCmd "${cmd/\#NODES\#/$FAKE_NODE_PREFIX[1-$num]}" "$num" + execCmd "${cmd/\#NODES\#/$(nodeRange $num)}" "$num" "${showcmd/NODES/$num}" + lastnum=$num + elif [ "$PERF_RUN_WITH_ENV" = "1" ]; then + num=$FAKE_NODE_TOTAL + [[ $num -gt $lastnum ]] && execCmd "${cmd/\#NODES\#/}" "$num" "${showcmd/NODES/$num}" + break fi done fi @@ -312,6 +340,7 @@ runTest() } + # Output performance result for each command. printResult() { @@ -322,7 +351,7 @@ printResult() if [ -z $4 ]; then # RESULT; CMD; TIME; FULL COMMAND - echo "=====> $result$PERF_CSV_CHAR $desc$PERF_CSV_CHAR $2$PERF_CSV_CHAR \"$1\"" + echo "=====> $result$PERF_CSV_CHAR $desc$PERF_CSV_CHAR $2" echo "$result$PERF_CSV_CHAR $desc$PERF_CSV_CHAR $2$PERF_CSV_CHAR \"$1\"" >> $PERFORMANCE_REPORT else nodepersec='-' @@ -331,7 +360,7 @@ printResult() nodepersec=$(printf "%.2f" `echo "scale=2;$4/$2"|bc`) fi # RESULT; CMD; TIME; NODES; NODES/SEC; FULL COMMAND - echo "=====> $result$PERF_CSV_CHAR $desc$PERF_CSV_CHAR $2$PERF_CSV_CHAR $4$PERF_CSV_CHAR $nodepersec$PERF_CSV_CHAR \"$1\"" + echo "=====> $result$PERF_CSV_CHAR $desc$PERF_CSV_CHAR $2$PERF_CSV_CHAR $4$PERF_CSV_CHAR $nodepersec" echo "$result$PERF_CSV_CHAR $desc$PERF_CSV_CHAR $2$PERF_CSV_CHAR $4$PERF_CSV_CHAR $nodepersec$PERF_CSV_CHAR \"$1\"">> $PERFORMANCE_REPORT fi } @@ -340,8 +369,9 @@ printResult() execCmd() { noderange=$2 + [ -z "$3" ] && showcmd=$1 || showcmd=$3 - echo "[Testing for command]: $1 ..." + echo "[Testing for command]: $showcmd ..." if [ ! -z $PERF_DRYRUN ]; then return fi @@ -349,7 +379,7 @@ execCmd() start=`date +%s%3N` #using timeout to avoid some commands hang - timeout 3600 bash < /dev/null 2>&1 EOT @@ -369,12 +399,19 @@ EOT ################################################# mkdir -p $PERFORMANCE_DIR if [ "$PERF_RUN_WITH_ENV" = "1" ]; then - echo "Start the performance testing for commands in $RUN_CMD_LIST " + echo "Start the performance testing for commands in $RUN_CMD_LIST. Total nodes: $FAKE_NODE_TOTAL " echo "#$version" >> $PERFORMANCE_REPORT echo "#Total defined nodes number: $FAKE_NODE_TOTAL" >> $PERFORMANCE_REPORT echo "#Result$PERF_CSV_CHAR Command$PERF_CSV_CHAR Time(s)$PERF_CSV_CHAR Full Commands" >> $PERFORMANCE_REPORT echo "==================================================" + + series=`grep '^#SERIES#' $RUN_CMD_LIST | awk '{print $2}'` + if [ ! -z $series ]; then + series=${series//,/ } + fi + [ -z "$series" ] || echo "Apply noderange ($series) on below commands." + cmdlist=`cat $RUN_CMD_LIST` IFS_BAK=$IFS IFS=$'\n' @@ -384,13 +421,14 @@ if [ "$PERF_RUN_WITH_ENV" = "1" ]; then # begin to run the command IFS=$IFS_BAK - execCmd "$line" + #execCmd "$line" + runTest "$line" "$series" IFS=$'\n' done IFS=$IFS_BAK IFS_BAK= - if [ -z $PERF_DRYRUN ]; then + if [ -z "$PERF_DRYRUN" ]; then echo echo "Done. Check the performance result in $PERFORMANCE_REPORT" fi @@ -442,7 +480,7 @@ if [ 0 != $? ]; then exit 99 fi -if [ -z $PERF_NOCREATE ]; then +if [ -z "$PERF_NOCREATE" ]; then rack=$(expr $FAKE_NODE_TOTAL / $NODE_PER_ROW) echo "==================================================" @@ -452,8 +490,8 @@ if [ -z $PERF_NOCREATE ]; then echo "==================================================" fi -if [ -z $RUN_CMD_LIST ]; then - [ -z $PERF_NOCREATE ] && echo "Done. Check the stanz file in $PERFORMANCE_STANZ" +if [ -z "$RUN_CMD_LIST" ]; then + [ -z "$PERF_NOCREATE" ] && echo "Done. Check the stanz file in $PERFORMANCE_STANZ" exit 0 fi echo "Continue the performance testing for commands in $RUN_CMD_LIST " @@ -464,19 +502,19 @@ echo "#Result$PERF_CSV_CHAR Command$PERF_CSV_CHAR Time(s)$PERF_CSV_CHAR Nodes Nu echo "==================================================" # Initial Populate the fake nodes into DB -if [ -z $PERF_NOCREATE ]; then +if [ -z "$PERF_NOCREATE" ]; then #create fake network for makedns, makedhcp etc... fakeNetwork execCmd "cat $PERFORMANCE_STANZ | mkdef -z -f" "$FAKE_NODE_TOTAL" - [ -z $PERF_CREATE_ONLY ] || exit 0 + [ -z "$PERF_CREATE_ONLY" ] || exit 0 # fake interface is required for topology with service nodes as it will determine if then Mn/Sn are # in the same subnet with CNs fakeInterface $FAKE_NETWORK_INTF fi series=`grep '^#SERIES#' $RUN_CMD_LIST | awk '{print $2}'` -if [ ! -z $series ]; then +if [ ! -z "$series" ]; then series=${series//,/ } fi #echo $series @@ -501,7 +539,7 @@ if [ -z $PERF_NOCREATE ]; then rm -f $PERFORMANCE_STANZ fakeInterface $FAKE_NETWORK_INTF del fi - +rm -f "/tmp/xcatperftest.nodels.$$" if [ -z $PERF_DRYRUN ]; then echo echo "Done. Check the performance result in $PERFORMANCE_REPORT" From 7dab7922d778ec08585721562aca2bd7be072d9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=E1=B4=8F=C9=B4=C9=A2=20Jie?= Date: Fri, 2 Nov 2018 16:46:10 +0800 Subject: [PATCH 039/121] A more real world partitioning scheme for RHEL8 (#5760) --- xCAT-server/share/xcat/install/scripts/pre.rhels8 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xCAT-server/share/xcat/install/scripts/pre.rhels8 b/xCAT-server/share/xcat/install/scripts/pre.rhels8 index 4ea92263b..eb50301b4 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.rhels8 +++ b/xCAT-server/share/xcat/install/scripts/pre.rhels8 @@ -171,14 +171,17 @@ case "$(uname -m)" in esac if [ -d /sys/firmware/efi ] then - echo "part /boot/efi --fstype=$EFIFSTYPE --ondisk=$instdisk --size=250" >>/tmp/partitionfile + echo "part /boot/efi --fstype=$EFIFSTYPE --ondisk=$instdisk --size=256" >>/tmp/partitionfile fi # TODO: Ondisk detection, /dev/disk/by-id/edd-int13_dev80 for legacy maybe, and no idea about efi. At least maybe blacklist SAN if mptsas/mpt2sas/megaraid_sas seen... echo "part /boot --fstype=$BOOTFSTYPE --asprimary --ondisk=$instdisk --size=512" >>/tmp/partitionfile -echo "part pv.000997 --grow --asprimary --ondisk=$instdisk --size=8192" >>/tmp/partitionfile +echo "part pv.000997 --grow --asprimary --ondisk=$instdisk --size=18432" >>/tmp/partitionfile echo "volgroup system --pesize=4096 pv.000997" >>/tmp/partitionfile -echo "logvol / --fstype=$FSTYPE --name=root --vgname=system --grow --size=1024" >>/tmp/partitionfile +echo "logvol / --fstype=$FSTYPE --name=root --vgname=system --grow --size=4096 --maxsize=8192" >>/tmp/partitionfile +echo "logvol /var --fstype=$FSTYPE --name=var --vgname=system --grow --size=2048 --maxsize=8192" >>/tmp/partitionfile +echo "logvol /tmp --fstype=$FSTYPE --name=tmp --vgname=system --grow --size=1024 --maxsize=4096" >>/tmp/partitionfile +echo "logvol /home --fstype=$FSTYPE --name=home --vgname=system --grow --percent=10 --maxsize=10240" >>/tmp/partitionfile echo "logvol swap --name=swap --vgname=system --recommended" >>/tmp/partitionfile # Specify "bootloader" configuration in "/tmp/partitionfile" if there is no user customized partition file From 1fb78eb97d78a321d9e97e636e656be1c4394eec Mon Sep 17 00:00:00 2001 From: yangsbj Date: Fri, 2 Nov 2018 05:00:26 -0400 Subject: [PATCH 040/121] add HTTPPORT=xxx in kcmdline for diskless/statelite --- xCAT-server/lib/xcat/plugins/anaconda.pm | 3 ++- xCAT-server/lib/xcat/plugins/debian.pm | 3 ++- xCAT-server/lib/xcat/plugins/sles.pm | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index bb65cbd97..84e6f7167 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -652,7 +652,8 @@ sub mknetboot $kcmdline .= $statemnt . " "; $kcmdline .= "XCAT=$xcatmasterip:$xcatdport "; - + + $kcmdline .= "HTTPPORT=$httpport "; if ($rootfstype ne "ramdisk") { diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm index 5e5a74146..17838589e 100644 --- a/xCAT-server/lib/xcat/plugins/debian.pm +++ b/xCAT-server/lib/xcat/plugins/debian.pm @@ -1336,7 +1336,7 @@ sub mknetboot } - + $kcmdline .=" HTTPPORT=$httpport "; # add support for subVars in the value of "statemnt" my $statemnt = ""; @@ -1394,6 +1394,7 @@ sub mknetboot $kcmdline .= "XCAT=$xcatmaster:$xcatdport "; } + # if site.nodestatus='n', add "nonodestatus" to kcmdline to inform the node not to update nodestatus during provision if (($nodestatus eq "n") or ($nodestatus eq "N") or ($nodestatus eq "0")) { $kcmdline .= " nonodestatus "; diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index 789b00a6e..d867e344f 100644 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -515,6 +515,7 @@ sub mknetboot "imgurl=$httpmethod://$imgsrv:$httpport/$rootimgdir/$compressedrootimg "; } $kcmdline .= "XCAT=$xcatmaster:$xcatdport quiet "; + $kcmdline .= " HTTPPORT=$httpport "; #if site.nodestatus="n", append "nonodestatus" to kcmdline #to inform the statelite/stateless node not to update the nodestatus during provision From accb6d69a9aaf3ad079cf3af68ca5379c2e6814d Mon Sep 17 00:00:00 2001 From: yangsbj Date: Fri, 2 Nov 2018 05:16:14 -0400 Subject: [PATCH 041/121] write HTTPPORT= to xcatinfo --- xCAT-server/share/xcat/install/scripts/post.debian | 14 +++++++++++++- xCAT-server/share/xcat/install/scripts/post.xcat | 7 +++++++ xCAT/postscripts/xcatdsklspost | 7 +++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/install/scripts/post.debian b/xCAT-server/share/xcat/install/scripts/post.debian index 83a84e413..b533faeb7 100644 --- a/xCAT-server/share/xcat/install/scripts/post.debian +++ b/xCAT-server/share/xcat/install/scripts/post.debian @@ -34,9 +34,13 @@ export MASTER_IP="#XCATVAR:XCATMASTER#" export MASTER_IPS="#XCATVAR:XCATMASTER#" export MASTER="#XCATVAR:XCATMASTER#" export INSTALLDIR=#TABLE:site:key=installdir:value# +export HTTPPORT=#TABLE:site:key=httpport:value# if [ -z "$INSTALLDIR" ]; then INSTALLDIR="/install" fi +if [ -z "$HTTPPORT" ]; then + HTTPPORT="80" +fi cd /tmp RAND=$(perl -e 'print int(rand(50)). "\n"') sleep $RAND @@ -45,7 +49,7 @@ do GOTIT=0 for i in $MASTER_IPS do - wget -l inf -N -r --waitretry=10 --random-wait --retry-connrefused -e robots=off -nH --cut-dirs=2 --reject "index.html*" --no-parent -t 0 -T 60 http://$i$INSTALLDIR/postscripts/ -P /xcatpost + wget -l inf -N -r --waitretry=10 --random-wait --retry-connrefused -e robots=off -nH --cut-dirs=2 --reject "index.html*" --no-parent -t 0 -T 60 http://${i}:${HTTPPORT}${INSTALLDIR}/postscripts/ -P /xcatpost #wget --wait=10 --random-wait --waitretry=10 --retry-connrefused -t 0 -T 60 http://$i/install/autoinst/xcatpost.tar.gz if [ "$?" = "0" ] then @@ -95,6 +99,14 @@ do else echo "XCATSERVER=$i" >> /opt/xcat/xcatinfo fi + + grep 'HTTPPORT' /opt/xcat/xcatinfo > /dev/null 2>&1 + if [ $? -eq 0 ]; then + sed -i "s/HTTPPORT=.*/HTTPPORT=$HTTPPORT/" /opt/xcat/xcatinfo + else + echo "HTTPPORT=$HTTPPORT" >> /opt/xcat/xcatinfo + fi + break fi RAND=$(perl -e 'print int(rand(5)). "\n"') diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index c6b3c7eec..fc614b805 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -79,6 +79,13 @@ else echo "INSTALLDIR=$INSTALLDIR" >> /opt/xcat/xcatinfo fi +grep 'HTTPPORT' /opt/xcat/xcatinfo > /dev/null 2>&1 +if [ $? -eq 0 ]; then + sed -i "s/HTTPPORT=.*/HTTPPORT=$HTTPPORT/" /opt/xcat/xcatinfo +else + echo "HTTPPORT=$HTTPPORT" >> /opt/xcat/xcatinfo +fi + if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then msgutil_r "$MASTER_IP" "debug" "/opt/xcat/xcatinfo generated" "/var/log/xcat/xcat.log" "$log_label" fi diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index 6fea01ef3..cfdbf3d68 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -696,6 +696,13 @@ if [ -n "$new_ms" ]; then else echo "XCATSERVER=$new_ms" >> /opt/xcat/xcatinfo fi + + grep 'HTTPPORT' /opt/xcat/xcatinfo > /dev/null 2>&1 + if [ $? -eq 0 ]; then + sed -i "s/HTTPPORT=.*/HTTPPORT=$HTTPPORT/" /opt/xcat/xcatinfo + else + echo "HTTPPORT=$HTTPPORT" >> /opt/xcat/xcatinfo + fi fi #save the USEFLOWCONTROL into the xcatinfo file From 5d90a4212c6c6198522cd48db53d4c3e4bfc845e Mon Sep 17 00:00:00 2001 From: yangsbj Date: Sun, 4 Nov 2018 21:54:30 -0500 Subject: [PATCH 042/121] change HTTPPORT in /proc/cmdline to XCATHTTPPORT to avoid potential confilic --- xCAT-server/lib/xcat/plugins/anaconda.pm | 2 +- xCAT-server/lib/xcat/plugins/debian.pm | 2 +- xCAT-server/lib/xcat/plugins/sles.pm | 2 +- xCAT/postscripts/xcatdsklspost | 15 +++++++++++++-- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 84e6f7167..4fea40716 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -653,7 +653,7 @@ sub mknetboot $kcmdline .= "XCAT=$xcatmasterip:$xcatdport "; - $kcmdline .= "HTTPPORT=$httpport "; + $kcmdline .= "XCATHTTPPORT=$httpport "; if ($rootfstype ne "ramdisk") { diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm index 17838589e..70c2e6ddb 100644 --- a/xCAT-server/lib/xcat/plugins/debian.pm +++ b/xCAT-server/lib/xcat/plugins/debian.pm @@ -1336,7 +1336,7 @@ sub mknetboot } - $kcmdline .=" HTTPPORT=$httpport "; + $kcmdline .=" XCATHTTPPORT=$httpport "; # add support for subVars in the value of "statemnt" my $statemnt = ""; diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index d867e344f..79487429e 100644 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -515,7 +515,7 @@ sub mknetboot "imgurl=$httpmethod://$imgsrv:$httpport/$rootimgdir/$compressedrootimg "; } $kcmdline .= "XCAT=$xcatmaster:$xcatdport quiet "; - $kcmdline .= " HTTPPORT=$httpport "; + $kcmdline .= " XCATHTTPPORT=$httpport "; #if site.nodestatus="n", append "nonodestatus" to kcmdline #to inform the statelite/stateless node not to update the nodestatus during provision diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index cfdbf3d68..1cfd3a89c 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -376,13 +376,24 @@ if [ "$MODE" = "4" ]; then # for statelite mode echo "XCATSERVER=$XCATSERVER" >> /opt/xcat/xcatinfo fi break + elif [ "$KEY" = "XCATHTTPPORT" ]; then + HTTPPORT=`echo $i | awk -F= '{print $2}'` + grep 'HTTPPORT' /opt/xcat/xcatinfo > /dev/null 2>&1 + if [ $? -eq 0 ]; then + sed -i "s/HTTPPORT=.*/HTTPPORT=$HTTPPORT/" /opt/xcat/xcatinfo + else + echo "HTTPPORT=$HTTPPORT" >> /opt/xcat/xcatinfo + fi + break + fi done if [ -f /opt/xcat/xcatinfo ]; then SIP=`grep 'XCATSERVER' /opt/xcat/xcatinfo |cut -d= -f2` + HTTPPORT=`grep 'HTTPPORT' /opt/xcat/xcatinfo |cut -d= -f2` if [ -n "$SIP" ]; then - download_postscripts $SIP + download_postscripts $SIP:${HTTPPORT} if [ $? -eq 0 ]; then downloaded=1 fi @@ -469,7 +480,7 @@ else # for common mode MODE=1,2,3,5 (updatenode,moncfg,node deployment) TMP=`echo $i | awk -F= '{print $2}'` SIP=`echo $TMP | cut -d: -f1` - elif [ "$KEY" = "HTTPPORT" ];then + elif [ "$KEY" = "XCATHTTPPORT" ];then HTTPPORT=$(echo $i | awk -F= '{print $1}') [ -z "$HTTPPORT" ] && HTTPPORT="80" fi From bf37448db67bdbd6193456178fbd5663b84c327b Mon Sep 17 00:00:00 2001 From: litingt Date: Sun, 4 Nov 2018 22:23:08 -0500 Subject: [PATCH 043/121] add labels for all cases which has no labels --- xCAT-test/autotest/testcase/HA/case0 | 2 ++ xCAT-test/autotest/testcase/addkit/cases0 | 6 +++++ xCAT-test/autotest/testcase/addkitcomp/case0 | 6 +++++ .../autotest/testcase/bmcdiscover/cases0 | 10 +++++++ xCAT-test/autotest/testcase/buildkit/cases0 | 27 +++++++++++++++++++ xCAT-test/autotest/testcase/chkkitcomp/cases0 | 3 +++ .../autotest/testcase/confignetwork/cases0 | 24 +++++++++++++++++ xCAT-test/autotest/testcase/confignics/cases0 | 9 +++++++ xCAT-test/autotest/testcase/copycds/cases1 | 1 + .../testcase/discovery/bmc_discovery_only | 1 + .../discovery/mtm_based_node_discovery | 1 + .../discovery/switch_based_node_discovery | 1 + .../autotest/testcase/dockercommand/cases0 | 12 +++++++++ xCAT-test/autotest/testcase/genesis/cases0 | 4 +++ xCAT-test/autotest/testcase/genimage/cases0 | 4 +++ xCAT-test/autotest/testcase/geninitrd/cases0 | 1 + .../get_install_disk/fresh_install_disk | 1 + .../testcase/get_install_disk/reinstall_disk | 1 + xCAT-test/autotest/testcase/getmacs/cases0 | 3 +++ xCAT-test/autotest/testcase/go-xcat/case0 | 7 +++++ xCAT-test/autotest/testcase/go-xcat/case1 | 4 +++ xCAT-test/autotest/testcase/go-xcat/case2 | 6 +++++ xCAT-test/autotest/testcase/go-xcat/case4 | 1 + xCAT-test/autotest/testcase/imgexport/cases0 | 4 +++ xCAT-test/autotest/testcase/imgimport/cases0 | 5 ++++ xCAT-test/autotest/testcase/infiniband/cases0 | 3 +++ .../autotest/testcase/install_xCAT/case0 | 2 ++ .../testcase/kdump/linux_diskless_kdump | 3 +++ xCAT-test/autotest/testcase/lskit/case0 | 6 +++++ xCAT-test/autotest/testcase/lskitcomp/case0 | 5 ++++ .../autotest/testcase/lskitdeployparam/case0 | 5 ++++ xCAT-test/autotest/testcase/lslite/cases0 | 3 +++ xCAT-test/autotest/testcase/lsvm/cases0 | 3 +++ .../autotest/testcase/makeconservercf/cases0 | 6 ++--- .../autotest/testcase/makeknownhosts/cases0 | 5 +++- .../autotest/testcase/makenetworks/cases0 | 11 +++++--- xCAT-test/autotest/testcase/makentp/cases0 | 10 +++++++ xCAT-test/autotest/testcase/makeroutes/cases0 | 6 +++++ .../testcase/migration/redhat_migration | 2 ++ .../testcase/migration/sles_migration | 2 ++ .../testcase/migration/ubuntu_migration1_p8le | 1 + .../testcase/migration/ubuntu_migration1_vm | 1 + .../testcase/migration/ubuntu_migration2_p8le | 1 + .../testcase/migration/ubuntu_migration2_vm | 1 + xCAT-test/autotest/testcase/mkvm/cases0 | 1 + xCAT-test/autotest/testcase/ngpfb/cases0 | 19 +++++++++++++ xCAT-test/autotest/testcase/nodeset/cases1 | 9 +++++++ xCAT-test/autotest/testcase/nodestat/cases0 | 3 ++- xCAT-test/autotest/testcase/nodestat/cases1 | 1 + xCAT-test/autotest/testcase/osdeploy/cases0 | 17 ++++++++++++ xCAT-test/autotest/testcase/packimg/cases0 | 12 +++++++++ xCAT-test/autotest/testcase/passwd/case0 | 8 ++++++ xCAT-test/autotest/testcase/pdu/case0 | 7 +++++ xCAT-test/autotest/testcase/performance/case0 | 4 +++ xCAT-test/autotest/testcase/pkg/cases0 | 18 ++++++++----- xCAT-test/autotest/testcase/pping/cases0 | 4 +++ xCAT-test/autotest/testcase/ppping/cases0 | 10 +++++++ .../autotest/testcase/probe/detect_dhcpd | 1 + xCAT-test/autotest/testcase/prsync/cases0 | 4 +++ xCAT-test/autotest/testcase/pscp/cases0 | 5 ++++ xCAT-test/autotest/testcase/psh/cases0 | 6 +++++ .../autotest/testcase/pythonsupport/cases0 | 1 + .../autotest/testcase/restapi/global/cases0 | 6 +++++ .../autotest/testcase/restapi/group/cases0 | 5 ++++ .../autotest/testcase/restapi/network/cases0 | 10 +++++++ .../autotest/testcase/restapi/node/cases0 | 17 ++++++++++++ .../autotest/testcase/restapi/node/cases1 | 9 +++++++ .../autotest/testcase/restapi/osimage/cases0 | 14 ++++++++++ .../autotest/testcase/restapi/policy/cases0 | 9 +++++++ .../autotest/testcase/restapi/service/cases0 | 6 +++++ .../autotest/testcase/restapi/table/cases0 | 8 ++++++ xCAT-test/autotest/testcase/rmkit/case0 | 6 +++++ xCAT-test/autotest/testcase/rmkitcomp/case0 | 4 +++ xCAT-test/autotest/testcase/rmvm/cases0 | 1 + xCAT-test/autotest/testcase/rscan/cases0 | 6 +++++ .../autotest/testcase/runcmdinstaller/cases0 | 2 ++ xCAT-test/autotest/testcase/signal/cases0 | 1 + .../testcase/simulator/clear_simulator | 4 +++ .../testcase/simulator/setup_simulator | 8 ++++++ xCAT-test/autotest/testcase/sinv/cases0 | 2 ++ .../cfg_wrong_cn_in_sn_pool_tftp_sync_mode | 1 + ..._set_xcatmaster_in_sn_pool_tftp_mount_mode | 1 + ...ter_in_sn_pool_tftp_mount_mode_checkresult | 1 + ...t_set_xcatmaster_in_sn_pool_tftp_sync_mode | 1 + ...et_disjointdhcps_in_sn_pool_tftp_sync_mode | 1 + .../set_xcatmaster_in_sn_pool_tftp_mount_mode | 1 + ...ter_in_sn_pool_tftp_mount_mode_checkresult | 1 + .../set_xcatmaster_in_sn_pool_tftp_sync_mode | 1 + .../snpool/setup_sn_pool_tftp_mount_mode | 1 + .../snpool/setup_sn_pool_tftp_sync_mode | 1 + .../autotest/testcase/switchdiscover/cases0 | 8 ++++++ xCAT-test/autotest/testcase/sysclone/cases0 | 1 + xCAT-test/autotest/testcase/testenv/case0 | 1 + xCAT-test/autotest/testcase/updatenode/cases0 | 20 ++++++++++++++ xCAT-test/autotest/testcase/updatenode/cases1 | 2 ++ xCAT-test/autotest/testcase/updatenode/cases2 | 2 ++ xCAT-test/autotest/testcase/updatenode/cases3 | 1 + xCAT-test/autotest/testcase/updatenode/cases4 | 2 ++ .../updatenode/filesyncing_hierarchy_case | 1 + .../xcatdebugmode/rhels_xcatdebugmode_diskful | 6 +++++ .../xcatdebugmode/sles_xcatdebugmode_diskful | 4 +++ .../ubuntu_xcatdebugmode_diskful | 4 +++ xCAT-test/autotest/testcase/xdshbak/cases0 | 5 ++++ 103 files changed, 520 insertions(+), 15 deletions(-) diff --git a/xCAT-test/autotest/testcase/HA/case0 b/xCAT-test/autotest/testcase/HA/case0 index 28618f211..e1fdb14af 100644 --- a/xCAT-test/autotest/testcase/HA/case0 +++ b/xCAT-test/autotest/testcase/HA/case0 @@ -1,5 +1,6 @@ #only support redhat and postgresql start:setup_2_new_HA_MN +label:others,HA os:Linux #back up cmd:lsdef -z $$PRIMARYMN > /tmp/node.stanza @@ -149,6 +150,7 @@ cmd:if [[ -f /install/postscripts/check_node_state.bak ]] ;then mv -f /install/p end start:configure_exist_xCAT_MN_to_HA_MN +label:others,HA os:Linux #back up cmd:lsdef -z $$PRIMARYMN > /tmp/node.stanza diff --git a/xCAT-test/autotest/testcase/addkit/cases0 b/xCAT-test/autotest/testcase/addkit/cases0 index 0ee49701a..c69256c44 100644 --- a/xCAT-test/autotest/testcase/addkit/cases0 +++ b/xCAT-test/autotest/testcase/addkit/cases0 @@ -1,4 +1,5 @@ start:addkit_v +label:others,KIT cmd:addkit -v check:rc==0 check:output~=Version @@ -7,6 +8,7 @@ check:output~=compatible_frameworks end start:addkit_h +label:others,KIT cmd:addkit -h check:rc==0 check:output~=Usage @@ -14,6 +16,7 @@ check:outpur!~error end start:addkit_kit +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/addkit;buildkit create prodkit @@ -35,6 +38,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prodkit end start:addkit_i +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/addkit;buildkit create prodkit @@ -54,6 +58,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prodkit end start:addkit_multikit +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prodkit cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prod2kit @@ -87,6 +92,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prod2kit end start:addkit_p +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prodkit cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prod2kit diff --git a/xCAT-test/autotest/testcase/addkitcomp/case0 b/xCAT-test/autotest/testcase/addkitcomp/case0 index aea1ed058..1265e1d4d 100644 --- a/xCAT-test/autotest/testcase/addkitcomp/case0 +++ b/xCAT-test/autotest/testcase/addkitcomp/case0 @@ -1,4 +1,5 @@ start:addkitcomp_v +label:others,KIT os:Linux cmd:addkitcomp -v check:rc==0 @@ -13,6 +14,7 @@ check:output=~compatible_frameworks end start:addkitcomp_h +label:others,KIT os:Linux cmd:addkitcomp -h check:rc==0 @@ -23,6 +25,7 @@ check:output=~ Usage end start:addkitcomp_i +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp;buildkit create mykits @@ -54,6 +57,7 @@ check:rc==0 end start:addkitcomp_f +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp;buildkit create mykits @@ -84,6 +88,7 @@ check:rc==0 end start:addkitcomp_a +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp/$$KITDATA cmd:mkdir -p /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp/$$KITDATA @@ -126,6 +131,7 @@ check:rc==0 end start:addkitcomp_noscripts +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp/$$KITDATA cmd:mkdir -p /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp/$$KITDATA diff --git a/xCAT-test/autotest/testcase/bmcdiscover/cases0 b/xCAT-test/autotest/testcase/bmcdiscover/cases0 index 203b5ae2d..5cc7fc0d7 100644 --- a/xCAT-test/autotest/testcase/bmcdiscover/cases0 +++ b/xCAT-test/autotest/testcase/bmcdiscover/cases0 @@ -1,4 +1,5 @@ start:bmcdiscover_q +label:others,discovery os:linux decription:query usage for bmcdiscover cmd:bmcdiscover ? @@ -10,6 +11,7 @@ check:output=~bmcdiscover \[-v|--version\] end start:bmcdiscover_help +label:others,discovery os:linux decription:show bmcdiscover help information cmd:bmcdiscover help @@ -21,6 +23,7 @@ check:output=~bmcdiscover \[-v|--version\] end start:bmcdiscover_version +label:others,discovery os:linux description:show bmcdiscover version cmd:bmcdiscover --version @@ -29,6 +32,7 @@ check:output=~bmcdiscover - xCAT Version end start:bmcdiscover_h +label:others,discovery os:Linux decription:help cmd:bmcdiscover -h @@ -37,30 +41,35 @@ check:output=~Usage end start:bmcdiscover_nmap_range +label:others,discovery cmd:bmcdiscover -s nmap --range $$bmcrange -u $$bmcusername -p $$bmcpasswd check:rc==0 check:output=~$$bmcrange end start:bmcdiscover_v +label:others,discovery cmd:bmcdiscover -v check:rc==0 checkout:output=~xCAT Version end start:bmcdiscover_check_paswd +label:others,discovery cmd:bmcdiscover -i $$bmcrange -u $$bmcusername -p $$bmcpasswd --check check:rc==1 check:output=~is not supported end start:bmcdiscover_get_ipsource +label:others,discovery cmd:bmcdiscover -i $$bmcrange -u $$bmcusername -p $$bmcpasswd --ipsource check:rc==1 check:output=~is not supported end start:bmcdiscover_range_w +label:others,discovery cmd:bmcdiscover --range $$bmcrange -u $$bmcusername -p $$bmcpasswd -w check:rc==0 check:output=~Writing node @@ -69,6 +78,7 @@ end start:bmcdiscover_range_z +label:others,discovery cmd:bmcdiscover --range $$bmcrange -u $$bmcusername -p $$bmcpasswd -z check:rc==0 check:output=~bmc=$$bmcrange diff --git a/xCAT-test/autotest/testcase/buildkit/cases0 b/xCAT-test/autotest/testcase/buildkit/cases0 index 0855adf94..995dcdcb0 100644 --- a/xCAT-test/autotest/testcase/buildkit/cases0 +++ b/xCAT-test/autotest/testcase/buildkit/cases0 @@ -1,4 +1,5 @@ start:buildkit_v +label:others,KIT os:Linux cmd:buildkit -v check:rc==0 @@ -13,6 +14,7 @@ check:output=~compatible_frameworks end start:buildkit_h +label:others,KIT os:Linux cmd:buildkit -h check:rc==0 @@ -23,6 +25,7 @@ check:output=~ Usage end start:buildkit_create +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits cmd:mkdir -p /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits @@ -44,6 +47,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits end start:buildkit_create_l +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits cmd:mkdir -p /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits @@ -63,6 +67,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits end start:buildkit_buildrepo_all +label:others,KIT os:rhels cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -80,6 +85,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_buildrepo_all +label:others,KIT os:sles cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -97,6 +103,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_buildrepo_all +label:others,KIT os:ubuntu cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -114,6 +121,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_buildrepo_rhels +label:others,KIT os:rhels cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -131,6 +139,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_buildrepo_sles +label:others,KIT os:sles cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -148,6 +157,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_buildrepo_ubuntu +label:others,KIT os:ubuntu cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -165,6 +175,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_cleanrepo_all +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -181,6 +192,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_cleanrepo_rhels +label:others,KIT os:rhels cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -197,6 +209,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_cleanrepo_sles +label:others,KIT os:sles cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -213,6 +226,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_cleanrepo_ubuntu +label:others,KIT os:ubuntu cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -229,6 +243,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_listrepo +label:others,KIT os:rhels cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -244,6 +259,7 @@ end start:buildkit_listrepo +label:others,KIT os:sles cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -258,6 +274,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_listrepo +label:others,KIT os:ubuntu cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -272,6 +289,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_buildtar +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -291,6 +309,7 @@ end start:buildkit_cleantar +label:others,KIT os:rhels cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -312,6 +331,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_cleantar +label:others,KIT os:sles cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -333,6 +353,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_cleantar +label:others,KIT os:ubuntu cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -354,6 +375,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_partialkit +label:others,KIT os:rhels cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -377,6 +399,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_partialkit +label:others,KIT os:sles cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -400,6 +423,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_partialkit_ubuntu +label:others,KIT os:ubuntu cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -423,6 +447,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_partialkit_completekit +label:others,KIT os:rhels cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -454,6 +479,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_partialkit_completekit +label:others,KIT os:sles cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -485,6 +511,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_partialkit_completekit +label:others,KIT os:ubuntu cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit diff --git a/xCAT-test/autotest/testcase/chkkitcomp/cases0 b/xCAT-test/autotest/testcase/chkkitcomp/cases0 index c7cfb6c49..2a8ea8935 100644 --- a/xCAT-test/autotest/testcase/chkkitcomp/cases0 +++ b/xCAT-test/autotest/testcase/chkkitcomp/cases0 @@ -1,4 +1,5 @@ start:chkkitcomp_v +label:others,KIT cmd:chkkitcomp -v check:rc==0 check:output~=Version @@ -7,6 +8,7 @@ check:output~=compatible_frameworks end start:chkkitcomp_h +label:others,KIT cmd:addkit -h check:rc==0 check:output~=Usage @@ -14,6 +16,7 @@ check:outpur!~error end start:chkkitcomp_V +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/chkkitcomp/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/chkkitcomp;buildkit create mykits diff --git a/xCAT-test/autotest/testcase/confignetwork/cases0 b/xCAT-test/autotest/testcase/confignetwork/cases0 index 969f7fbee..cb1248391 100644 --- a/xCAT-test/autotest/testcase/confignetwork/cases0 +++ b/xCAT-test/autotest/testcase/confignetwork/cases0 @@ -1,5 +1,6 @@ start: confignetwork_s_installnic_diskful description: this case is to test confignetwork -s could configure installnic successfully in diskful provision. +label:others,network,invoke_provision cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 @@ -41,6 +42,7 @@ end start:confignetwork_s_installnic_diskless description: this case is to test confignetwork -s could configure installnic successfully in diskless provision. +label:others,network,invoke_provision cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 cmd:chdef -t node -o $$CN postbootscripts="confignetwork -s" @@ -89,6 +91,7 @@ end start: confignetwork_secondarynic_diskless description: this case is to test confignetwork -s could config installnic and secondarynic at the same time successfully in diskless provision. +label:others,network,invoke_provision cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 cmd:mkdef -t network -o 100_1_0_0-255_255_0_0 net=100.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC @@ -149,6 +152,7 @@ end start:confignetwork_s_installnic_secondarynic_updatenode description: this case is to test confignetwork -s could configure installnic and secondarynic successfully with updatenode. +label:others,network,invoke_provision cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -180,6 +184,7 @@ end start:confignetwork_secondarynic_updatenode description: this case is to test confignetwork could configure secondarynic successfully with updatenode. +label:others,network,invoke_provision cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -209,6 +214,7 @@ end start: confignetwork_secondarynic_nicaliases_updatenode description: this case is to test confignetwork could config secondarynic nicaliases successfully with updatenode. +label:others,network,invoke_provision cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -251,6 +257,7 @@ end start:confignetwork_secondarynic_nicextraparams_updatenode description: this case is to test confignetwork could configure secondarynic nicextraparams successfully with updatenode. +label:others,network,invoke_provision cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -294,6 +301,7 @@ end start:confignetwork_secondarynic_nicnetworks_updatenode_false description: this case is to test confignetwork could return error message when there is no not enough attributes when configing secondarynic with updatenode. +label:others,network,invoke_provision cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC @@ -310,6 +318,7 @@ end start:confignetwork_secondarynic_nicips_updatenode_false description: this case is to test confignetwork could return error message when there is no not enough attributes when configing secondarynic with updatenode. +label:others,network,invoke_provision cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC @@ -326,6 +335,7 @@ end start:confignetwork_secondarynic_nictype_updatenode_false description: this case is to test confignetwork could return error message when there is no not enough attributes when configing secondarynic with updatenode. +label:others,network,invoke_provision cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC @@ -343,6 +353,7 @@ end start:confignetwork_disable_set_to_yes description: this case is to test if confignetwork could work correctly when disable is set to yes in nics table +label:others,network,invoke_provision cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=100.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC @@ -363,6 +374,7 @@ end start:confignetwork_disable_set_to_1 description: this case is to test if confignetwork could work correctly when disable is set to 1 in nics table +label:others,network,invoke_provision cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=100.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC @@ -383,6 +395,7 @@ end start:confignetwork_niccustomscripts description: this case is to test confignetwork could config secondarynic and envoke scripts to execute. +label:others,network,invoke_provision cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:echo "echo hello > /tmp/confignetwork_niccustomscript" > /tmp/script1 @@ -410,6 +423,7 @@ end start:confignetwork_secondarynic_thirdnic_multiplevalue_updatenode description:this case is to verify if confignetwork could config serveral nics' multiple value at the same time. +label:others,network,invoke_provision cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -469,6 +483,7 @@ end start:confignetwork_vlan_eth0 description: this case is to verify if confignetwork could config vlan for CN.When CN has Ethernet nic eth0, user wants to confgure 2 vlans, Configure vlan eth0.6 60.5.106.9 and eth0.7 70.5.106.9 based on ethernet nic eth0 +label:others,network,invoke_provision cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -520,6 +535,7 @@ end start:confignetwork_vlan_false description:this case is to verify if confignetwork could process the false value when vlan nicdevice is not correctly set +label:others,network,invoke_provision cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -564,6 +580,7 @@ end start:confignetwork_bond_eth2_eth3 description: this case is to verify if confignetwork could config bond for CN.CN has 2 Ethernet nics, eth2 and eth3, user configures bond bond0 using ethernet nic eth2 and eth3. +label:others,network,invoke_provision cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -618,6 +635,7 @@ end start:confignetwork_bond_false description: this case is to verify if confignetwork could process when bond is not correctly set. +label:others,network,invoke_provision cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -666,6 +684,7 @@ end start:confignetwork_vlan_bond description: this case is to verify if confignetwork could config bond for CN.CN has 2 Ethernet nic eth2 and eth3, user wants to bond them to bond0, then make 2 vlan bond0.2 and bond0.3 for data network. +label:others,network,invoke_provision cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -731,6 +750,7 @@ end start:confignetwork_2eth_bridge_br0 description:this case is to verify if confignetwork could config bridge for CN.CN has 2 Ethernet nics eth2 and eth3, user want to configure bond bond0 using eth2 and eth3, creates bridge br0 based on bond0. +label:others,network,invoke_provision cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -785,6 +805,7 @@ end start:confignetwork_2eth_bridge_br22_br33 description:this case is to verify if confignetwork could config bridge for CN.CN has 2 Ethernet nics eth2 and eth3, user wants to bond them as bond0, then make vlan bond0.2 and bond0.3, using bond0.2 create bridge br22,using bond0.3 create bridge br33. Use confignetwork to configure bond bond0, create vlan bond0.2 and bond0.3, create bridge br22 and br33. +label:others,network,invoke_provision cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -851,6 +872,7 @@ end start:confignetwork_installnic_2eth_bridge_br22_br33 description:this case is to test if confignetwork could config installnic and 2 bridges at the same time +label:others,network,invoke_provision cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -920,6 +942,7 @@ end start:confignetwork__bridge_false description:this case is to test if confignetwork could process false value when the bridge is not correctly set. +label:others,network,invoke_provision cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -952,6 +975,7 @@ end start:confignetwork_static_installnic description:Reconfigure installnic without dhclient lease file +label:others,network,invoke_provision cmd:lsdef $$CN -z && lsdef -l $$CN -z >/tmp/CN.stanza check:rc==0 cmd:xdsh $$CN "mkdir -p /tmp/backupnet" diff --git a/xCAT-test/autotest/testcase/confignics/cases0 b/xCAT-test/autotest/testcase/confignics/cases0 index 6b161461e..173e582ea 100644 --- a/xCAT-test/autotest/testcase/confignics/cases0 +++ b/xCAT-test/autotest/testcase/confignics/cases0 @@ -1,5 +1,6 @@ start:confignics_config_one_port_single_value description:confignics +label:others,network,confignics,updatenode cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 100_1_0_0-255_255_0_0 net=100.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1501 @@ -19,6 +20,7 @@ end start:confignics_config_multiple_ports_single_value description:confignics +label:others,network,confignics,updatenode cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 100_1_0_0-255_255_0_0 net=100.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1501 @@ -49,6 +51,7 @@ end start:confignics_config_multiple_ports_multiple_value description:confignics +label:others,network,confignics,updatenode cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1501 @@ -93,6 +96,7 @@ end start:confignics_config_multiple_port_withnichostnamesuffixes_multiple_value description:confignics +label:others,network,confignics,updatenode cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1501 @@ -147,6 +151,7 @@ end start:confignics_config_multiple_port_withnicaliases_multiple_value description:confignics +label:others,network,confignics,updatenode cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC @@ -200,6 +205,7 @@ end start:confignics_disable_set_to_yes description:confignics +label:others,network,confignics,updatenode cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN ifdown $$SECONDNIC @@ -222,6 +228,7 @@ end start:confignics_disable_set_to_1 description:confignics +label:others,network,confignics,updatenode cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN ifdown $$SECONDNIC @@ -244,6 +251,7 @@ end start:confignics_s description:confignics_s +label:others,network,confignics,updatenode cmd:tabdump networks > /opt/xcat/share/xcat/tools/autotest/testcase/confignics/networks.csv check:rc==0 cmd:/opt/xcat/share/xcat/tools/autotest/testcase/confignics/mtu_set_clean S 1496 @@ -268,6 +276,7 @@ check:rc==0 end start:chdef_nicips description:nicip could be set to null +label:others,network,confignics,updatenode Attribute: $$CN-The operation object of chdef command cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 diff --git a/xCAT-test/autotest/testcase/copycds/cases1 b/xCAT-test/autotest/testcase/copycds/cases1 index a814a99cc..d2ed72467 100644 --- a/xCAT-test/autotest/testcase/copycds/cases1 +++ b/xCAT-test/autotest/testcase/copycds/cases1 @@ -1,5 +1,6 @@ start:copycds_bogus_disc description: Test cases for the copycds with a bogus disc +label:others cmd:/opt/xcat/share/xcat/tools/autotest/testcase/copycds/copycds_bogus_disc check:rc==0 end diff --git a/xCAT-test/autotest/testcase/discovery/bmc_discovery_only b/xCAT-test/autotest/testcase/discovery/bmc_discovery_only index 0b871c218..3fc566434 100644 --- a/xCAT-test/autotest/testcase/discovery/bmc_discovery_only +++ b/xCAT-test/autotest/testcase/discovery/bmc_discovery_only @@ -1,5 +1,6 @@ start:bmc_discovery_only description: test the whole process of bmc discovery +label:others,discovery Attribute: $$NODE_DISCOVERY_TARGET:The machine plan to be discovered. $$NODE_DISCOVERY_BMC_DYNAMIC_IP_RANGE :The valid dymanic ip range which has been configured in DHCP server and can offer service. cmd:/opt/xcat/share/xcat/tools/autotest/testcase/discovery/discovery_test --discovery_target_node $$NODE_DISCOVERY_TARGET --bmc_dynamic_ip_range $$NODE_DISCOVERY_BMC_DYNAMIC_IP_RANGE --bmc_discovery_only check:rc==0 diff --git a/xCAT-test/autotest/testcase/discovery/mtm_based_node_discovery b/xCAT-test/autotest/testcase/discovery/mtm_based_node_discovery index 80e28fa3c..135c70b7e 100644 --- a/xCAT-test/autotest/testcase/discovery/mtm_based_node_discovery +++ b/xCAT-test/autotest/testcase/discovery/mtm_based_node_discovery @@ -1,5 +1,6 @@ start:mtms_based_node_discovery description: test the whole process of mtms_based node discovery +label:others,discovery Attribute: $$NODE_DISCOVERY_TARGET:The machine plan to be discovered. $$NODE_DISCOVERY_BMC_DYNAMIC_IP_RANGE :The valid dymanic ip range which has been configured in DHCP server and can offer service. cmd:/opt/xcat/share/xcat/tools/autotest/testcase/discovery/discovery_test --discovery_mode mtms --discovery_target_node $$NODE_DISCOVERY_TARGET --bmc_dynamic_ip_range $$NODE_DISCOVERY_BMC_DYNAMIC_IP_RANGE --osimage __GETNODEATTR($$NODE_DISCOVERY_TARGET,os)__-__GETNODEATTR($$NODE_DISCOVERY_TARGET,arch)__-install-compute check:rc==0 diff --git a/xCAT-test/autotest/testcase/discovery/switch_based_node_discovery b/xCAT-test/autotest/testcase/discovery/switch_based_node_discovery index 092e33388..a25bc0c9e 100644 --- a/xCAT-test/autotest/testcase/discovery/switch_based_node_discovery +++ b/xCAT-test/autotest/testcase/discovery/switch_based_node_discovery @@ -1,5 +1,6 @@ start:switch_based_node_discovery description: test the whole process of switch_based node discovery +label:others,discovery Attribute: $$NODE_DISCOVERY_TARGET:The machine plan to be discovered. $$NODE_DISCOVERY_BMC_DYNAMIC_IP_RANGE :The valid dymanic ip range which has been configured in DHCP server and can offer service. cmd:/opt/xcat/share/xcat/tools/autotest/testcase/discovery/discovery_test --discovery_mode switch --discovery_target_node $$NODE_DISCOVERY_TARGET --bmc_dynamic_ip_range $$NODE_DISCOVERY_BMC_DYNAMIC_IP_RANGE --osimage __GETNODEATTR($$NODE_DISCOVERY_TARGET,os)__-__GETNODEATTR($$NODE_DISCOVERY_TARGET,arch)__-install-compute check:rc==0 diff --git a/xCAT-test/autotest/testcase/dockercommand/cases0 b/xCAT-test/autotest/testcase/dockercommand/cases0 index 3ae9503b4..c1cb737be 100644 --- a/xCAT-test/autotest/testcase/dockercommand/cases0 +++ b/xCAT-test/autotest/testcase/dockercommand/cases0 @@ -1,5 +1,6 @@ start:rpower_stop_docker description:stop a created docker instance +label:others,docker cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker check:rc==0 cmd:makehosts $$DOCKERCN @@ -27,6 +28,7 @@ check:rc==0 end start:rpower_start_docker description:start a created docker instance +label:others,docker cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker check:rc==0 cmd:makehosts $$DOCKERCN @@ -52,6 +54,7 @@ end start:rpower_state_docker description:get state of the instance +label:others,docker cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker check:rc==0 cmd:makehosts $$DOCKERCN @@ -84,6 +87,7 @@ end start:rpower_restart_docker description:restart a created docker instance +label:others,docker cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker check:rc==0 cmd:makehosts $$DOCKERCN @@ -141,6 +145,7 @@ end start:rpower_unpause_docker description:unpause all processes in the instance +label:others,docker cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker check:rc==0 cmd:makehosts $$DOCKERCN @@ -167,12 +172,14 @@ check:rc==0 end start:mkdocker_h description:output usage for mkdocker +label:others,docker cmd:mkdocker -h check:rc==0 check:output=~Usage: mkdocker end start:mkdocker_command description:create docker instance image should be ubuntu and command should be bash here +label:others,docker cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker check:rc==0 cmd:makehosts $$DOCKERCN @@ -204,12 +211,14 @@ check:rc==0 end start:rmdocker_h description:output usage for rmdocker +label:others,docker cmd:rmdocker -h check:rc==0 check:output=~Usage: rmdocker end start:rmdocker_command description:remove docker instance +label:others,docker cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker check:rc==0 cmd:makehosts $$DOCKERCN @@ -231,6 +240,7 @@ check:rc==0 end start:rmdocker_f_command description:force to remove docker instance +label:others,docker cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker check:rc==0 cmd:makehosts $$DOCKERCN @@ -255,12 +265,14 @@ check:rc==0 end start:lsdocker_h_command description:output usage for lsdocker +label:others,docker cmd:lsdocker -h check:rc==0 check:output=~Usage: lsdocker end start:lsdocker_l_command description:list docker instance info +label:others,docker cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker check:rc==0 cmd:makehosts $$DOCKERCN diff --git a/xCAT-test/autotest/testcase/genesis/cases0 b/xCAT-test/autotest/testcase/genesis/cases0 index 92796a276..5ebe97e30 100644 --- a/xCAT-test/autotest/testcase/genesis/cases0 +++ b/xCAT-test/autotest/testcase/genesis/cases0 @@ -1,4 +1,5 @@ start:nodeset_shell +label:others,genesis description: verify could log in genesis shell cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/genesis/genesistest.pl -n $$CN -g check:rc==0 @@ -10,6 +11,7 @@ cmd:cat /tmp/genesistestlog/* end start:nodeset_cmdline +label:others,genesis description:verify could run cmdline successfully cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/genesis/genesistest.pl -n $$CN -g check:rc==0 @@ -21,6 +23,7 @@ cmd:cat /tmp/genesistestlog/* end start:nodeset_runimg +label:others,genesis description:verify runimg could work cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/genesis/genesistest.pl -n $$CN -g check:rc==0 @@ -31,6 +34,7 @@ check:rc==0 cmd:cat /tmp/genesistestlog/* end start:nodeset_shell_incorrectmasterip +label:others,genesis description:very if computenode need to do nodeset shell in different net with master will success cmd:/opt/xcat/share/xcat/tools/autotest/testcase/genesis/test.sh --check xnba check:rc==0 diff --git a/xCAT-test/autotest/testcase/genimage/cases0 b/xCAT-test/autotest/testcase/genimage/cases0 index ff4c2a804..559773020 100644 --- a/xCAT-test/autotest/testcase/genimage/cases0 +++ b/xCAT-test/autotest/testcase/genimage/cases0 @@ -1,4 +1,5 @@ start:genimage_h +label:others os:Linux cmd:genimage -h check:output=~Usage @@ -6,6 +7,7 @@ check:rc==0 end start:genimage_help +label:others os:Linux cmd:genimage --help check:output=~Usage @@ -13,6 +15,7 @@ check:rc==0 end start:genimage_stateless +label:others os:Linux cmd:copycds $$ISO check:rc==0 @@ -25,6 +28,7 @@ cmd:mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/c end start:genimage_statelite +label:others os:Linux cmd:copycds $$ISO check:rc==0 diff --git a/xCAT-test/autotest/testcase/geninitrd/cases0 b/xCAT-test/autotest/testcase/geninitrd/cases0 index 0f89c3253..2766519d9 100644 --- a/xCAT-test/autotest/testcase/geninitrd/cases0 +++ b/xCAT-test/autotest/testcase/geninitrd/cases0 @@ -1,4 +1,5 @@ start:geninitrd_i_n_o_p +label:others os:Linux cmd:copycds $$ISO cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute diff --git a/xCAT-test/autotest/testcase/get_install_disk/fresh_install_disk b/xCAT-test/autotest/testcase/get_install_disk/fresh_install_disk index 628424a0a..488a0b6f4 100644 --- a/xCAT-test/autotest/testcase/get_install_disk/fresh_install_disk +++ b/xCAT-test/autotest/testcase/get_install_disk/fresh_install_disk @@ -1,6 +1,7 @@ start:fresh_install_disk os:Linux description:check fresh install disk, usded for x86 multi disk only, and not check RH7.2 for RH os wwn isue. +label:others,invoke_provision,install_disk cmd:xdsh $$CN "dd if=/dev/zero of=/dev/sdb bs=1048576 count=100" cmd:xdsh $$CN "dd if=/dev/zero of=/dev/sdb bs=1048576 count=300 seek=60858" diff --git a/xCAT-test/autotest/testcase/get_install_disk/reinstall_disk b/xCAT-test/autotest/testcase/get_install_disk/reinstall_disk index 2a366e880..a894df7f7 100644 --- a/xCAT-test/autotest/testcase/get_install_disk/reinstall_disk +++ b/xCAT-test/autotest/testcase/get_install_disk/reinstall_disk @@ -1,6 +1,7 @@ start:reinstall_disk os:Linux description:check reinstall disk, usded for x86 multi disk only, and not check RH7.2 for RH os wwn isue. +label:others,invoke_provision,install_disk cmd:xdsh $$CN "dd if=/dev/zero of=/dev/sdb bs=1048576 count=100" cmd:xdsh $$CN "dd if=/dev/zero of=/dev/sdb bs=1048576 count=300 seek=60858" diff --git a/xCAT-test/autotest/testcase/getmacs/cases0 b/xCAT-test/autotest/testcase/getmacs/cases0 index 9f8589e3b..659ac4919 100644 --- a/xCAT-test/autotest/testcase/getmacs/cases0 +++ b/xCAT-test/autotest/testcase/getmacs/cases0 @@ -1,4 +1,5 @@ start:getmacs_noderange +label:others cmd:tabdump mac > /tmp/mac.csv cmd:chtab -d node=$$CN mac cmd:getmacs $$CN @@ -10,6 +11,7 @@ cmd:tabrestore /tmp/mac.csv cmd:rm /tmp/mac.csv end start:getmacs_d +label:others cmd:tabdump mac > /tmp/mac.csv cmd:chtab -d node=$$CN mac cmd:getmacs $$CN -d @@ -21,6 +23,7 @@ cmd:tabrestore /tmp/mac.csv cmd:rm /tmp/mac.csv end start:getmacs_f_D +label:others cmd:tabdump mac > /tmp/mac.csv cmd:chtab -d node=$$CN mac cmd:getmacs $$CN -f -D diff --git a/xCAT-test/autotest/testcase/go-xcat/case0 b/xCAT-test/autotest/testcase/go-xcat/case0 index dbcdf0a47..237693040 100644 --- a/xCAT-test/autotest/testcase/go-xcat/case0 +++ b/xCAT-test/autotest/testcase/go-xcat/case0 @@ -1,5 +1,6 @@ start:go_xcat_local_repo_case1 description:test go_xcat with the option --xcat-core=/path/to/xcat-core.repo install +label:others,go-xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -40,6 +41,7 @@ end start:go_xcat_local_repo_case2 description:test go_xcat with the option --xcat-core=/path/to/xcat-core install +label:others,go-xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -78,6 +80,7 @@ end start:go_xcat_local_repo_case3 description:test go_xcat with the option --xcat-core=/path/to/xcat-core.tar install +label:others,go-xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -116,6 +119,7 @@ end start:go_xcat_local_repo_case4 description:test go_xcat with the option --xcat-core=/path/to/xcat-core.tar.bz2 --xcat-dep=/path/to/xcat-dep.tar.bz2 install +label:others,go-xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -154,6 +158,7 @@ end start:go_xcat_local_repo_case5 description:test go_xcat with the option --xcat-core=/path/to/xcat-core.repo --xcat-dep=/path/to/xcat-dep.repo install +label:others,go-xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -200,6 +205,7 @@ end start:go_xcat_local_repo_case6 description:test go_xcat with the option --xcat-core=/path/to/xcat-core --xcat-dep=/path/to/xcat-dep install +label:others,go-xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -242,6 +248,7 @@ end start:go_xcat_local_repo_case7 description:test go_xcat with the option --xcat-core=/path/to/xcat-core.tar.bz2 --xcat-dep=/path/to/xcat-dep.tar.bz2 install +label:others,go-xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat xcat-buildkit xcat-genesis-scripts xcat-genesis-base-amd64 xcat-genesis-base-ppc64 -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi diff --git a/xCAT-test/autotest/testcase/go-xcat/case1 b/xCAT-test/autotest/testcase/go-xcat/case1 index 1cfec3af9..eb105537d 100644 --- a/xCAT-test/autotest/testcase/go-xcat/case1 +++ b/xCAT-test/autotest/testcase/go-xcat/case1 @@ -1,5 +1,6 @@ start:go_xcat_noinput description:test go_xcat without any input parameters +label:others,go-xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat xcat-buildkit xcat-genesis-scripts xcat-genesis-base-amd64 xcat-genesis-base-ppc64 -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -35,6 +36,7 @@ end start:go_xcat_with_x description:test go_xcat with the option -x version -y install +label:others,go-xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat xcat-buildkit xcat-genesis-scripts xcat-genesis-base-amd64 xcat-genesis-base-ppc64 -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -76,6 +78,7 @@ end start:go_xcat_with_xcat-version-1 description:test go_xcat with the option --xcat-version=devel install +label:others,go-xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat xcat-buildkit xcat-genesis-scripts xcat-genesis-base-amd64 xcat-genesis-base-ppc64 -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -110,6 +113,7 @@ end start:go_xcat_with_xcat-version-2 description:test go_xcat with the option --xcat-version=$MIGRATION2_VERSION install +label:others,go-xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi diff --git a/xCAT-test/autotest/testcase/go-xcat/case2 b/xCAT-test/autotest/testcase/go-xcat/case2 index ef1812a6f..1b354f952 100644 --- a/xCAT-test/autotest/testcase/go-xcat/case2 +++ b/xCAT-test/autotest/testcase/go-xcat/case2 @@ -1,5 +1,6 @@ start:go_xcat_online_repo_case1 description:test go_xcat with the option --xcat-core=http://xcat.org/path/to/xcat-core.repo install. This case is only for rh and suse +label:others,go-xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -30,6 +31,7 @@ end start:go_xcat_online_repo_case2 description:test go_xcat with the option --xcat-core=http://xcat.org/path/to/xcat-core install +label:others,go-xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -65,6 +67,7 @@ end start:go_xcat_online_repo_case3 description:test go_xcat with the option --xcat-core=http://xcat.org/path/to/xcat-core.tar.bz2 install +label:others,go-xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -100,6 +103,7 @@ end start:go_xcat_online_repo_case4 description:test go_xcat with the option --xcat-core=http://xcat.org/path/to/xcat-core.repo --xcat-dep=http://xcat.org/path/to/xcat-dep.repo install. This is for rh and suse. +label:others,go-xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -130,6 +134,7 @@ end start:go_xcat_online_repo_case5 description:test go_xcat with the option --xcat-core=http://xcat.org/path/to/xcat-core --xcat-dep=http://xcat.org/path/to/xcat-dep install +label:others,go-xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -164,6 +169,7 @@ end start:go_xcat_online_repo_case6 description:test go_xcat with the option --xcat-core=http://xcat.org/path/to/xcat-core.tar.bz2 --xcat-dep=http://xcat.org/path/to/xcat-dep.tar.bz2 install +label:others,go-xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat xcat-buildkit xcat-genesis-scripts xcat-genesis-base-amd64 xcat-genesis-base-ppc64 -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi diff --git a/xCAT-test/autotest/testcase/go-xcat/case4 b/xCAT-test/autotest/testcase/go-xcat/case4 index 79137ac6f..b765c0a57 100644 --- a/xCAT-test/autotest/testcase/go-xcat/case4 +++ b/xCAT-test/autotest/testcase/go-xcat/case4 @@ -1,5 +1,6 @@ start:go_xcat_update_case1 description:test go_xcat with the option update +label:others,go-xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi diff --git a/xCAT-test/autotest/testcase/imgexport/cases0 b/xCAT-test/autotest/testcase/imgexport/cases0 index b707553d5..246647447 100644 --- a/xCAT-test/autotest/testcase/imgexport/cases0 +++ b/xCAT-test/autotest/testcase/imgexport/cases0 @@ -1,6 +1,7 @@ start:imagexport_imagename_destination os:Linux description:imgexport __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute foo.tgz +label:others,packaging cmd:copycds $$ISO cmd:mkdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute -u profile=compute provmethod=statelite osvers=__GETNODEATTR($$CN,os)__ check:rc==0 @@ -25,6 +26,7 @@ end start:imgexport_imagename_destination_p_e os:Linux description:imgexport __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute foo.tgz -p $$CN -e /install/postscripts/testscript1 +label:others,packaging cmd:copycds $$ISO cmd:mkdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute -u profile=compute provmethod=statelite osvers=__GETNODEATTR($$CN,os)__ check:rc==0 @@ -54,6 +56,7 @@ end start:imgexport_h os:Linux description: +label:others cmd:imgexport -h check:output=~Usage|usage cmd:imgexport --help @@ -63,6 +66,7 @@ end start:imgexport_v os:Linux +label:others cmd:imgexport -v check:output=~version|Version cmd:imgexport --version diff --git a/xCAT-test/autotest/testcase/imgimport/cases0 b/xCAT-test/autotest/testcase/imgimport/cases0 index af145b820..2683d62ec 100644 --- a/xCAT-test/autotest/testcase/imgimport/cases0 +++ b/xCAT-test/autotest/testcase/imgimport/cases0 @@ -1,6 +1,7 @@ start:imgimport_h os:Linux description:imgimport -h and --help +label:others cmd:imgimport -h check:output=~usage|Usage cmd:imgimport --help @@ -11,6 +12,7 @@ end start:imgimport_v os:Linux description:imgimport -v and --version +label:others cmd:imgimport -v check:output=~version|Version cmd:imgimport --version @@ -21,6 +23,7 @@ end start:imgimport_bundlefile os:Linux description:imgimport foo.tgz +label:others,packaging cmd:copycds $$ISO cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute check:rc==0 @@ -45,6 +48,7 @@ end start:imgimport_bundlefile_p os:Linux description:imgimport foo.tgz -p $$CN +label:others,packaging cmd:copycds $$ISO cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute check:rc==0 @@ -69,6 +73,7 @@ end start:imgimport_bundlefile_f os:Linux description:imgimport foo.tgz -f compute_test +label:others,packaging cmd:copycds $$ISO cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute check:rc==0 diff --git a/xCAT-test/autotest/testcase/infiniband/cases0 b/xCAT-test/autotest/testcase/infiniband/cases0 index 2da6c8d92..176585f4d 100644 --- a/xCAT-test/autotest/testcase/infiniband/cases0 +++ b/xCAT-test/autotest/testcase/infiniband/cases0 @@ -1,17 +1,20 @@ start:rhel_infiniband_diskless_install description:Integration test of RHEL 7 and MLNX OFED for diskless installation. Following variables need to be set in the test configuration file, ISO, CN, MLNX, DKMS. Read comments in rhel-infiniband-diskless-install.sh for details. +label:others,IB cmd:RHEL_ISO="$$ISO" LINUX_DISTRO="GETNODEATTR($$CN, os)" COMPUTE_NODE="$$CN" MLNX_ISO="$$MLNX" DKMS_RPM="$$DKMS" /opt/xcat/share/xcat/tools/autotest/testcase/infiniband/rhel-infiniband-diskless-install.sh check:rc==0 end start:rhel_infiniband_diskfull_install description:Integration test of RHEL 7 and MLNX OFED for diskfull installation. Following variables need to be set in the test configuration file, ISO, CN, MLNX, DKMS. Read comments in rhel-infiniband-diskfull-install.sh for details. +label:others,IB cmd:RHEL_ISO="$$ISO" LINUX_DISTRO="GETNODEATTR($$CN, os)" COMPUTE_NODE="$$CN" MLNX_ISO="$$MLNX" DKMS_RPM="$$DKMS" /opt/xcat/share/xcat/tools/autotest/testcase/infiniband/rhel-infiniband-diskfull-install.sh check:rc==0 end start:confignetwork_ib_ipoib description: this case is to test confignetwork could configure the first infiniband interface, ib0, successfully with updatenode. +label:others,IB cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "mkdir -p /tmp/backupnet/" diff --git a/xCAT-test/autotest/testcase/install_xCAT/case0 b/xCAT-test/autotest/testcase/install_xCAT/case0 index 05bc1f7c7..9eb7b5606 100644 --- a/xCAT-test/autotest/testcase/install_xCAT/case0 +++ b/xCAT-test/autotest/testcase/install_xCAT/case0 @@ -1,5 +1,6 @@ start:install_xCAT_on_rhels_sles description:install xCAT with go-xcat tool in a fresh environment for rhels and sles +label:xcat_install os:Linux stop:yes cmd:if grep "Red Hat" /etc/*release >/dev/null; then yum install -y yum-utils bzip2; fi @@ -24,6 +25,7 @@ end start:install_xCAT_on_ubuntu description:install xCAT with go-xcat tool in a fresh environment for ubuntu +label:xcat_install os:Linux stop:yes cmd:arc_all=`uname -a`; code=`lsb_release -sc`;if [[ $arc_all =~ "ppc64le" ]]; then arch="ppc64el";else arch="x86_64";fi; cp "/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-$arch.sources.list" "/etc/apt/sources.list" diff --git a/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump b/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump index 01dde2833..91047bca9 100644 --- a/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump +++ b/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump @@ -1,4 +1,5 @@ start:linux_diskless_kdump +label:others,kdump,invoke_provision os:Linux cmd:lsdef -z $$CN > /tmp/node.stanza cmd:lsdef -t osimage -z __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute > /tmp/osimage.stanza @@ -37,6 +38,7 @@ cmd:if [ ! -d /kdumpdir ]; then mkdir -p /kdumpdir && chmod 777 /kdumpdir; fi cmd:if [ ! -f /etc/exports ] ;then touch /etc/exports;else cp /etc/exports /etc/exports.bak;fi cmd:cat /etc/exports|grep kdumpdir; if [ "$?" -ne "0" ]; then echo "/kdumpdir *(rw,no_root_squash,sync,no_subtree_check)" >> /etc/exports; fi cmd:cd /etc; export exports;cd -;service nfs restart +label:others,kdump,invoke_provision cmd:chdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute dump=nfs://$$MN/kdumpdir check:rc==0 @@ -71,6 +73,7 @@ check:output=~\d\d:\d\d:\d\d cmd:xdsh $$CN "echo 'echo 1 > /proc/sys/kernel/sysrq; echo c > /proc/sysrq-trigger' > /tmp/kdump.trigger" cmd:xdsh $$CN "chmod 755 /tmp/kdump.trigger" cmd:xdsh $$CN "service atd start" +label:others,kdump,invoke_provision cmd:xdsh $$CN "at now +1 minutes <<< /tmp/kdump.trigger" cmd:sleep 300 diff --git a/xCAT-test/autotest/testcase/lskit/case0 b/xCAT-test/autotest/testcase/lskit/case0 index ffdb9ae1f..8d9dd3485 100644 --- a/xCAT-test/autotest/testcase/lskit/case0 +++ b/xCAT-test/autotest/testcase/lskit/case0 @@ -1,4 +1,5 @@ start:lskit_v +label:others,KIT os:Linux cmd:lskit -v check:rc==0 @@ -13,6 +14,7 @@ check:output=~compatible_frameworks end start:lskit_h +label:others,KIT os:Linux cmd:lskit -h check:rc==0 @@ -23,6 +25,7 @@ check:output=~ Usage end start:lskit_F +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskit/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/lskit;buildkit create mykits @@ -42,6 +45,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskit/mykits end start:lskit_K +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskit/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/lskit;buildkit create mykits @@ -65,6 +69,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskit/mykits end start:lskit_R +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskit/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/lskit;buildkit create mykits @@ -91,6 +96,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskit/mykits end start:lskit_C +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskit/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/lskit;buildkit create mykits diff --git a/xCAT-test/autotest/testcase/lskitcomp/case0 b/xCAT-test/autotest/testcase/lskitcomp/case0 index ae02e7753..bfd0d394c 100644 --- a/xCAT-test/autotest/testcase/lskitcomp/case0 +++ b/xCAT-test/autotest/testcase/lskitcomp/case0 @@ -1,4 +1,5 @@ start:lskitcomp_v +label:others,KIT os:Linux cmd:lskitcomp -v check:rc==0 @@ -13,6 +14,7 @@ check:output=~compatible_frameworks end start:lskitcomp_h +label:others,KIT os:Linux cmd:lskitcomp -h check:rc==0 @@ -23,6 +25,7 @@ check:output=~ Usage end start:lskitcomp_C +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskitcomp/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/lskitcomp;buildkit create mykits @@ -53,6 +56,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskitcomp/mykits end start:lskitcomp_C +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskitcomp/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/lskitcomp;buildkit create mykits @@ -84,6 +88,7 @@ end start:lskitcomp_S +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskitcomp/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/lskitcomp;buildkit create mykits diff --git a/xCAT-test/autotest/testcase/lskitdeployparam/case0 b/xCAT-test/autotest/testcase/lskitdeployparam/case0 index 7a62f5586..44e68315d 100644 --- a/xCAT-test/autotest/testcase/lskitdeployparam/case0 +++ b/xCAT-test/autotest/testcase/lskitdeployparam/case0 @@ -1,4 +1,5 @@ start:lskitdeployparam_v +label:others,KIT os:Linux cmd:lskitdeployparam -v check:rc==0 @@ -13,6 +14,7 @@ check:output=~compatible_frameworks end start:lskitdeployparam_h +label:others,KIT os:Linux cmd:lskitdeployparam -h check:rc==0 @@ -23,6 +25,7 @@ check:output=~ Usage end start:lskitdeployparam_no_param +label:others,KIT os:Linux cmd:lskitdeployparam check:rc==1 @@ -32,6 +35,7 @@ end start:lskitdeployparam_k_1 +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskit/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/lskit;buildkit create mykits @@ -57,6 +61,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskit/mykits end start:lskitdeployparam_c_1 +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskit/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/lskit;buildkit create mykits diff --git a/xCAT-test/autotest/testcase/lslite/cases0 b/xCAT-test/autotest/testcase/lslite/cases0 index 2f77574e4..af6114b75 100644 --- a/xCAT-test/autotest/testcase/lslite/cases0 +++ b/xCAT-test/autotest/testcase/lslite/cases0 @@ -1,5 +1,6 @@ start:lslite_i description:lslite -i +label:others,statelite os:Linux cmd:copycds $$ISO check:rc==0 @@ -26,6 +27,7 @@ end start:lslite_noderange description:lslite noderange +label:others,statelite os:Linux cmd:mkdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute -u profile=compute provmethod=statelite osvers=__GETNODEATTR($$CN,os)__ check:rc==0 @@ -52,6 +54,7 @@ end start:lslite_h os:Linux description:lslite -h and --help +label:others,statelite cmd:lslite -h check:output=~usage|Usage cmd:lslite --help diff --git a/xCAT-test/autotest/testcase/lsvm/cases0 b/xCAT-test/autotest/testcase/lsvm/cases0 index abe42f631..6b89cb558 100644 --- a/xCAT-test/autotest/testcase/lsvm/cases0 +++ b/xCAT-test/autotest/testcase/lsvm/cases0 @@ -1,16 +1,19 @@ #comment out for developper will not fix it #start:lsvm_null +label:others,hcp_hmc #cmd:lsvm #check:rc!=0 #check:output=~Usage #end start:lsvm_node +label:others,hcp_hmc hcp:hmc,ivm cmd:lsvm $$CN check:rc==0 check:output=~name=$$CN end start:lsvm_err_node +label:others,hcp_hmc cmd:lsvm testnode check:rc!=0 check:output=~Error diff --git a/xCAT-test/autotest/testcase/makeconservercf/cases0 b/xCAT-test/autotest/testcase/makeconservercf/cases0 index 26dde43f1..95b9ba502 100644 --- a/xCAT-test/autotest/testcase/makeconservercf/cases0 +++ b/xCAT-test/autotest/testcase/makeconservercf/cases0 @@ -1,5 +1,5 @@ start:makeconservercf_null -label:ci_test +label:others,conserver cmd:chdef -t node -o testnodetmp cons=hmc groups=all cmd:makeconservercf testnodetmp check:rc==0 @@ -11,7 +11,7 @@ cmd:rmdef -t node testnodetmp end start:makeconservercf_noderange -label:ci_test +label:others,conserver cmd:chdef -t node -o testnodetmp cons=hmc groups=all cmd:makeconservercf testnodetmp check:rc==0 @@ -23,7 +23,7 @@ cmd:rmdef -t node testnodetmp end start:makeconservercf_d -label:ci_test +label:others,conserver cmd:chdef -t node -o testnodetmp cons=hmc groups=all cmd:makeconservercf testnodetmp check:rc==0 diff --git a/xCAT-test/autotest/testcase/makeknownhosts/cases0 b/xCAT-test/autotest/testcase/makeknownhosts/cases0 index f7f7e0646..69f7bf3ef 100644 --- a/xCAT-test/autotest/testcase/makeknownhosts/cases0 +++ b/xCAT-test/autotest/testcase/makeknownhosts/cases0 @@ -1,5 +1,4 @@ start:makeknownhosts_h -label:ci_test cmd:makeknownhosts -h check:output=~Usage cmd:makeknownhosts --help @@ -8,6 +7,7 @@ end start:makeknownhosts_node description:Make a known_hosts file under $ROOTHOME/.ssh for input noderange +label:others cmd:makeknownhosts $$CN -r cmd:makeknownhosts $$CN check:rc==0 @@ -19,6 +19,7 @@ end start:makeknownhosts_node_r description:remove known node in $ROOTHOME/.ssh +label:others cmd:makeknownhosts $$CN cmd:cat ~/.ssh/known_hosts|grep $$CN check:output=~$$CN @@ -31,6 +32,7 @@ end start:makeknownhosts_node_d description:delete known node entry from $ROOTHOME/.ssh +label:others cmd:makeknownhosts $$CN cmd:cat ~/.ssh/known_hosts|grep $$CN check:output=~$$CN @@ -45,6 +47,7 @@ end start:makeknownhosts_node_v description:verbose +label:others cmd:makeknownhosts $$CN -V check:rc==0 check:output=~$$CN diff --git a/xCAT-test/autotest/testcase/makenetworks/cases0 b/xCAT-test/autotest/testcase/makenetworks/cases0 index c43c55ed7..b99a8c858 100644 --- a/xCAT-test/autotest/testcase/makenetworks/cases0 +++ b/xCAT-test/autotest/testcase/makenetworks/cases0 @@ -1,22 +1,22 @@ start:makenetworks_h -label:ci_test description:help +label:others,network cmd:makenetworks -h check:rc==0 check:output=~Usage end start:makenetworks_help -label:ci_test description:help +label:others,network cmd:makedhcp --help check:rc==0 check:output=~Usage end start:makenetworks_v -label:ci_test description:version +label:others,network cmd:makenetworks -v check:rc==0 check:output=~Version @@ -24,6 +24,8 @@ end start:makenetworks_d os:Linux +description:makenetworks_d +label:others,network cmd:makenetworks -d > /tmp/mynetworksstanzas check:rc==0 cmd:echo -ne "auto-testnetworks:\n objtype=network\n gateway=1.2.3.0\n mask=255.255.255.0\n net=1.2.3.1\n" >> /tmp/mynetworksstanzas @@ -38,7 +40,7 @@ end start:makenetworks_d_V description:display,verbose -label:ci_test +label:others,network cmd:makenetworks check:rc==0 cmd:makenetworks -d -V @@ -51,6 +53,7 @@ end start:makenetworks os:Linux description:makenetworks +label:others,network cmd:num=`lsdef -t network |cut -d" " -f1 |tee /tmp/testnetworks|wc -l`;for((i=1;i<=$num;i++)) do rmdef -t network `cat /tmp/testnetworks|sed -n "${i}p"`; done check:rc==0 check:output=~(definitions have been removed) diff --git a/xCAT-test/autotest/testcase/makentp/cases0 b/xCAT-test/autotest/testcase/makentp/cases0 index d88159074..0827649ee 100644 --- a/xCAT-test/autotest/testcase/makentp/cases0 +++ b/xCAT-test/autotest/testcase/makentp/cases0 @@ -1,4 +1,5 @@ start:makentp_v + descriptiop:makentp -v cmd:makentp -v check:rc==0 @@ -6,6 +7,7 @@ check:output=~Version end start:makentp_h + descriptiop:makentp -h cmd:makentp -h check:rc==0 @@ -13,6 +15,7 @@ check:output=~Usage: makentp end start:makentp_extntpserver_null + descriptiop:test makentp with default value. extntpserver is set to blank cmd:lsdef -t site -o clustersite -i extntpservers -c >/tmp/extntpserver check:rc==0 @@ -28,6 +31,7 @@ check:output=~checking if nptd is installed check:output=~backing up the ntp configuration file /etc/ntp.conf check:output=~stopping ntpserver check:output=~starting ntpserver + check:output=~enabling ntpserver cmd:extntpserver=`cat /tmp/ntpserver | awk -F = '{print \$2}'`;chtab key=extntpservers site.value=$extntpserver check:rc==0 @@ -37,6 +41,7 @@ check:rc==0 end start:makentp_extntpserver_value + descriptiop:test makentp with extntpserver is set to a specific value cmd:lsdef -t site -o clustersite -i extntpservers -c >/tmp/extntpserver check:rc==0 @@ -57,6 +62,7 @@ check:output=~backing up the ntp configuration file /etc/ntp.conf check:output=~ntp servers are: $$extntpserversip check:output=~stopping ntpserver check:output=~starting ntpserver + check:output=~enabling ntpserver cmd:date check:output=~$$DATE @@ -69,6 +75,7 @@ cmd:rm -rf /tmp/extntpserver end start:updatenode_computenode_P_setupntp + descriptiop:using updatenode -P to setup ntp on compute node cmd:xdsh $$CN date -s 20000101 check:rc==0 @@ -102,7 +109,9 @@ end start:makentp_initialize + descriptiop:start ntp service on management node and synchronize time with external ntp server + cmd:chtab key=extntpservers site.value="$$extntpserversip" check:rc==0 cmd:makentp -V @@ -113,6 +122,7 @@ check:output=~backing up the ntp configuration file /etc/ntp.conf check:output=~ntp servers are: $$extntpserversip check:output=~stopping ntpserver check:output=~starting ntpserver + check:output=~enabling ntpserver cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu" ]] || [[ "__GETNODEATTR($$CN,os)__" = "sles11.4" ]];then service ntp status;else service ntpd status; fi check:rc==0 diff --git a/xCAT-test/autotest/testcase/makeroutes/cases0 b/xCAT-test/autotest/testcase/makeroutes/cases0 index bc5dacf29..5ac2c51bc 100644 --- a/xCAT-test/autotest/testcase/makeroutes/cases0 +++ b/xCAT-test/autotest/testcase/makeroutes/cases0 @@ -1,16 +1,19 @@ start:makeroutes_h +label:others,network cmd:makeroutes -h check:rc==0 check:output=~Usage end start:makeroutes_v +label:others,network cmd:makeroutes -v check:rc==0 check:output=~Version end start:makeroutes_r_d_node +label:others,network cmd:chtab routename=testr routes.net=10.1.0.0 routes.mask=255.255.0.0 routes.gateway=10.1.254.254 check:rc==0 cmd: makeroutes $$CN -r testr @@ -29,6 +32,7 @@ end start:makeroutes_r_d +label:others,network cmd:chtab routename=testr routes.net=10.1.0.0 routes.mask=255.255.0.0 routes.gateway=10.1.254.254 check:rc==0 cmd: makeroutes -r testr @@ -47,6 +51,7 @@ end start:makeroutes_use_site_mnroutenames +label:others,network cmd:chtab routename=testr routes.net=10.1.0.0 routes.mask=255.255.0.0 routes.gateway=10.1.254.254 check:rc==0 cmd:chtab key=mnroutenames site.value=testr @@ -68,6 +73,7 @@ check:rc==0 end start:makeroutes_use_noderes_routenames +label:others,network cmd:chtab routename=testr routes.net=10.1.0.0 routes.mask=255.255.0.0 routes.gateway=10.1.254.254 check:rc==0 cmd:chtab node=$$CN noderes.routenames=testr diff --git a/xCAT-test/autotest/testcase/migration/redhat_migration b/xCAT-test/autotest/testcase/migration/redhat_migration index c2d43ff7b..a11f1d807 100644 --- a/xCAT-test/autotest/testcase/migration/redhat_migration +++ b/xCAT-test/autotest/testcase/migration/redhat_migration @@ -1,6 +1,7 @@ start:redhat_migration1 os:Linux description:update xCAT from $$MIGRATION1_VERSION to latest version, these two global parameter defined in config file +label:others,migration,invoke_provision cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;echo "poweroffsn">/tmp/poweroffsn;fi check:rc==0 @@ -108,6 +109,7 @@ end start:redhat_migration2 os:Linux description:update xCAT from $$MIGRATION2_VERSION to latest version, these two global parameter defined in config file +label:others,migration,invoke_provision #stop:yes cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;echo "poweroffsn">/tmp/poweroffsn;fi check:rc==0 diff --git a/xCAT-test/autotest/testcase/migration/sles_migration b/xCAT-test/autotest/testcase/migration/sles_migration index af2cd1303..e266628d2 100644 --- a/xCAT-test/autotest/testcase/migration/sles_migration +++ b/xCAT-test/autotest/testcase/migration/sles_migration @@ -1,6 +1,7 @@ start:sles_migration1 os:Linux description:update xCAT from $$MIGRATION1_VERSION to latest version, these two global parameter defined in config file +label:others,migration,invoke_provision cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;echo "poweroffsn">/tmp/poweroffsn;fi check:rc==0 cmd:if [[ "__GETNODEATTR($$SN,groups)__" =~ "service" ]];then chdef $$SN -m groups=service;echo "servicelabel" >/tmp/servicelabel;fi @@ -110,6 +111,7 @@ end start:sles_migration2 os:Linux description:update xCAT from $$MIGRATION22VERSION to latest version, these two global parameter defined in config file +label:others,migration,invoke_provision cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;echo "poweroffsn">/tmp/poweroffsn;fi check:rc==0 diff --git a/xCAT-test/autotest/testcase/migration/ubuntu_migration1_p8le b/xCAT-test/autotest/testcase/migration/ubuntu_migration1_p8le index e9d8c0876..81970abc3 100644 --- a/xCAT-test/autotest/testcase/migration/ubuntu_migration1_p8le +++ b/xCAT-test/autotest/testcase/migration/ubuntu_migration1_p8le @@ -1,6 +1,7 @@ start:ubuntu_migration1_p8le os:Linux description:update xCAT from $$UBUNTU_MIGRATION1_VERSION to latest version, these two global parameter defined in config file +label:others,migration,invoke_provision cmd:copycds $$ISO check:rc==0 diff --git a/xCAT-test/autotest/testcase/migration/ubuntu_migration1_vm b/xCAT-test/autotest/testcase/migration/ubuntu_migration1_vm index a060e181c..c980c0702 100644 --- a/xCAT-test/autotest/testcase/migration/ubuntu_migration1_vm +++ b/xCAT-test/autotest/testcase/migration/ubuntu_migration1_vm @@ -1,6 +1,7 @@ start:ubuntu_migration1_vm os:Linux description:update xCAT from $$UBUNTU_MIGRATION1_VERSION to latest version, these two global parameter defined in config file +label:others,migration,invoke_provision cmd:copycds $$ISO check:rc==0 diff --git a/xCAT-test/autotest/testcase/migration/ubuntu_migration2_p8le b/xCAT-test/autotest/testcase/migration/ubuntu_migration2_p8le index 18e7d7db5..7fe2080ec 100644 --- a/xCAT-test/autotest/testcase/migration/ubuntu_migration2_p8le +++ b/xCAT-test/autotest/testcase/migration/ubuntu_migration2_p8le @@ -1,6 +1,7 @@ start:ubuntu_migration2_p8le os:Linux description:update xCAT from $$UBUNTU_MIGRATION2_VERSION to latest version, these two global parameter defined in config file +label:others,migration,invoke_provision cmd:copycds $$ISO check:rc==0 diff --git a/xCAT-test/autotest/testcase/migration/ubuntu_migration2_vm b/xCAT-test/autotest/testcase/migration/ubuntu_migration2_vm index 612a0536c..ab47fd759 100644 --- a/xCAT-test/autotest/testcase/migration/ubuntu_migration2_vm +++ b/xCAT-test/autotest/testcase/migration/ubuntu_migration2_vm @@ -1,6 +1,7 @@ start:ubuntu_migration2_vm os:Linux description:update xCAT from $$UBUNTU_MIGRATION2_VERSION to latest version, these two global parameter defined in config file +label:others,migration,invoke_provision cmd:copycds $$ISO check:rc==0 diff --git a/xCAT-test/autotest/testcase/mkvm/cases0 b/xCAT-test/autotest/testcase/mkvm/cases0 index 6b252679b..740106cc9 100644 --- a/xCAT-test/autotest/testcase/mkvm/cases0 +++ b/xCAT-test/autotest/testcase/mkvm/cases0 @@ -1,4 +1,5 @@ start:mkvm_i_l +label:others,hctrl_hmc hcp:hmc cmd:mkdef -t node -o testnode1,testnode2 mgt=hmc groups=all cmd:mkvm testnode1,testnode2 -i $$MaxLparID -l $$CN diff --git a/xCAT-test/autotest/testcase/ngpfb/cases0 b/xCAT-test/autotest/testcase/ngpfb/cases0 index fd7115da0..d7e811de0 100644 --- a/xCAT-test/autotest/testcase/ngpfb/cases0 +++ b/xCAT-test/autotest/testcase/ngpfb/cases0 @@ -1,7 +1,9 @@ #comments:make sure you have compute node definition on your MN #this case is just supplement for some commands,after your executing,check output from log start:lsslp_cmm + description:for part of ngp firebird commands +label:others,hctrl_fsp cmd:makedhcp -n check:rc==0 check:output!=Error @@ -12,7 +14,9 @@ check:output=~(groups=cmm,all) end start:rspconfig_snmp_ssh + description:rspconfig snmpcfg sshcfg +label:others,hctrl_fsp cmd:makehosts cmm check:rc==0 cmd:makedns cmm @@ -31,7 +35,9 @@ check:output=~enabled end start:rscan_cmm + description:rscan cmm +label:others,hctrl_fsp cmd:rscan cmm check:rc==0 cmd:rscan cmm -z @@ -42,13 +48,16 @@ check:rc==0 end start:rspconfig_network + cmd:rspconfig $$CN network=* check:rc==0 check:output=~OK end start:rspconfig_textid + description:rspconfig textid +label:others,hctrl_fsp cmd:rspconfig $$CN textid=abc123 check:rc==0 cmd:sleep 20 @@ -69,7 +78,9 @@ check:output=~(\w+)(.*?)\1 end start:rspconfig_hwconn + description:for hwconn +label:others,hctrl_fsp cmd:rmhwconn $$CN check:rc==0 check:rc!~(state=LINE UP) @@ -91,7 +102,9 @@ check:output=~(LINE UP) end start:rpower_bladenode + description:rpower +label:others,hctrl_fsp cmd:rpower $$CN off check:rc==0 cmd:sleep 50 @@ -103,7 +116,9 @@ check:output=~Success end start:rspconfig_solcfg + description:for solcfg +label:others,hctrl_fsp cmd:rspconfig cmm solcfg=enable check:rc==0 cmd:rspconfig cmm solcfg @@ -117,7 +132,9 @@ check:output!~enable end start:getmacs_d_blade + description:getmacs +label:others,hctrl_fsp cmd:makeconservercf check:rc==0 cmd:chdef $$CN getmac=blade @@ -131,7 +148,9 @@ check:output=~[a-f0-9A-F]{12}|[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0 end start:rinv_firm_fb + description:check firmware level +label:others,hctrl_fsp cmd:rinv $$CN firm check:rc==0 cmd:rvitals $$CN all diff --git a/xCAT-test/autotest/testcase/nodeset/cases1 b/xCAT-test/autotest/testcase/nodeset/cases1 index bcf8f6343..8667e37ae 100644 --- a/xCAT-test/autotest/testcase/nodeset/cases1 +++ b/xCAT-test/autotest/testcase/nodeset/cases1 @@ -1,52 +1,61 @@ start:nodeset_shell_grub2 +label:others description: Verify if `nodeset shell` perform well when part of nodes in a node range have problem. Use grub2 OS loader cmd:/opt/xcat/share/xcat/tools/autotest/testcase/nodeset/nodeset_shell_grub2 check:rc==0 end start:nodeset_shell_petitboot +label:others description: Verify if `nodeset shell` perform well when part of nodes in a node range have problem. Use petitboot OS loader cmd:/opt/xcat/share/xcat/tools/autotest/testcase/nodeset/nodeset_shell_petitboot check:rc==0 end start:nodeset_shell_xnba +label:others description: Verify if `nodeset shell` perform well when part of nodes in a node range have problem. Use xnba OS loader cmd:/opt/xcat/share/xcat/tools/autotest/testcase/nodeset/nodeset_shell_xnba check:rc==0 end start:nodeset_osimage_grub2 +label:others description: Verify if `nodeset osimage` perform well when part of nodes in a node range have problem. Use grub2 OS loader cmd:/opt/xcat/share/xcat/tools/autotest/testcase/nodeset/nodeset_osimage_grub2 check:rc==0 end start:nodeset_osimage_petitboot +label:others description: Verify if `nodeset osimage` perform well when part of nodes in a node range have problem. Use petitboot OS loader cmd:/opt/xcat/share/xcat/tools/autotest/testcase/nodeset/nodeset_osimage_petitboot check:rc==0 end start:nodeset_osimage_xnba +label:others description: Verify if `nodeset osimage` perform well when part of nodes in a node range have problem. Use xnba OS loader cmd:/opt/xcat/share/xcat/tools/autotest/testcase/nodeset/nodeset_osimage_xnba check:rc==0 end start:nodeset_nonexistent_osimage_grub2 +label:others description: Verify if `nodeset osimage` perform well when part of nodes in a node range have nonexistent osimage defined in its profile. Use grub2 OS loader cmd:/opt/xcat/share/xcat/tools/autotest/testcase/nodeset/nodeset_nonexistent_osimage_grub2 check:rc==0 end start:nodeset_nonexistent_osimage_petitboot +label:others description: Verify if `nodeset osimage` perform well when part of nodes in a node range have nonexistent osimage defined in its profile. Use petitboot OS loader cmd:/opt/xcat/share/xcat/tools/autotest/testcase/nodeset/nodeset_nonexistent_osimage_petitboot check:rc==0 end start:nodeset_nonexistent_osimage_xnba +label:others description: Verify if `nodeset osimage` perform well when part of nodes in a node range have nonexistent osimage defined in its profile. Use xnba OS loader cmd:/opt/xcat/share/xcat/tools/autotest/testcase/nodeset/nodeset_nonexistent_osimage_xnba check:rc==0 diff --git a/xCAT-test/autotest/testcase/nodestat/cases0 b/xCAT-test/autotest/testcase/nodestat/cases0 index 0444b9edb..60244cabb 100644 --- a/xCAT-test/autotest/testcase/nodestat/cases0 +++ b/xCAT-test/autotest/testcase/nodestat/cases0 @@ -1,4 +1,5 @@ start:nodestat_noderange +label:others arch:x86 cmd:nodestat $$CN check:rc==0 @@ -6,7 +7,7 @@ check:output=~noping|sshd|install|snmp|pbs end start:nodestat_err_node -label:ci_test +label:others cmd:nodestat testnode check:rc!=0 check:output=~Error diff --git a/xCAT-test/autotest/testcase/nodestat/cases1 b/xCAT-test/autotest/testcase/nodestat/cases1 index f9c7ce03a..d31de9e3e 100644 --- a/xCAT-test/autotest/testcase/nodestat/cases1 +++ b/xCAT-test/autotest/testcase/nodestat/cases1 @@ -1,5 +1,6 @@ start:nodestat_usage description: Test the exit code when no command line argument is passed to nodestat +label:others cmd:nodestat check:rc!=0 end diff --git a/xCAT-test/autotest/testcase/osdeploy/cases0 b/xCAT-test/autotest/testcase/osdeploy/cases0 index 53058dfae..f9fc83860 100644 --- a/xCAT-test/autotest/testcase/osdeploy/cases0 +++ b/xCAT-test/autotest/testcase/osdeploy/cases0 @@ -1,5 +1,6 @@ start:osdeploy_usage description: osdeploy check usage +label:others,xcatprobe cmd:xcatprobe osdeploy -h check:rc==0 check:output~=Usage @@ -9,6 +10,7 @@ end start:osdeploy_n description: osdeploy -n node to probe osdeploy +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 cmd:xcatprobe osdeploy -n $$CN >> /tmp/osdeploy.test & @@ -27,6 +29,7 @@ end start:osdeploy_n_r description: osdeploy -n -r node to probe osdeploy to trigger 'Replay history' mode. +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 cmd:xcatprobe osdeploy -n $$CN >> /tmp/osdeploy.test & @@ -63,6 +66,7 @@ end start:osdeploy_n_t description: osdeploy -n node -t 1m,probe osdeploy in 1min +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 cmd:xcatprobe osdeploy -n $$CN -t 1m >> /tmp/osdeploy.test & @@ -76,6 +80,7 @@ check:rc==0 end start:osdeploy_n_invalidnode description: osdeploy -n node invalid +label:others,xcatprobe cmd:test=`lsdef test_node`;if [ $test eq 0 ]; then lsdef -l test_node -z >/tmp/node.standa ;rmdef test_node;fi check:rc==0 cmd:xcatprobe osdeploy -n test_node @@ -86,6 +91,7 @@ check:rc==0 end start:osdeploy_n_p_invalid description:osdeploy -n node -p invalid parameter +label:others,xcatprobe cmd:xcatprobe osdeploy -n $$CN -p dsdf check:rc==1 check:output~=Usage: @@ -96,6 +102,7 @@ end start:osdeploy_n_r_invalid description:osdeploy -n node -r invalid parameter +label:others,xcatprobe cmd:xcatprobe osdeploy -n $$CN -r dadf check:rc==1 check:output~=Usage: @@ -106,6 +113,7 @@ end start:osdeploy_n_t_invalid description:osdeploy -n node -t invalid parameter +label:others,xcatprobe cmd:xcatprobe osdeploy -n $$CN -t dadf check:rc==1 check:output~=Usage: @@ -116,6 +124,7 @@ end start:osdeploy_n_p_origin description: osdeploy -n -p origin node to probe osdeploy +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 cmd:xcatprobe osdeploy -n $$CN -p origin >> /tmp/osdeploy.test & @@ -139,6 +148,7 @@ check:rc==0 end start:osdeploy_n_p_origin_r description: osdeploy -n node -p origin -r to probe osdeploy +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute @@ -163,6 +173,7 @@ check:rc==0 end start:osdeploy_n_p_origin_r_error description: osdeploy -n node -p origin -r 1m to probe osdeploy +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute @@ -188,6 +199,7 @@ end start:osdeploy_n_p_compact description: osdeploy -n -p compact node to probe osdeploy +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 cmd:xcatprobe osdeploy -n $$CN -p compact >> /tmp/osdeploy.test & @@ -211,6 +223,7 @@ check:rc==0 end start:osdeploy_n_p_compact_r description: osdeploy -n -p compact -r node to probe osdeploy +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 check:rc==0 @@ -235,6 +248,7 @@ check:rc==0 end start:osdeploy_n_p_compact_r_error description: osdeploy -n -p compact -r node error to probe osdeploy +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 check:rc==0 @@ -260,6 +274,7 @@ end start:osdeploy_n_p_phase description: osdeploy -n -p phase node to probe osdeploy +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 cmd:xcatprobe osdeploy -n $$CN -p phase >> /tmp/osdeploy.test & @@ -283,6 +298,7 @@ check:rc==0 end start:osdeploy_n_p_phase_r description: osdeploy -n -p phase node -r to probe osdeploy +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute @@ -308,6 +324,7 @@ end start:osdeploy_n_p_phase_r_error description: osdeploy -n -p phase node -r error to probe osdeploy +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute diff --git a/xCAT-test/autotest/testcase/packimg/cases0 b/xCAT-test/autotest/testcase/packimg/cases0 index 87e636866..b9f5b1721 100644 --- a/xCAT-test/autotest/testcase/packimg/cases0 +++ b/xCAT-test/autotest/testcase/packimg/cases0 @@ -1,6 +1,7 @@ start:packimage_o_p_a_m os:Linux description: +label:others,packaging cmd:copycds $$ISO cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz /rootimg.cpio.gz.bak;fi @@ -21,6 +22,7 @@ end start:packimage_imagename os:Linux description: +label:others,packaging cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz /rootimg.cpio.gz.bak;fi cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute @@ -40,6 +42,7 @@ end start:packimage_h os:Linux description:packimage -h +label:others,packaging cmd:packimage -h check:rc==0 end @@ -47,6 +50,7 @@ end start:packimage_v os:Linux description:packimage -v +label:others,packaging cmd:packimage -v check:output=~version|Version end @@ -54,6 +58,7 @@ end start:packimage_m_cpio_c_gzip os:Linux description:test packimage -m cpio -c gzip +label:others,packaging,invoke_provision cmd:copycds $$ISO cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz /rootimg.cpio.gz.bak;fi @@ -95,6 +100,7 @@ end start:packimage_m_cpio_c_pigz os:Linux description:test packimage -m cpio -c pigz +label:others,packaging,invoke_provision #cmd:copycds $$ISO cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz /rootimg.cpio.gz.bak;fi @@ -140,6 +146,7 @@ end start:packimage_m_cpio_c_xz os:Linux description:test packimage -m cpio -c xz +label:others,packaging,invoke_provision #cmd:copycds $$ISO cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.xz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.xz /rootimg.cpio.xz.bak;fi @@ -181,6 +188,7 @@ end start:packimage_m_tar_c_pigz os:Linux description:test packimage -m tar -c pigz +label:others,packaging #cmd:copycds $$ISO cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.tar.gz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.tar.gz /rootimg.tar.gz.bak;fi @@ -235,6 +243,7 @@ end start:packimage_m_tar_c_gzip os:Linux description:test packimage -m tar -c gzip +label:others,packaging #cmd:copycds $$ISO cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.tar.gz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.tar.gz /rootimg.tar.gz.bak;fi @@ -285,6 +294,7 @@ end start:packimage_m_tar_c_xz os:Linux description:test packimage -m tar -c xz +label:others,packaging #cmd:copycds $$ISO cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.tar.xz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.tar.xz /rootimg.tar.xz.bak;fi @@ -335,6 +345,7 @@ end start:packimage_m_invalid_archive_method os:Linux description:test packimage with invalid archive method +label:others,packaging #cmd:copycds $$ISO cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute @@ -351,6 +362,7 @@ end start:packimage_m_invalid_compress_method os:Linux description:test packimage with invalid compress method +label:others,packaging #cmd:copycds $$ISO cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute diff --git a/xCAT-test/autotest/testcase/passwd/case0 b/xCAT-test/autotest/testcase/passwd/case0 index 5ba6e8dcb..91350e546 100644 --- a/xCAT-test/autotest/testcase/passwd/case0 +++ b/xCAT-test/autotest/testcase/passwd/case0 @@ -1,5 +1,6 @@ start:encrypted_passwd_md5_diskfull description: this case is to test when cryptmethod=md5 in passwd table, the password is encryped with the md5 method. When compute node is diskfull provisioned, users can login node with correct password. This case should be run when node is correctly defined. +label:others cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:chtab key=system passwd.cryptmethod=md5 @@ -18,6 +19,7 @@ end start:encrypted_passwd_md5_diskless description: this case is to test when cryptmethod=md5 in passwd table, the password is encryped with the md5 method. When compute node is diskless provisioned, users can login node with correct password. This case should be run when node is correctly defined. +label:others cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:chtab key=system passwd.cryptmethod=md5 @@ -73,6 +75,7 @@ end start:encrypted_passwd_sha256_diskfull description: this case is to test when cryptmethod=sha256 in passwd table, the password is encryped with the sha256 method. When compute node is diskfull provisioned, users can login node with correct password. This case should be run when node is correctly defined. +label:others cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:chtab key=system passwd.cryptmethod=sha256 @@ -91,6 +94,7 @@ end start:encrypted_passwd_sha256_diskless description: this case is to test when cryptmethod=sha256 in passwd table, the password is encryped with the sha256 method. When compute node is diskless provisioned, users can login node with correct password. This case should be run when node is correctly defined. +label:others cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:chtab key=system passwd.cryptmethod=sha256 @@ -146,6 +150,7 @@ end start:encrypted_passwd_sha512_diskfull description: this case is to test when cryptmethod=sha512 in passwd table, the password is encryped with the sha512 method. When compute node is diskfull provisioned, users can login node with correct password. This case should be run when node is correctly defined. +label:others cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:chtab key=system passwd.cryptmethod=sha512 @@ -164,6 +169,7 @@ end start:encrypted_passwd_sha512_diskless description: this case is to test when cryptmethod=sha512 in passwd table, the password is encryped with the sha512 method. When compute node is diskless provisioned, users can login node with correct password. This case should be run when node is correctly defined. +label:others cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:chtab key=system passwd.cryptmethod=sha512 @@ -220,6 +226,7 @@ end start:encrypted_passwd_openssl_diskfull description: this case is to test when password is encrypted with openssl, the password is encryped in password table. When compute node is diskfull provisioned, users can login node with correct password. This case should be run when node is correctly defined. +label:others cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:gettab key=system passwd.password > /tmp/tmppassword @@ -245,6 +252,7 @@ end start:encrypted_passwd_openssl_diskless description: this case is to test when password is encrypted with openssl, the password is encryped in password table. When compute node is diskless provisioned, users can login node with correct password. This case should be run when node is correctly defined. +label:others cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:gettab key=system passwd.password > /tmp/tmppassword diff --git a/xCAT-test/autotest/testcase/pdu/case0 b/xCAT-test/autotest/testcase/pdu/case0 index d8fd13a25..16a8dd14d 100644 --- a/xCAT-test/autotest/testcase/pdu/case0 +++ b/xCAT-test/autotest/testcase/pdu/case0 @@ -17,6 +17,7 @@ end start:mkdef_pdu_object description:create a pdu object and list it's attribute +label:others cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu check:rc==0 cmd:lsdef -t pdu @@ -40,6 +41,7 @@ end start:noderm_pdu_object description:create a pdu object and use noderm to remove it +label:others cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu check:rc==0 cmd:lsdef -t pdu @@ -59,6 +61,7 @@ end start:pdu_communication description:Verify a pdu snmp communication +label:others cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu check:rc==0 cmd:lsdef -t pdu @@ -77,6 +80,7 @@ end start:pdu_rinv description:Verify rinv works for pdu object +label:others cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu check:rc==0 cmd:makehosts $$PDU @@ -94,6 +98,7 @@ end start:pdu_rpower description:Verify rpower works for pdu object +label:others cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu check:rc==0 cmd:makehosts $$PDU @@ -123,6 +128,7 @@ end start:pdu_node_operation description:Verify operate node's pdu attribute could operate pdu +label:others cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu check:rc==0 cmd:makehosts $$PDU @@ -158,6 +164,7 @@ end start:pdu_bad_config description:test bad config with pdu +label:others cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu check:rc==0 cmd:makehosts $$PDU diff --git a/xCAT-test/autotest/testcase/performance/case0 b/xCAT-test/autotest/testcase/performance/case0 index 58d9299b5..647c7f9bb 100644 --- a/xCAT-test/autotest/testcase/performance/case0 +++ b/xCAT-test/autotest/testcase/performance/case0 @@ -1,5 +1,6 @@ start:perftest_5000 description:Default performance testing on 5000 fake nodes +label:others,performance os:Linux cmd:which yum &>/dev/null && yum install -y bridge-utils || apt install -y bridge-utils cmd:copycds $$ISO @@ -10,6 +11,7 @@ end start:UT_perftest_5000_MN_only description:Default performance testing on 5000 fake nodes without extra configuration on MN +label:others,performance os:Linux cmd:which yum &>/dev/null && yum install -y bridge-utils || apt install -y bridge-utils check:rc==0 @@ -19,6 +21,7 @@ end start:perftest_5000_with_simulators description:Default performance testing on 5000 fake nodes +label:others,performance os:Linux ### From reg_linux_diskfull_installation_flat cmd:fdisk -l @@ -139,6 +142,7 @@ end start:UT_perftest_1000_with_simulators description: UT for performance testing with simulators on an existing environment with one compute node. +label:others,performance os:Linux # Create fake nodes diff --git a/xCAT-test/autotest/testcase/pkg/cases0 b/xCAT-test/autotest/testcase/pkg/cases0 index 62831a853..d42438d56 100644 --- a/xCAT-test/autotest/testcase/pkg/cases0 +++ b/xCAT-test/autotest/testcase/pkg/cases0 @@ -1,5 +1,6 @@ start:del_ospkg -descreption:del ospkg +description:del ospkg +label:others,postscripts,updatenode cmd:copycds $$ISO check:rc==0 cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/pkg/pkgtest.pl -s -g $$osimage -t pkglist -v __GETNODEATTR($$CN,os)__ @@ -25,7 +26,8 @@ check:rc==0 end start:add_ospkg_updatenode -descreption:add ospkg +description:add ospkg +label:others,postscripts,updatenode cmd:copycds $$ISO check:rc==0 cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/pkg/pkgtest.pl -s -g $$osimage -t pkglist -v __GETNODEATTR($$CN,os)__ @@ -45,7 +47,8 @@ check:rc==0 end start:add_includeospkg_updatenode -descreption:add include ospkg list +description:add include ospkg list +label:others,postscripts,updatenode cmd:copycds $$ISO check:rc==0 cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/pkg/pkgtest.pl -i -g $$osimage -t pkglist -v __GETNODEATTR($$CN,os)__ @@ -65,7 +68,8 @@ check:rc==0 end start:add_other_pkg -descreption:add other pkg +description:add other pkg +label:others,postscripts,updatenode cmd:copycds $$ISO check:rc==0 cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/pkg/pkgtest.pl -s -o -g $$osimage -t otherpkgdir -v __GETNODEATTR($$CN,os)__ @@ -84,7 +88,8 @@ check:rc==0 end start:del_other_pkg -descreption:del other pkg +description:del other pkg +label:others,postscripts,updatenode cmd:copycds $$ISO check:rc==0 cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/pkg/pkgtest.pl -s -o -g $$osimage -t otherpkgdir -v __GETNODEATTR($$CN,os)__ @@ -112,7 +117,8 @@ check:rc==0 end start:add_other_pkg_include -descreption:add other pkg include other list +description:add other pkg include other list +label:others,postscripts,updatenode cmd:copycds $$ISO check:rc==0 cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/pkg/pkgtest.pl -i -o -g $$osimage -t otherpkgdir -v __GETNODEATTR($$CN,os)__ diff --git a/xCAT-test/autotest/testcase/pping/cases0 b/xCAT-test/autotest/testcase/pping/cases0 index b7f4c4b16..661d15197 100644 --- a/xCAT-test/autotest/testcase/pping/cases0 +++ b/xCAT-test/autotest/testcase/pping/cases0 @@ -1,4 +1,5 @@ start:pping_h +label:others,parallel_cmds cmd:pping -h check:rc==0 check:output=~Usage @@ -7,6 +8,7 @@ check:rc==0 end start:pping_v +label:others,parallel_cmds cmd:pping -v check:rc==0 check:output=~Version @@ -16,12 +18,14 @@ check:output=~Version end start:pping_node +label:others,parallel_cmds cmd:pping $$CN check:rc==0 check:output=~ping|noping end start:pping_invalidnode +label:others,parallel_cmds cmd:pping test check:rc!=0 check:output=~Warning: (\[.*?\]: )?Invalid nodes in noderange:test diff --git a/xCAT-test/autotest/testcase/ppping/cases0 b/xCAT-test/autotest/testcase/ppping/cases0 index 0ac88204d..e7df2657c 100644 --- a/xCAT-test/autotest/testcase/ppping/cases0 +++ b/xCAT-test/autotest/testcase/ppping/cases0 @@ -1,5 +1,6 @@ start:ppping_h description:get ppping help information +label:others,parallel_cmds cmd:ppping -h check:rc==0 check:output=~Usage @@ -7,6 +8,7 @@ end start:ppping_v description:Display verbose output +label:others,parallel_cmds cmd:ppping -v check:rc==0 check:output=~Version @@ -14,6 +16,7 @@ end start:ppping_node description:ppping node +label:others,parallel_cmds Attribute: $$CN-The operation object of ppping command cmd:ping -c 3 $$CN > /dev/null 2>&1;if [[ $? -eq 1 ]]; then output=`ppping $$CN`;if [[ $? -eq 1 ]]&&[[ $output =~ "noping" ]];then exit 0;else exit 1;fi;else output=`ppping $$CN`; if [[ $? -eq 0 ]]&&[[ $output =~ "pinged all nodes successfully" ]];then exit 0;else exit 1;fi;fi check:rc==0 @@ -21,6 +24,7 @@ end start:ppping_V_node description:Display verbose output of ppping node. +label:others,parallel_cmds Attribute: $$CN-The operation object of ppping command cmd:ping -c 3 $$CN > /dev/null 2>&1;if [[ $? -eq 1 ]]; then output=`ppping -V $$CN`;if [[ $? -eq 1 ]]&&[[ $output =~ "$$CN: noping" ]];then exit 0;else exit 1;fi;else output=`ppping -V $$CN`; if [[ $? -eq 0 ]]&&[[ $output =~ "$$CN: $$CN: ping" ]];then exit 0;else exit 1;fi;fi check:rc==0 @@ -28,6 +32,7 @@ end start:ppping_q_node description:Display minimum output of ppping node. +label:others,parallel_cmds Attribute: $$CN-The operation object of ppping command cmd:ping -c 3 $$CN > /dev/null 2>&1;if [[ $? -eq 1 ]]; then output=`ppping -q $$CN`;if [[ $? -eq 1 ]]&&[[ $output =~ "$$CN: noping" ]];then exit 0;else exit 1;fi;else output=`ppping -q $$CN`; if [[ $? -eq 0 ]]&&[[ $output =~ "" ]];then exit 0;else exit 1;fi;fi check:rc==0 @@ -35,6 +40,7 @@ end start:ppping_d_node description:Print debug information of ppping node. +label:others,parallel_cmds Attribute: $$CN-The operation object of ppping command cmd:ping -c 3 $$CN > /dev/null 2>&1;if [[ $? -eq 1 ]]; then output=`ppping -d $$CN`;if [[ $? -eq 1 ]]&&[[ $output =~ "start" ]]&&[[ $output =~ "stop" ]];then exit 0;else exit 1;fi;else output=`ppping -d $$CN`; if [[ $? -eq 0 ]]&&[[ $output =~ "start" ]]&&[[ $output =~ "stop" ]];then exit 0;else exit 1;fi;fi check:rc==0 @@ -42,6 +48,7 @@ end start:ppping_i_node description:A comma separated list of network interface names that should be pinged instead of the interface represented by the nodename/hostname +label:others,parallel_cmds Attribute: $$CN-The operation object of ppping command cmd:cp /etc/hosts /etc/hosts.bak check:rc==0 @@ -59,6 +66,7 @@ end start:ppping_nodes description:test the connectivity between nodes in the noderange using ping +label:others,parallel_cmds Attribute: $$CN,$$SN-The operation object of ppping command cmd:ping -c 3 $$CN > /dev/null 2>&1;rc1=$?;ping -c 3 $$SN > /dev/null 2>&1;rc2=$?;if [[ $rc1 -eq 1 ]]&&[[ $rc2 -eq 1 ]];then output=`ppping $$CN,$$SN`;if [[ $? -eq 1 ]]&&[[ $output =~ "$$CN: noping" ]]&&[[ $output =~ "$$SN: noping" ]];then exit 0;else exit 1;fi;elif [[ $rc1 -eq 0 ]]&&[[ $rc2 -eq 1 ]]; then output=`ppping $$CN,$$SN`; if [[ $? -eq 0 ]]&&[[ $output =~ "$$SN: noping" ]]&&[[ "$$CN: $$SN: noping" ]];then exit 0;else exit 1;fi;elif [[ $rc1 -eq 1 ]]&&[[ $rc2 -eq 0 ]]; then output=`ppping $$CN,$$SN`; if [[ $? -eq 0 ]]&&[[ $output =~ "$$CN: noping" ]]&&[[ "$$SN: $$CN: noping" ]];then exit 0;else exit 1;fi;else output=`ppping $$CN,$$SN`; if [[ $? -eq 0 ]]&&[[ $output =~ "$$CN: pinged all nodes successfully" ]]&&[[ "$$SN: pinged all nodes successfully" ]];then exit 0;else exit 1;fi;fi check:rc==0 @@ -66,6 +74,7 @@ end start:ppping_V_nodes description:test the connectivity between nodes in the noderange using ping and print verbose output. +label:others,parallel_cmds Attribute: $$CN,$$SN-The operation object of ppping command cmd:ping -c 3 $$CN > /dev/null 2>&1;rc1=$?;ping -c 3 $$SN > /dev/null 2>&1;rc2=$?;if [[ $rc1 -eq 1 ]]&&[[ $rc2 -eq 1 ]];then output=`ppping -V $$CN,$$SN`;if [[ $? -eq 1 ]]&&[[ $output =~ "$$CN: noping" ]]&&[[ $output =~ "$$SN: noping" ]];then exit 0;else exit 1;fi;elif [[ $rc1 -eq 0 ]]&&[[ $rc2 -eq 1 ]]; then output=`ppping -V $$CN,$$SN`; if [[ $? -eq 0 ]]&&[[ $output =~ "$$SN: noping" ]]&&[[ $output =~ "$$CN: $$SN: noping" ]]&&[[ $output =~ "$$CN: $$CN: ping" ]];then exit 0;else exit 1;fi;elif [[ $rc1 -eq 1 ]]&&[[ $rc2 -eq 0 ]]; then output=`ppping -V $$CN,$$SN`; if [[ $? -eq 0 ]]&&[[ $output =~ "$$CN: noping" ]]&&[[ $output =~ "$$SN: $$CN: noping" ]];then exit 0;else exit 1;fi;else output=`ppping -V $$CN,$$SN`; if [[ $? -eq 0 ]]&&[[ $output =~ "$$SN: $$CN: ping" ]]&&[[ $output =~ "$$SN: $$SN: ping" ]]&&[[ $output =~ "$$CN: $$SN: ping" ]]&&[[ $output =~ "$$CN: $$CN: ping" ]];then exit 0;else exit 1;fi;fi check:rc==0 @@ -75,6 +84,7 @@ end start:ppping_V_s_nodes description:test the connectivity between nodes in the noderange using ping and print Ping serially instead of in parallel information. +label:others,parallel_cmds Attribute: $$CN,$$SN-The operation object of ppping command cmd:ping -c 3 $$CN > /dev/null 2>&1;rc1=$?;ping -c 3 $$SN > /dev/null 2>&1;rc2=$?;if [[ $rc1 -eq 1 ]]&&[[ $rc2 -eq 1 ]];then output=`ppping -V -s $$CN,$$SN`;if [[ $? -eq 1 ]]&&[[ $output =~ "$$CN: noping" ]]&&[[ $output =~ "$$SN: noping" ]];then exit 0;else exit 1;fi;elif [[ $rc1 -eq 0 ]]&&[[ $rc2 -eq 1 ]]; then output=`ppping -V -s $$CN,$$SN`; if [[ $? -eq 0 ]]&&[[ $output =~ "$$SN: noping" ]]&&[[ $output =~ "$$CN: $$SN: noping" ]]&&[[ $output =~ "$$CN: $$CN: ping" ]];then exit 0;else exit 1;fi;elif [[ $rc1 -eq 1 ]]&&[[ $rc2 -eq 0 ]]; then output=`ppping -V -s $$CN,$$SN`; if [[ $? -eq 0 ]]&&[[ $output =~ "$$CN: noping" ]]&&[[ $output =~ "$$SN: $$CN: noping" ]];then exit 0;else exit 1;fi;else output=`ppping -V -s $$CN,$$SN`; if [[ $? -eq 0 ]]&&[[ $output =~ "$$SN: $$CN: ping" ]]&&[[ $output =~ "$$SN: $$SN: ping" ]]&&[[ $output =~ "$$CN: $$SN: ping" ]]&&[[ $output =~ "$$CN: $$CN: ping" ]];then exit 0;else exit 1;fi;fi check:rc==0 diff --git a/xCAT-test/autotest/testcase/probe/detect_dhcpd b/xCAT-test/autotest/testcase/probe/detect_dhcpd index b67ae4495..213f6ab0d 100644 --- a/xCAT-test/autotest/testcase/probe/detect_dhcpd +++ b/xCAT-test/autotest/testcase/probe/detect_dhcpd @@ -1,5 +1,6 @@ start:detect_dhcpd_work description:To test if xcatprobe detect_dhcpd works. This case must run in xcat mn +label:others,dhcp cmd:if [ -d "/tmp/detect_dhcpd_work" ]; then mv /tmp/detect_dhcpd_work /tmp/detect_dhcpd_work.bak; fi; mkdir -p /tmp/detect_dhcpd_work cmd:makedhcp -n check:rc == 0 diff --git a/xCAT-test/autotest/testcase/prsync/cases0 b/xCAT-test/autotest/testcase/prsync/cases0 index 3d2120028..de920f149 100644 --- a/xCAT-test/autotest/testcase/prsync/cases0 +++ b/xCAT-test/autotest/testcase/prsync/cases0 @@ -1,5 +1,6 @@ start:prsync_h description: prsync -h +label:others,parallel_cmds os:Linux cmd:prsync -h check:rc==0 @@ -8,6 +9,7 @@ end start:prsync_v description: prsync -v +label:others,parallel_cmds os:Linux cmd:prsync -v check:rc==0 @@ -16,6 +18,7 @@ end start:prsync_dir_node description: run prsync to copy files in dir from MN to CN +label:others,parallel_cmds os:Linux cmd: mkdir -p /tmp/pscp check:rc==0 @@ -41,6 +44,7 @@ end start:prsync_file_node description: run prsync to copy file from MN to CN +label:others,parallel_cmds os:Linux cmd: echo "prsync-test" > prsync.test check:rc==0 diff --git a/xCAT-test/autotest/testcase/pscp/cases0 b/xCAT-test/autotest/testcase/pscp/cases0 index 2d1e02b1a..e7050691e 100644 --- a/xCAT-test/autotest/testcase/pscp/cases0 +++ b/xCAT-test/autotest/testcase/pscp/cases0 @@ -1,10 +1,12 @@ start:pscp_h +label:others,parallel_cmds cmd:pscp -h check:rc==0 check:output=~Usage end start:pscp_v +label:others,parallel_cmds cmd:pscp -v check:rc==0 check:output=~Version @@ -12,6 +14,7 @@ end #copy single file start:pscp_node +label:others,parallel_cmds cmd:echo "test" > /tmp/pscp.tmp check:rc==0 cmd:pscp /tmp/pscp.tmp $$CN:/tmp/ @@ -31,6 +34,7 @@ end #copy a directory start:pscp_r_node +label:others,parallel_cmds cmd: mkdir -p /tmp/pscp check:rc==0 cmd:echo "test" > /tmp/pscp/pscp.tmp @@ -55,6 +59,7 @@ end start:pscp_i_node +label:others,parallel_cmds cmd:cp /etc/hosts /etc/hosts.bak check:rc==0 cmd:a=`cat /etc/hosts |grep ' $$CN.'|awk '{print $1}'`;b=`cat /etc/resolv.conf |grep search|awk '{print $2}'`;echo "$a $$CN-eth0.$b $$CN-eth0" >> /etc/hosts diff --git a/xCAT-test/autotest/testcase/psh/cases0 b/xCAT-test/autotest/testcase/psh/cases0 index f1ad5ad39..a015f6333 100644 --- a/xCAT-test/autotest/testcase/psh/cases0 +++ b/xCAT-test/autotest/testcase/psh/cases0 @@ -1,5 +1,6 @@ start:psh_h description: psh -h and psh -help +label:others,parallel_cmds os:Linux cmd:psh -h check:rc==0 @@ -11,6 +12,7 @@ end start:psh_v description: psh -v +label:others,parallel_cmds os:Linux cmd:psh -v check:output=~Version @@ -19,6 +21,7 @@ end start:psh_node_cmd_linux description: psh CN 'pwd' in linux +label:others,parallel_cmds os:Linux cmd:psh $$CN 'pwd' check:rc==0 @@ -28,6 +31,7 @@ end start:psh_node_cmd_aix description: psh CN 'pwd' in AIX +label:others,parallel_cmds os:Aix cmd:psh $$CN 'pwd' check:rc==0 @@ -37,6 +41,7 @@ end start:psh_l description: psh -l user CN 'uptime' in linux +label:others,parallel_cmds os:Linux cmd:psh -l root $$CN 'uptime' check:rc==0 @@ -46,6 +51,7 @@ end start:psh_i description: psh -i interface CN 'uptime' in linux +label:others,parallel_cmds os:Linux cmd:cp /etc/hosts /etc/hostsBK check:rc==0 diff --git a/xCAT-test/autotest/testcase/pythonsupport/cases0 b/xCAT-test/autotest/testcase/pythonsupport/cases0 index 37c63b03b..38a0eb05d 100644 --- a/xCAT-test/autotest/testcase/pythonsupport/cases0 +++ b/xCAT-test/autotest/testcase/pythonsupport/cases0 @@ -1,5 +1,6 @@ start:set_up_env_for_support_openbmc_in_python description:this case is used to test environment setup for supporting openbmc in python +label:others,hctrl_openbmc os:Linux hcp:openbmc,kvm cmd:mkdir -p /tmp/set_up_env_for_support_openbmc_in_python diff --git a/xCAT-test/autotest/testcase/restapi/global/cases0 b/xCAT-test/autotest/testcase/restapi/global/cases0 index d19bf7ea6..c645170ec 100644 --- a/xCAT-test/autotest/testcase/restapi/global/cases0 +++ b/xCAT-test/autotest/testcase/restapi/global/cases0 @@ -1,5 +1,6 @@ start:globalconf_get description: globalconf_get +label:others,restapi cmd:restapitest -m GET -r /globalconf check:rc==200 cmdcheck:restapitest -o '{"clustersite":{"xcatdport":"3001"}}' -O == @@ -7,6 +8,7 @@ end start:globalconf_get_attr description: globalconf_get_attr +label:others,restapi cmd:restapitest -m GET -r /globalconf/attrs/xcatdport,xcatiport check:rc==200 cmdcheck:restapitest -o '{"clustersite":{"xcatdport":"3001"}}' -O == @@ -15,12 +17,14 @@ end start:globalconf_put description: globalconf_put +label:others,restapi cmd:restapitest -m PUT -r /globalconf/attrs/domain -d '{"domain":"cluster1.com"}' check:rc==200 end start:globalconf_put_checkresult description: globalconf_put_checkresult +label:others,restapi cmd:restapitest -m GET -r /globalconf/attrs/domain check:rc==200 cmdcheck:restapitest -o '{"clustersite":{"domain":"cluster1.com"}}' -O == @@ -28,12 +32,14 @@ end start:globalconf_delete description: globalconf_delete +label:others,restapi cmd:restapitest -m DELETE -r /globalconf/attrs/domain check:rc==200 end start:globalconf_delete_checkresult description: globalconf_delete_checkresult +label:others,restapi cmd:restapitest -m GET -r /globalconf/attrs/domain check:rc==200 cmdcheck:restapitest -o '{"clustersite":{"domain":"cluster1.com"}}' -O != diff --git a/xCAT-test/autotest/testcase/restapi/group/cases0 b/xCAT-test/autotest/testcase/restapi/group/cases0 index ea26e4d11..f6b3ae7b5 100644 --- a/xCAT-test/autotest/testcase/restapi/group/cases0 +++ b/xCAT-test/autotest/testcase/restapi/group/cases0 @@ -1,5 +1,6 @@ start:get_group_list description: get_group_list +label:others,restapi cmd:restapitest -m GET -r /groups check:rc==200 cmdcheck:restapitest -o '["all"]' -O == @@ -7,6 +8,7 @@ end start:get_group_all description: get_group_all +label:others,restapi cmd:restapitest -m GET -r /groups/all check:rc==200 cmdcheck:restapitest -o '{"all":{"members":"virtualcn2"}}' -O == @@ -14,12 +16,14 @@ end start:put_group_all description: put_group_all +label:others,restapi cmd:restapitest -m PUT -r /groups/all -d '{"mgt":"dfm","netboot":"yaboot"}' check:rc==200 end start:get_group_all_for_put description: get_group_all_for_put +label:others,restapi cmd:restapitest -m GET -r /groups/all check:rc==200 cmdcheck:restapitest -o '{"all":{"netboot":"yaboot"}}' -O == @@ -27,6 +31,7 @@ end start:get_group_all_attrs description: get_group_all_attrs +label:others,restapi cmd:restapitest -m GET -r /groups/all/attrs/mgt,netboot check:rc==200 cmdcheck:restapitest -o '{"all":{"netboot":"yaboot"}}' -O == diff --git a/xCAT-test/autotest/testcase/restapi/network/cases0 b/xCAT-test/autotest/testcase/restapi/network/cases0 index 2851f39b1..3a63bbf60 100644 --- a/xCAT-test/autotest/testcase/restapi/network/cases0 +++ b/xCAT-test/autotest/testcase/restapi/network/cases0 @@ -1,5 +1,6 @@ start:get_networks description: get_networks +label:others,restapi cmd:restapitest -m GET -r /networks check:rc==200 cmdcheck:restapitest -o '["network1"]' -O == @@ -7,12 +8,14 @@ end start:post_networks description: post_networks +label:others,restapi cmd:restapitest -m POST -r /networks check:rc==201 end start:get_networks_attr_for_post description: get_networks_attr_for_post +label:others,restapi cmd:restapitest -m GET -r /networks/network1 check:rc==200 cmdcheck:restapitest -o '{"network1":{"net":"10.1.0.0"}}' -O == @@ -20,12 +23,14 @@ end start:post_networks_attr description: post_networks_attr +label:others,restapi cmd:restapitest -m GET -r /networks/network1 -d '{"gateway":"10.1.0.1","mask":"255.255.0.0"}' check:rc==201 end start:get_networks_all_attr description: get_networks_all_attr +label:others,restapi cmd:restapitest -m GET -r /networks/network1 check:rc==200 cmdcheck:restapitest -o '{"network1":{"net":"10.1.0.0"}}' -O == @@ -33,6 +38,7 @@ end start:get_networks_attr description: get_networks_attr +label:others,restapi cmd:restapitest -m GET -r /networks/network1/attrs/net,mask check:rc==200 cmdcheck:restapitest -o '{"network1":{"net":"10.1.0.0"}}' -O == @@ -40,12 +46,14 @@ end start:put_networks_attr description: put_networks_attr +label:others,restapi cmd:restapitest -m PUT -r /networks/network1 -d '{"mgtifname":"eth0","net":"10.1.0.0"}' check:rc==200 end start:get_networks_attr_for_put description: get_networks_attr_for_put +label:others,restapi cmd:restapitest -m GET -r /networks/network1 check:rc==200 cmdcheck:restapitest -o '{"network1":{"net":"10.1.0.0"}}' -O == @@ -53,12 +61,14 @@ end start:delete_networks_attr_for_put description: delete_networks_attr_for_put +label:others,restapi cmd:restapitest -m DELETE -r /networks/network1 check:rc==200 end start:get_networks_for_delete description: get_networks_for_delete +label:others,restapi cmd:restapitest -m GET -r /networks check:rc==200 cmdcheck:restapitest -o '["network1"]' -O != diff --git a/xCAT-test/autotest/testcase/restapi/node/cases0 b/xCAT-test/autotest/testcase/restapi/node/cases0 index ba33f5831..90999064e 100644 --- a/xCAT-test/autotest/testcase/restapi/node/cases0 +++ b/xCAT-test/autotest/testcase/restapi/node/cases0 @@ -1,11 +1,13 @@ start:create_node_rest description: create a node with REST API +label:others,restapi cmd:restapitest -m POST -r /nodes/restnode -d '{"groups":"all","mgt":"dfm","netboot":"yaboot"}' -u $$username -p $$password check:rc==201 end start:create_node_rest2 description: create a node with REST API failure +label:others,restapi cmd:restapitest -m POST -r /nodes/restnode -d '{"groups":"all","mgt":"dfm","netboot":"yaboot"}' -u $$username -p $$password check:rc==147 check:output=~"errorcode":"1" @@ -13,6 +15,7 @@ end start:get_nodes_rest description: get all nodes with REST API +label:others,restapi cmd:restapitest -m GET -r /nodes -u $$username -p $$password check:rc==200 check:output=~"restnode" @@ -20,6 +23,7 @@ end start:get_node_rest description: get single node with REST API +label:others,restapi cmd:restapitest -m GET -r /nodes/restnode -u $$username -p $$password check:rc==200 check:output=~"restnode" @@ -27,12 +31,14 @@ end start:node_delete_rest description: delete node with REST API +label:others,restapi cmd:restapitest -m DELETE -r /nodes/restnode -u $$username -p $$password check:rc==200 end start:get_nodes_rest2 description: get all nodes with REST API +label:others,restapi cmd:restapitest -m GET -r /nodes -u $$username -p $$password check:rc==200 check:output!~"restnode" @@ -40,6 +46,7 @@ end start:get_node_rest2 description: get single node with REST API +label:others,restapi cmd:restapitest -m GET -r /nodes/restnode -u $$username -p $$password check:rc==147 check:output=~"errorcode":"1" @@ -47,48 +54,56 @@ end start:create_node_token_rest description: create a node with REST API using authentication token +label:others,restapi cmd:restapitest -m POST -r /nodes/restnode -d '{"groups":"all","mgt":"dfm","netboot":"yaboot"}' -u $$username -p $$password -t check:rc==201 end start:node_makehosts_rest description: makehosts for node with REST API +label:others,restapi cmd:restapitest -m POST -r /nodes/restnode/host -u $$username -p $$password check:rc==201 end start:node_makedns_rest description: makehosts for node with REST API +label:others,restapi cmd:restapitest -m POST -r /nodes/restnode/dns -u $$username -p $$password check:rc==201 end start:node_delete_dns_rest description: delete dns for node with REST API +label:others,restapi cmd:restapitest -m DELETE -r /nodes/restnode/dns -u $$username -p $$password check:rc==200 end start:node_change_attr_rest description: change node attribute with REST API +label:others,restapi cmd:restapitest -m PUT -r /nodes/restnode -d '{"mac":"00:1a:64:54:14:80"}' -u $$username -p $$password check:rc==200 end start:node_makedhcp_rest description: makedhcp for node with REST API +label:others,restapi cmd:restapitest -m POST -r /nodes/restnode/dhcp -u $$username -p $$password check:rc==201 end start:node_delete_dhcp_rest description: node_delete_dhcp +label:others,restapi cmd:restapitest -m DELETE -r /nodes/restnode/dhcp -u $$username -p $$password check:rc==200 end start:node_state_rest description: get node state with REST API +label:others,restapi cmd:restapitest -m GET -r /nodes/$$CN/nodestat -u $$username -p $$password check:rc==200 check:output=~"$$CN" @@ -97,6 +112,7 @@ end start:node_state_token_rest description: get node state with REST API using authentication token +label:others,restapi cmd:restapitest -m GET -r /nodes/$$CN/nodestat -u $$username -p $$password -t check:rc==200 check:output=~"$$CN" @@ -105,6 +121,7 @@ end start:get_node_rest_error description: get single node with REST API with invalid user or password +label:others,restapi cmd:restapitest -m GET -r /nodes/restnode -u abc -p xyz check:rc==145 check:output=~"error":"Authentication failure" diff --git a/xCAT-test/autotest/testcase/restapi/node/cases1 b/xCAT-test/autotest/testcase/restapi/node/cases1 index db848f1f2..175d86567 100644 --- a/xCAT-test/autotest/testcase/restapi/node/cases1 +++ b/xCAT-test/autotest/testcase/restapi/node/cases1 @@ -1,5 +1,6 @@ start:inventory_node_rest description: get OpenBMC node inventory with REST API +label:others,restapi hcp:openbmc cmd:restapitest -m GET -r /nodes/$$CN/inventory -u $$username -p $$password check:rc==200 @@ -8,6 +9,7 @@ end start:inventory_node_rest2 description: get IPMI node inventory with REST API +label:others,restapi hcp:ipmi cmd:restapitest -m GET -r /nodes/$$CN/inventory -u $$username -p $$password check:rc==200 @@ -16,6 +18,7 @@ end start:vitals_node_rest description: get OpenBMC node vitals with REST API +label:others,restapi hcp:openbmc cmd:restapitest -m GET -r /nodes/$$CN/vitals -u $$username -p $$password check:rc==200 @@ -24,6 +27,7 @@ end start:vitals_node_rest2 description: get IPMI node vitals with REST API +label:others,restapi hcp:ipmi cmd:restapitest -m GET -r /nodes/$$CN/vitals -u $$username -p $$password check:rc==200 @@ -32,6 +36,7 @@ end start:eventlog_node_rest description: get OpenBMC node inventory with REST API +label:others,restapi hcp:openbmc cmd:restapitest -m GET -r /nodes/$$CN/eventlog -u $$username -p $$password check:rc==200 @@ -40,6 +45,7 @@ end start:eventlog_node_rest2 description: get IPMI node eventlog with REST API +label:others,restapi hcp:ipmi cmd:restapitest -m GET -r /nodes/$$CN/eventlog -u $$username -p $$password check:rc==200 @@ -48,6 +54,7 @@ end start:beacon_node_rest description: get OpenBMC node beacon with REST API +label:others,restapi hcp:openbmc cmd:restapitest -m GET -r /nodes/$$CN/beacon -u $$username -p $$password check:rc==200 @@ -57,6 +64,7 @@ end start:beacon_set_node_rest description: set OpenBMC node beacon with REST API +label:others,restapi hcp:openbmc cmd:restapitest -m PUT -r /nodes/$$CN/beacon -d '{"action":"on"}' -u $$username -p $$password check:rc==200 @@ -64,6 +72,7 @@ end start:beacon_set_node_rest2 description: set IPMI node beacon with REST API +label:others,restapi hcp:ipmi cmd:restapitest -m PUT -r /nodes/$$CN/beacon -d '{"action":"on"}' -u $$username -p $$password check:rc==200 diff --git a/xCAT-test/autotest/testcase/restapi/osimage/cases0 b/xCAT-test/autotest/testcase/restapi/osimage/cases0 index 3335577b4..70a91c1e3 100644 --- a/xCAT-test/autotest/testcase/restapi/osimage/cases0 +++ b/xCAT-test/autotest/testcase/restapi/osimage/cases0 @@ -1,5 +1,6 @@ start:get_images_all description: get_images_all +label:others,restapi cmd:restapitest -m GET -r /osimages check:rc==200 cmdcheck:restapitest -o '["rhels6.5-x86_64-install-compute"]' -O == @@ -7,12 +8,14 @@ end start:post_images description: post_images +label:others,restapi cmd:restapitest -m POST -r /osimages -d '{"iso":"/iso/RHEL6.5-20131111.0-Server-x86_64-DVD1.iso"}' check:rc==201 end start:get_images description: get_images +label:others,restapi cmd:restapitest -m GET -r /osimages/rhels6.5-x86_64-install-compute check:rc==200 cmdcheck:restapitest -o '{"rhels6.5-x86_64-install-compute":{"provmethod":"install"}}' -O == @@ -20,12 +23,14 @@ end start:put_images_attr description: put_images_attr +label:others,restapi cmd:restapitest -m PUT -r /osimages/rhels6.5-x86_64-install-hpc -d '{"osvers":"sles11.3","osarch":"x86_64"}' check:rc==200 end start:get_images_for_put description: get_images_for_put +label:others,restapi cmd:restapitest -m GET -r /osimages/rhels6.5-x86_64-install-hpc check:rc==200 cmdcheck:restapitest -o '{"rhels6.5-x86_64-install-hpc":{"osvers":"sles11.3"}}' -O == @@ -33,12 +38,14 @@ end start:create_images description: create_images +label:others,restapi cmd:restapitest -m POST -r /osimages/rhels6.5-x86_64-install-hpc -d '{"profile":"compute","osarch":"x86_64"}' check:rc==200 end start:get_images_for_post description: get_images_for_post +label:others,restapi cmd:restapitest -m GET -r /osimages/rhels6.5-x86_64-install-hpc check:rc==200 cmdcheck:restapitest -o '{"rhels6.5-x86_64-install-hpc":{"profile":"compute"}}' -O == @@ -46,12 +53,14 @@ end start:delete_images description: delete_images +label:others,restapi cmd:restapitest -m DELETE -r /osimages/rhels6.5-x86_64-install-hpc check:rc==200 end start:get_images_all_for_delete description: get_images_all_for_delete +label:others,restapi cmd:restapitest -m GET -r /osimages check:rc==200 cmdcheck:restapitest -o '["rhels6.5-x86_64-install-hpc"]' -O != @@ -59,6 +68,7 @@ end start:get_images_attr description: get_images_attr +label:others,restapi cmd:restapitest -m GET -r /osimages/rhels6.5-x86_64-install-compute/attrs/imagetype,osarch,osname,provmethod check:rc==200 cmdcheck:restapitest -o '{"sles11.2-ppc64-install-compute":{osarch":"x86_64"}}' -O == @@ -66,24 +76,28 @@ end start:post_images_attr_genimage description: post_images_attr_genimage +label:others,restapi cmd:restapitest -m POST -r /osimages/rhels6.5-x86_64-statelite-service/instance -d '{"action":"gen"}' check:rc==200 end start:post_images_attr_packimage description: post_images_attr +label:others,restapi cmd:restapitest -m POST -r /osimages/rhels6.5-x86_64-statelite-service/instance -d '{"action":"pack"}' check:rc==200 end start:post_images_attr_exportimage description: post_images_attr +label:others,restapi cmd:restapitest -m POST -r /osimages/rhels6.5-x86_64-statelite-service/instance -d '{"action":"export"}' check:rc==200 end start:delete_images description: delete_images +label:others,restapi cmd:restapitest -m DELETE -r /osimages/rhels6.5-x86_64-statelite-service/instance check:rc==200 end diff --git a/xCAT-test/autotest/testcase/restapi/policy/cases0 b/xCAT-test/autotest/testcase/restapi/policy/cases0 index 73ae1b306..f73fcb7d4 100644 --- a/xCAT-test/autotest/testcase/restapi/policy/cases0 +++ b/xCAT-test/autotest/testcase/restapi/policy/cases0 @@ -1,5 +1,6 @@ start:get_policy_all description: get_policy_all +label:others,restapi cmd:restapitest -m GET -r /policy check:rc==200 cmdcheck:restapitest -o '["1"]' -O == @@ -7,6 +8,7 @@ end start:get_policy_attr description: get_policy_attr +label:others,restapi cmd:restapitest -m GET -r /policy/1 check:rc==200 cmdcheck:restapitest -o '{"1":{"name":"root"}}' -O == @@ -14,12 +16,14 @@ end start:put_policy_attr description: put_policy_attr +label:others,restapi cmd:restapitest -m PUT -r /policy/1 -d '{"name":"root1"}' check:rc==200 end start:get_policy_attr_for_put description: get_policy_attr_for_put +label:others,restapi cmd:restapitest -m GET -r /policy/1 check:rc==200 cmdcheck:restapitest -o '{"1":{"name":"root1"}}' -O == @@ -27,18 +31,21 @@ end start:put_policy_attr_changeback description: put_policy_attr_changeback +label:others,restapi cmd:restapitest -m PUT -r /policy/1 -d '{"name":"root"}' check:rc==200 end start:post_policy description: post_policy +label:others,restapi cmd:restapitest -m POST -r /policy/11 -d '{"name":"root1",,"commands":"rpower"}' check:rc==201 end start:get_policy_attr_for_post description: get_policy_attr_for_post +label:others,restapi cmd:restapitest -m GET -r /policy/11 check:rc==200 cmdcheck:restapitest -o '{"11":{"name":"root1"}}' -O == @@ -46,6 +53,7 @@ end start:delete_policy description: delete_policy +label:others,restapi cmd:restapitest -m DELETE -r /policy/11 check:rc==200 cmdcheck:restapitest -o '["11"]' -O != @@ -53,6 +61,7 @@ end start:get_policy_attrs description: get_policy_attrs +label:others,restapi cmd:restapitest -m GET -r /policy/1/attrs/name,rule check:rc==200 cmdcheck:restapitest -o '{"1":{"name":"root"}}' -O == diff --git a/xCAT-test/autotest/testcase/restapi/service/cases0 b/xCAT-test/autotest/testcase/restapi/service/cases0 index e9569fd69..88c491b28 100644 --- a/xCAT-test/autotest/testcase/restapi/service/cases0 +++ b/xCAT-test/autotest/testcase/restapi/service/cases0 @@ -1,29 +1,34 @@ start:post_dns description: post_dns +label:others,restapi cmd:restapitest -m POST -r /services/dns check:rc==201 end start:post_dhcp description: post_dhcp +label:others,restapi cmd:restapitest -m POST -r /services/dns check:rc==201 end start:post_host description: post_host +label:others,restapi cmd:restapitest -m POST -r /services/host check:rc==201 end start:post_host description: post_host +label:others,restapi cmd:restapitest -m POST -r /services/host check:rc==201 end start:get_slpnodes description: get_slpnodes +label:others,restapi cmd:restapitest -m GET -r /services/slpnodes check:rc==200 cmdcheck:restapitest -o '{"ngpcmm01":{"mpa":"ngpcmm01"}}' -O == @@ -31,6 +36,7 @@ end start:get_slpnodes_withst description: get_slpnodes_withst +label:others,restapi cmd:restapitest -m GET -r /services/slpnodes/FSP check:rc==200 cmdcheck:restapitest -o '{"Server--SNY014BG27A01K":{"mpa":"Server--SNY014BG27A01K"}}' -O == diff --git a/xCAT-test/autotest/testcase/restapi/table/cases0 b/xCAT-test/autotest/testcase/restapi/table/cases0 index 6a9ed807b..c8b710904 100644 --- a/xCAT-test/autotest/testcase/restapi/table/cases0 +++ b/xCAT-test/autotest/testcase/restapi/table/cases0 @@ -1,5 +1,6 @@ start:get_networks_table_rest description: get all networks table entries with REST API +label:others,restapi cmd:restapitest -m GET -r /tables/networks/rows -u $$username -p $$password check:rc==200 check:output=~netname @@ -7,6 +8,7 @@ end start:get_network_table_rest description: get all entries from invalid table name with REST API +label:others,restapi cmd:restapitest -m GET -r /tables/network/rows -u $$username -p $$password check:rc==147 check:output=~No such table @@ -14,6 +16,7 @@ end start:get_network_table_with_attr_selection_rest description: get all attribute matching networks table entries with REST API +label:others,restapi cmd:restapitest -m GET -r /tables/networks/rows/mask=255.0.0.0 -u $$username -p $$password check:rc==200 check:output=~"mask":"255.0.0.0" @@ -21,6 +24,7 @@ end start:get_network_table_with_attr_selection_error_rest description: get all attribute matching networks table entries with REST API, invalid attribute name +label:others,restapi cmd:restapitest -m GET -r /tables/networks/rows/abc=255.0.0.0 -u $$username -p $$password check:rc==147 check:output=~No table rows @@ -28,6 +32,7 @@ end start:get_network_table_with_attr_selection_error_rest2 description: get all attribute matching networks table entries with REST API, no match +label:others,restapi cmd:restapitest -m GET -r /tables/networks/rows/mask=a.b.c.d -u $$username -p $$password check:rc==147 check:output=~No table rows @@ -35,6 +40,7 @@ end start:get_network_table_with_attr_selection_rest2 description: get attribute matching networks table attributes with REST API +label:others,restapi cmd:restapitest -m GET -r /tables/networks/rows/mask=255.0.0.0/gateway -u $$username -p $$password check:rc==200 check:output=~"gateway":" @@ -42,6 +48,7 @@ end start:set_network_table_attr_with_attr_selection_rest2 description: set attribute for network table for attr seleection with REST API +label:others,restapi cmd:restapitest -m PUT -r /tables/networks/rows/mask=255.0.0.0 -d '{"comments":"REST API TEST"}' -u $$username -p $$password check:rc==200 cmd:lsdef -l -t network @@ -50,6 +57,7 @@ end start:delete_network_rest description: create a network and delele network with REST API +label:others,restapi cmd: restapitest -m POST -r /networks/network_rest -d '{"gateway":"10.1.0.1","mask":"255.255.0.0","net":"199.168.0.0"}' -u $$username -p $$password cmd: restapitest -m DELETE -r /tables/networks/rows/net=199.168.0.0 -u $$username -p $$password check:rc==200 diff --git a/xCAT-test/autotest/testcase/rmkit/case0 b/xCAT-test/autotest/testcase/rmkit/case0 index b0683ed37..9cbad4994 100644 --- a/xCAT-test/autotest/testcase/rmkit/case0 +++ b/xCAT-test/autotest/testcase/rmkit/case0 @@ -1,4 +1,5 @@ start:rmkit_v +label:others,KIT os:Linux cmd:rmkit -v check:rc==0 @@ -13,6 +14,7 @@ check:output=~compatible_frameworks end start:rmkit_h +label:others,KIT os:Linux cmd:rmkit -h check:rc==0 @@ -23,6 +25,7 @@ check:output=~ Usage end start:rmkit_t_no +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/rmkit/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/rmkit;buildkit create mykits @@ -48,6 +51,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/rmkit/mykits end start:rmkit_t_yes +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/rmkit/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/rmkit;buildkit create mykits @@ -84,6 +88,7 @@ check:rc==0 end start:rmkit_f +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/rmkit/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/rmkit;buildkit create mykits @@ -113,6 +118,7 @@ end start:rmkit_V +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/rmkit/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/rmkit;buildkit create mykits diff --git a/xCAT-test/autotest/testcase/rmkitcomp/case0 b/xCAT-test/autotest/testcase/rmkitcomp/case0 index 070efb702..4933bb7ce 100644 --- a/xCAT-test/autotest/testcase/rmkitcomp/case0 +++ b/xCAT-test/autotest/testcase/rmkitcomp/case0 @@ -1,4 +1,5 @@ start:rmkitcomp_v +label:others,KIT os:Linux cmd:rmkitcomp -v check:rc==0 @@ -13,6 +14,7 @@ check:output=~compatible_frameworks end start:rmkitcomp_h +label:others,KIT os:Linux cmd:rmkitcomp -h check:rc==0 @@ -23,6 +25,7 @@ check:output=~ Usage end start:rmkitcomp_noscripts +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp/$$KITDATA cmd:mkdir -p /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp/$$KITDATA @@ -59,6 +62,7 @@ check:rc==0 end start:rmkitcomp_f +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp/$$KITDATA cmd:mkdir -p /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp/$$KITDATA diff --git a/xCAT-test/autotest/testcase/rmvm/cases0 b/xCAT-test/autotest/testcase/rmvm/cases0 index 6f1f63f72..781947921 100644 --- a/xCAT-test/autotest/testcase/rmvm/cases0 +++ b/xCAT-test/autotest/testcase/rmvm/cases0 @@ -1,4 +1,5 @@ start:rmvm_noderange +label:others,hctrl_hmc hcp:hmc cmd:mkdef -t node -o testnode1,testnode2 mgt=hmc groups=all cmd:mkvm testnode1,testnode2 -i $$MaxLparID -l $$CN diff --git a/xCAT-test/autotest/testcase/rscan/cases0 b/xCAT-test/autotest/testcase/rscan/cases0 index 96484408e..636920a00 100644 --- a/xCAT-test/autotest/testcase/rscan/cases0 +++ b/xCAT-test/autotest/testcase/rscan/cases0 @@ -1,4 +1,5 @@ start:rscan_noderange +label:others,hctrl_hmc hcp:hmc cmd:rscan __GETNODEATTR($$CN,hcp)__ check:rc==0 @@ -7,18 +8,21 @@ check:output=~cec\s+[\w|-]+\s+\w{4}-\w{3}\s+\w{7} check:output=~hmc\s+__GETNODEATTR($$CN,hcp)__\s+\w{4}-\w{3}\s+\w{7} end start:rscan_x +label:others,hctrl_hmc hcp:hmc cmd:rscan __GETNODEATTR($$CN,hcp)__ -x check:rc==0 check:output=~[\w-]+ end start:rscan_z +label:others,hctrl_hmc hcp:hmc cmd:rscan __GETNODEATTR($$CN,hcp)__ -z check:rc==0 check:output=~hcp=__GETNODEATTR($$CN,hcp)__ end start:rscan_w +label:others,hctrl_hmc hcp:hmc cmd:lsdef -t node -l $$CN -z > /tmp/$$CN.stanza check:rc==0 @@ -39,6 +43,7 @@ cmd:cat /tmp/$$CN.stanza | mkdef -z cmd:rm -f /tmp/$$CN.stanza end start:rscan_x_w +label:others,hctrl_hmc hcp:hmc cmd:lsdef -t node -l $$CN -z > /tmp/$$CN.stanza check:rc==0 @@ -57,6 +62,7 @@ cmd:cat /tmp/$$CN.stanza | mkdef -z cmd:rm -f /tmp/$$CN.stanza end start:rscan_z_w +label:others,hctrl_hmc hcp:hmc cmd:lsdef -t node -l $$CN -z > /tmp/$$CN.stanza check:rc==0 diff --git a/xCAT-test/autotest/testcase/runcmdinstaller/cases0 b/xCAT-test/autotest/testcase/runcmdinstaller/cases0 index 22b3e23b1..8adefa9b1 100644 --- a/xCAT-test/autotest/testcase/runcmdinstaller/cases0 +++ b/xCAT-test/autotest/testcase/runcmdinstaller/cases0 @@ -20,6 +20,7 @@ cmd:chtab key=xcatdebugmode site.value="0" end start:get_xcat_postscripts_loginfo description:get xcat post scripts loginfo +label:others,postscripts cmd:chtab key=xcatdebugmode site.value="1" check:rc==0 cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute @@ -34,6 +35,7 @@ cmd:chtab key=xcatdebugmode site.value="0" end start:updatenode_postscripts_loginfo description:get updatenode postsripts log info +label:others,postscripts cmd:chtab key=xcatdebugmode site.value="1" check:rc==0 cmd:chdef $$CN -p postscripts=setupntp diff --git a/xCAT-test/autotest/testcase/signal/cases0 b/xCAT-test/autotest/testcase/signal/cases0 index efd959a5e..26112a181 100644 --- a/xCAT-test/autotest/testcase/signal/cases0 +++ b/xCAT-test/autotest/testcase/signal/cases0 @@ -1,4 +1,5 @@ start:genimage_sigint +label:others cmd:/opt/xcat/share/xcat/tools/autotest/testcase/signal/test-sigint-genimage.sh check:rc==0 end diff --git a/xCAT-test/autotest/testcase/simulator/clear_simulator b/xCAT-test/autotest/testcase/simulator/clear_simulator index 03c442fd9..e16821451 100644 --- a/xCAT-test/autotest/testcase/simulator/clear_simulator +++ b/xCAT-test/autotest/testcase/simulator/clear_simulator @@ -1,23 +1,27 @@ start:clear_openbmc_simulator description:clear evironment +label:others,hctrl_openbmc cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -c $$MN $$CN check:rc==0 end start:clear_openbmc_simulator_multiple_100 description:clear evironment that simulate 100 OpenBMCs +label:others,hctrl_openbmc cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -c $$MN $$CN $$bmcusername $$bmcpasswd 100 check:rc==0 end start:clear_openbmc_simulator_multiple_1000 description:clear evironment that simulate 1000 OpenBMCs +label:others,hctrl_openbmc cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -c $$MN $$CN $$bmcusername $$bmcpasswd 1000 check:rc==0 end start:clear_openbmc_simulator_multiple_5000 description:clear evironment that simulate 5000 OpenBMCs +label:others,hctrl_openbmc cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -c $$MN $$CN $$bmcusername $$bmcpasswd 5000 check:rc==0 end diff --git a/xCAT-test/autotest/testcase/simulator/setup_simulator b/xCAT-test/autotest/testcase/simulator/setup_simulator index 012b60c08..ff61b0f94 100644 --- a/xCAT-test/autotest/testcase/simulator/setup_simulator +++ b/xCAT-test/autotest/testcase/simulator/setup_simulator @@ -1,47 +1,55 @@ start:setup_openbmc_simulator description:install dependent packaages, setup and start openbmc simulator +label:others,hctrl_openbmc cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -s $$MN $$CN $$bmcusername $$bmcpasswd 0 check:rc==0 end start:setup_openbmc_simulator_multiple_100 description:install dependent packaages, setup and start 100 openbmc simulator +label:others,hctrl_openbmc cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -s $$MN $$CN $$bmcusername $$bmcpasswd 100 check:rc==0 end start:setup_openbmc_simulator_multiple_1000 description:install dependent packaages, setup and start 1000 openbmc simulator +label:others,hctrl_openbmc cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -s $$MN $$CN $$bmcusername $$bmcpasswd 1000 check:rc==0 end start:setup_openbmc_simulator_multiple_5000 description:install dependent packaages, setup and start 5000 openbmc simulator +label:others,hctrl_openbmc cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -s $$MN $$CN $$bmcusername $$bmcpasswd 5000 check:rc==0 end start:setup_openbmc_simulator_multiple_1000_delay_random_1m description:install dependent packaages, setup and start 1000 openbmc simulator with random that the most delay time 1 minute +label:others,hctrl_openbmc cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -s $$MN $$CN $$bmcusername $$bmcpasswd 1000 random 1m check:rc==0 end start:setup_openbmc_simulator_multiple_5000_delay_random_1m description:install dependent packaages, setup and start 5000 openbmc simulator with random that the most delay time 1 minute +label:others,hctrl_openbmc cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -s $$MN $$CN $$bmcusername $$bmcpasswd 5000 random 1m check:rc==0 end start:setup_openbmc_simulator_multiple_1000_delay_random_1m30 description:install dependent packaages, setup and start 1000 openbmc simulator with random that the most delay time 1m30s +label:others,hctrl_openbmc cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -s $$MN $$CN $$bmcusername $$bmcpasswd 1000 random 1m30 check:rc==0 end start:setup_openbmc_simulator_multiple_1000_delay_random_30 description:install dependent packaages, setup and start 1000 openbmc simulator with random that the most delay time 30s +label:others,hctrl_openbmc cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -s $$MN $$CN $$bmcusername $$bmcpasswd 1000 random 0m30 check:rc==0 end diff --git a/xCAT-test/autotest/testcase/sinv/cases0 b/xCAT-test/autotest/testcase/sinv/cases0 index 9916fb479..84e0522bb 100644 --- a/xCAT-test/autotest/testcase/sinv/cases0 +++ b/xCAT-test/autotest/testcase/sinv/cases0 @@ -1,4 +1,5 @@ start:sinv_c_p_t_r_o +label:others,parallel_cmds cmd:xdsh $$CN rpm -qa | xdshbak > /tmp/sinv.template check:rc==0 cmd:sinv $$CN -c "xdsh $$CN rpm -qa" -p /tmp/sinv.template -t 2 -r -o /tmp/sinv.output @@ -8,6 +9,7 @@ check:output=~$$CN cmd:rm -f /tmp/sinv.template /tmp/sinv.output end start:sinv_c_s_p_t_o +label:others,parallel_cmds cmd:sinv $$CN -c "xdsh $$CN rpm -qa" -s $$CN -p /tmp/sinv.template -t 2 -o /tmp/sinv.output check:rc==0 cmd:cat /tmp/sinv.output diff --git a/xCAT-test/autotest/testcase/snpool/cfg_wrong_cn_in_sn_pool_tftp_sync_mode b/xCAT-test/autotest/testcase/snpool/cfg_wrong_cn_in_sn_pool_tftp_sync_mode index 90344fd49..9dc4543b5 100644 --- a/xCAT-test/autotest/testcase/snpool/cfg_wrong_cn_in_sn_pool_tftp_sync_mode +++ b/xCAT-test/autotest/testcase/snpool/cfg_wrong_cn_in_sn_pool_tftp_sync_mode @@ -1,5 +1,6 @@ start:cfg_wrong_cn_in_sn_pool_tftp_sync_mode description:The test case is intend to test the error handling of the service node pool when a compute has misconfigured node definition +label:others,invoke_provision,sn_pool cmd:fdisk -l cmd:df -T #cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode b/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode index 797c6b44f..f56e03bfe 100644 --- a/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode +++ b/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode @@ -1,5 +1,6 @@ start:not_set_xcatmaster_in_sn_pool_tftp_mount_mode description: this case is to test when compute nodes' xcatmaster is not set in service node pool environment,compute node's provision files are correctly set after nodeset. +label:others,invoke_provision,sn_pool cmd:fdisk -l cmd:df -T #cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult b/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult index 2f6c1c524..51da0667e 100644 --- a/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult +++ b/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult @@ -1,5 +1,6 @@ start:not_set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult description: this case is to check the configuration files after nodeset for case not_set_xcatmaster_in_sn_pool_tftp_mount_mode +label:others,invoke_provision,sn_pool #create a test compute node, don't set it's xcatmaster, set it's service node as SN and CN cmd:mkdef -t node -o compute1 groups=compute ip=10.0.0.199 mac=4a:c8:f7:de:d0:09 profile=compute os=__GETNODEATTR($$CN,os)__ arch=__GETNODEATTR($$CN,arch)__ netboot=__GETNODEATTR($$CN,netboot)__ diff --git a/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_sync_mode b/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_sync_mode index 805f33e21..9cfb9e169 100644 --- a/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_sync_mode +++ b/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_sync_mode @@ -1,5 +1,6 @@ start:not_set_xcatmaster_in_sn_pool_tftp_sync_mode description: this case is to test when compute nodes' xcatmaster is not set in service node pool environment, compute node's provision files are correctly set after nodeset. +label:others,invoke_provision,sn_pool cmd:fdisk -l cmd:df -T #cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/snpool/set_disjointdhcps_in_sn_pool_tftp_sync_mode b/xCAT-test/autotest/testcase/snpool/set_disjointdhcps_in_sn_pool_tftp_sync_mode index 308c908b0..533a68a7a 100644 --- a/xCAT-test/autotest/testcase/snpool/set_disjointdhcps_in_sn_pool_tftp_sync_mode +++ b/xCAT-test/autotest/testcase/snpool/set_disjointdhcps_in_sn_pool_tftp_sync_mode @@ -1,5 +1,6 @@ start:set_disjointdhcps_in_sn_pool_tftp_sync_mode description: Verify the disjointdhcps feature when petitboot is used for OS loader. +label:others,invoke_provision,sn_pool,dhcp cmd:rmdef testnode1 cmd:rm -f /tftpboot/petitboot/testnode1 cmd:mkdef -t node -o testnode1 arch=ppc64le cons=bmc groups=ipmi ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=ipmi profile=compute os=rhels7.99 diff --git a/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode b/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode index b7a6d77c6..fec54758b 100644 --- a/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode +++ b/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode @@ -1,5 +1,6 @@ start:set_xcatmaster_in_sn_pool_tftp_mount_mode description: this case is to test when compute nodes' xcatmaster is set in service node pool environment,compute node's provision files are correctly set after nodeset. +label:others,invoke_provision,sn_pool cmd:fdisk -l cmd:df -T #cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult b/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult index 75079452e..69ef75fae 100644 --- a/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult +++ b/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult @@ -1,5 +1,6 @@ start:set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult description: this case is to check the configuration files after nodeset for case set_xcatmaster_in_sn_pool_tftp_mount_mode +label:others,invoke_provision,sn_pool #create a test compute node, set it's xcatmaster as SN, set it's service node as SN and CN cmd:mkdef -t node -o compute1 groups=compute ip=10.0.0.199 mac=4a:c8:f7:de:d0:09 profile=compute os=__GETNODEATTR($$CN,os)__ arch=__GETNODEATTR($$CN,arch)__ netboot=__GETNODEATTR($$CN,netboot)__ diff --git a/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_sync_mode b/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_sync_mode index 204826de1..a09faa03a 100644 --- a/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_sync_mode +++ b/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_sync_mode @@ -1,5 +1,6 @@ start:set_xcatmaster_in_sn_pool_tftp_sync_mode description: this case is to test when compute nodes' xcatmaster is set in service node pool environment,compute node's provision files are correctly set after nodeset. +label:others,invoke_provision,sn_pool cmd:fdisk -l cmd:df -T #cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_mount_mode b/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_mount_mode index 5a2c2520f..0441e3e9c 100644 --- a/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_mount_mode +++ b/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_mount_mode @@ -1,5 +1,6 @@ start:setup_sn_pool_tftp_mount_mode description: this case is to test when sharedtftp=1 and installloc=/install are set on mn, after all service nodes are installed, /tftpboot and /install directory on all service nodes are mounted.Since test framework only support 1 sn and 1 cn parameter. This case will install CN as another service node. +label:others,invoke_provision,sn_pool cmd:fdisk -l cmd:df -T #cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_sync_mode b/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_sync_mode index 3f088945f..7030f3f79 100644 --- a/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_sync_mode +++ b/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_sync_mode @@ -1,5 +1,6 @@ start:setup_sn_pool_tftp_sync_mode description: this case is to test when sharedtftp=0 and installloc=/install are not set on mn, after all service nodes are installed, /tftpboot and /install directory on all service nodes are separated and need to be rsynced. Since test framework only support 1 sn and 1 cn parameter. This case will install CN as another service node. +label:others,invoke_provision,sn_pool cmd:fdisk -l cmd:df -T #cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/switchdiscover/cases0 b/xCAT-test/autotest/testcase/switchdiscover/cases0 index 1009f74b3..b1a35926c 100644 --- a/xCAT-test/autotest/testcase/switchdiscover/cases0 +++ b/xCAT-test/autotest/testcase/switchdiscover/cases0 @@ -1,4 +1,5 @@ start:switchdiscover_h +label:others,discovery,Swtich os:Linux decription:help cmd:switchdiscover -h @@ -6,12 +7,14 @@ check:rc==0 check:output=~Usage end start:switchdiscover_range_default +label:others,discovery,Swtich cmd:switchdiscover --range $$range check:rc==0 check:output=~Discovering switches using nmap check:output=~switch end start:switchdiscover_range_default_w +label:others,discovery,Swtich cmd:lsdef -l switch -z >/tmp/switch.standa cmd:rmdef switch cmd:switchdiscover --range $$range -w @@ -29,12 +32,14 @@ cmd:rm -rf /tmp/switch.standa check:rc==0 end start:switchdiscover_range_s +label:others,discovery,Swtich cmd:switchdiscover --range $$range -s nmap check:rc==0 check:output=~Discovering switches using nmap check:output=~switch end start:switchdiscover_range_r +label:others,discovery,Swtich cmd:switchdiscover --range $$range -r check:rc==0 check:output=~Discovering switches using nmap @@ -47,6 +52,7 @@ check:output=~/usr/bin/nmap -s(n|P) -oX - $$range cmd:rm -rf switchdiscover_range_r.log end start:switchdiscover_range_x +label:others,discovery,Swtich cmd:switchdiscover --range $$range -x check:rc==0 check:output=~Discovering switches using nmap @@ -54,6 +60,7 @@ check:output=~ check:output=~switch end start:switchdiscover_range_z +label:others,discovery,Swtich cmd:switchdiscover --range $$range -z check:rc==0 check:output=~Discovering switches using nmap @@ -62,6 +69,7 @@ check:output=~groups=switch end start:switchdiscover_range_z_V +label:others,discovery,Swtich cmd:switchdiscover --range $$range -z -V check:rc==0 check:output=~Discovering switches using nmap diff --git a/xCAT-test/autotest/testcase/sysclone/cases0 b/xCAT-test/autotest/testcase/sysclone/cases0 index b18002ed1..5586768ba 100644 --- a/xCAT-test/autotest/testcase/sysclone/cases0 +++ b/xCAT-test/autotest/testcase/sysclone/cases0 @@ -1,4 +1,5 @@ start:sysclone +label:others,invoke_provision,sysclone cmd:makedns -n check:rc==0 cmd:makedhcp -n diff --git a/xCAT-test/autotest/testcase/testenv/case0 b/xCAT-test/autotest/testcase/testenv/case0 index f78099826..5a3e5d7dd 100644 --- a/xCAT-test/autotest/testcase/testenv/case0 +++ b/xCAT-test/autotest/testcase/testenv/case0 @@ -1,5 +1,6 @@ start:clean_up_env description:power off service node and compute node for next test usage +label:others cmd:rpower $$CN stat >> /tmp/cnstat cmd:if [[ ! `cat /tmp/cnstat |grep -i "Not Activated"` ]]; then rpower $$CN off;fi check:rc==0 diff --git a/xCAT-test/autotest/testcase/updatenode/cases0 b/xCAT-test/autotest/testcase/updatenode/cases0 index 44cb35ec3..fef099f08 100644 --- a/xCAT-test/autotest/testcase/updatenode/cases0 +++ b/xCAT-test/autotest/testcase/updatenode/cases0 @@ -1,15 +1,18 @@ start:updatenode_h +label:others,updatenode cmd:updatenode -h check:rc==0 end start:updatenode_v +label:others,updatenode cmd:updatenode -v check:rc==0 check:output=~Version end start:updatenode_diskful_syncfiles +label:others,updatenode cmd:mkdir -p /install/custom/install/__GETNODEATTR($$CN,os)__/ check:rc==0 cmd:echo "/etc/hosts -> /etc/hosts" > /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist @@ -38,6 +41,7 @@ check:rc==0 end start:updatenode_diskful_syncfiles_rename +label:others,updatenode cmd:mkdir -p /tmp/syncfile/ check:rc==0 cmd:echo "test1" > /tmp/syncfile/test1.txt @@ -68,6 +72,7 @@ end start:updatenode_diskful_syncfiles_dir +label:others,updatenode cmd:mkdir -p /tmp/sync/ check:rc==0 cmd:echo "test1" > /tmp/sync/test1.txt @@ -97,6 +102,7 @@ end start:updatenode_diskful_syncfiles_multi_files +label:others,updatenode cmd:cp /etc/hosts /etc/common_hosts cmd:mkdir /tmp/prog1 cmd:mkdir /tmp/prog2 @@ -151,6 +157,7 @@ cmd:rm /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist end start:updatenode_syncfile_EXECUTE +label:others,updatenode cmd:echo "echo hello > /tmp/test" > /tmp/file.post check:rc==0 cmd:chmod a+x /tmp/file.post @@ -171,6 +178,7 @@ check:rc==0 end start:updatenode_syncfile_EXECUTEALWAYS +label:others,updatenode cmd:echo "echo hello >> /tmp/test" > /tmp/file.post check:rc==0 cmd:chmod a+x /tmp/file.post @@ -191,6 +199,7 @@ check:rc==0 end start:updatenode_syncfile_APPEND +label:others,updatenode cmd:echo "line1" > /tmp/append1 cmd:echo "line2" > /tmp/append2 cmd:scp /tmp/append1 root@$$CN:/tmp @@ -211,6 +220,7 @@ check:rc==0 end start:updatenode_syncfile_MERGE +label:others,updatenode cmd:mkdir -p /tmp/updatenode_syncfile_MERGE check:rc==0 cmd:xdsh $$CN "mkdir -p /tmp/updatenode_syncfile_MERGE" @@ -266,6 +276,7 @@ check:rc==0 end start:updatenode_P_script1 +label:others,updatenode cmd:echo "echo hello > /tmp/updatenode_P_script" > /tmp/script1 check:rc==0 cmd:chmod a+x /tmp/script1 @@ -289,6 +300,7 @@ check:rc==0 end start:updatenode_P_script2 +label:others,updatenode cmd:echo "#!/bin/bash" > /tmp/updatenode_P_script_input cmd:echo "if [ -n \$1 ]" >> /tmp/updatenode_P_script_input cmd:echo "then" >> /tmp/updatenode_P_script_input @@ -324,6 +336,7 @@ check:rc==0 end start:updatenode_f_incompatible_flags +label:others,updatenode description:check if -f flag incompatible with -S,-P or -F flags cmd:updatenode $$CN -f -S check:rc==1 @@ -337,6 +350,7 @@ check:output=~Choose either -f to sync the service nodes, or -F to sync the nod end start:updatenode_k_incompatible_flags +label:others,updatenode description:check if -k flag incompatible with -S,-P,-F or -f flags cmd:updatenode $$CN -k -S check:rc==1 @@ -353,6 +367,7 @@ check:output=~If you use the -k flag, you cannot specify the -S,-P,-f or -F flag end start:updatenode_diskful_syncfiles_P_script1 +label:others,updatenode description:check updatenode noderange -F -P script1 cmd:mkdir -p /install/custom/install/__GETNODEATTR($$CN,os)__/ check:rc==0 @@ -398,6 +413,7 @@ cmd:rm -f /install/script1 end start:updatenode_script3 +label:others,updatenode description:check updatenode noderange -P "script c" cmd:echo "#!/bin/bash" > /tmp/updatenode_P_script_input cmd:echo "if [ -n \$1 ]" >> /tmp/updatenode_P_script_input @@ -426,6 +442,7 @@ check:rc==0 end start:updatenode_P_script1_script2 +label:others,updatenode description:check updatenode noderange -P "script1 a,script2 b" cmd:echo "#!/bin/bash" > /tmp/updatenode_P1_script_input cmd:echo "if [ -n \$1 ];then" >> /tmp/updatenode_P1_script_input @@ -468,6 +485,7 @@ cmd:rm /install/postscripts/updatenode_P*_script_input end start:updatenode_without_flag +label:others,updatenode description:check updatenode without any flag cmd:updatenode $$CN check:rc==0 @@ -478,6 +496,7 @@ check:output=~Software Maintenance has completed end start:updatenode_P_syslog_V_xcatdebugmode_is_one +label:others,updatenode description:xcatdebugmode value is one, there should be execution outputs. cmd:chtab key=xcatdebugmode site.value=1 check:rc==0 @@ -488,6 +507,7 @@ check:rc==0 end start:updatenode_P_syslog_V_xcatdebugmode_is_two +label:others,updatenode description:xcatdebugmode value is two, there should be execution outputs. cmd:chtab key=xcatdebugmode site.value=2 check:rc==0 diff --git a/xCAT-test/autotest/testcase/updatenode/cases1 b/xCAT-test/autotest/testcase/updatenode/cases1 index 9b7685dc5..1f89bb71e 100644 --- a/xCAT-test/autotest/testcase/updatenode/cases1 +++ b/xCAT-test/autotest/testcase/updatenode/cases1 @@ -1,4 +1,5 @@ start:updatenode_scripts +label:others,updatenode cmd:mkdir -p /install/postscripts check:rc==0 cmd:echo "#!/bin/bash" >/install/postscripts/blah @@ -14,6 +15,7 @@ check:rc==0 end start:updatenode_scripts_timeout +label:others,updatenode cmd:mkdir -p /install/postscripts check:rc==0 cmd:echo "#!/bin/bash" >/install/postscripts/blah diff --git a/xCAT-test/autotest/testcase/updatenode/cases2 b/xCAT-test/autotest/testcase/updatenode/cases2 index 6a02c9372..7d392ab91 100644 --- a/xCAT-test/autotest/testcase/updatenode/cases2 +++ b/xCAT-test/autotest/testcase/updatenode/cases2 @@ -1,10 +1,12 @@ start:updatenode_S +label:others,updatenode cmd:updatenode $$CN -S >/tmp/updatenode.S.out cmd:grep 'Running of Software Maintenance has completed' /tmp/updatenode.S.out check:rc==0 end start:updatenode_S_gcc +label:others,updatenode cmd:lsdef $$CN -i provmethod | tail -n 1 | cut -d= -f2 | xargs lsdef -t osimage -i pkglist | tail -n 1 | cut -d= -f2 >/tmp/pkglist.filename cmd:mv `cat /tmp/pkglist.filename` `cat /tmp/pkglist.filename`.save cmd:cp `cat /tmp/pkglist.filename`.save `cat /tmp/pkglist.filename` diff --git a/xCAT-test/autotest/testcase/updatenode/cases3 b/xCAT-test/autotest/testcase/updatenode/cases3 index 6c0a50143..7b43d3d96 100644 --- a/xCAT-test/autotest/testcase/updatenode/cases3 +++ b/xCAT-test/autotest/testcase/updatenode/cases3 @@ -1,5 +1,6 @@ start:updatenode_diskful_syncfiles_failing description: Test exit code when syncfiles failing. +label:others,updatenode cmd:mkdir -p /install/custom/install/__GETNODEATTR($$CN,os)__/ check:rc==0 cmd:echo "/tmp/non-existent -> /etc/motd" > /install/custom/install/__GETNODEATTR($$CN,os)__/booboo.synclist diff --git a/xCAT-test/autotest/testcase/updatenode/cases4 b/xCAT-test/autotest/testcase/updatenode/cases4 index bf849b45c..b61ebdb6f 100644 --- a/xCAT-test/autotest/testcase/updatenode/cases4 +++ b/xCAT-test/autotest/testcase/updatenode/cases4 @@ -1,11 +1,13 @@ start:updatenode_syncfiles description: Test cases for the syncfiles feature +label:others,updatenode cmd:/opt/xcat/share/xcat/tools/autotest/testcase/updatenode/syncfiles $$CN check:rc==0 end start:updatenode_syncfiles_scp description: Test cases for the syncfiles feature with scp +label:others,updatenode cmd:/opt/xcat/share/xcat/tools/autotest/testcase/updatenode/syncfiles $$CN scp check:rc==0 end diff --git a/xCAT-test/autotest/testcase/updatenode/filesyncing_hierarchy_case b/xCAT-test/autotest/testcase/updatenode/filesyncing_hierarchy_case index 92a69c30f..826e41c85 100644 --- a/xCAT-test/autotest/testcase/updatenode/filesyncing_hierarchy_case +++ b/xCAT-test/autotest/testcase/updatenode/filesyncing_hierarchy_case @@ -1,5 +1,6 @@ start:updatenode_f_F_hierarchy description: verify the behavior of updatenode -f/-F in the hierarchy environment-- (1)the different kind of synclist entries including destination nodes (2)make sure the location of directory to hold the files/dirs to sync on SN is correct (3)check the result of updatenode -f/-F +label:others,updatenode #create environment files to hold variables accross the case cmd: MYENVFILE="/tmp/updatenode_f_F_hierarchy.envs"; rm -rf $MYENVFILE; echo "MYENVFILE=\"$MYENVFILE\"">> $MYENVFILE; chmod +x $MYENVFILE diff --git a/xCAT-test/autotest/testcase/xcatdebugmode/rhels_xcatdebugmode_diskful b/xCAT-test/autotest/testcase/xcatdebugmode/rhels_xcatdebugmode_diskful index b7bff8f0b..a73c52cf5 100644 --- a/xCAT-test/autotest/testcase/xcatdebugmode/rhels_xcatdebugmode_diskful +++ b/xCAT-test/autotest/testcase/xcatdebugmode/rhels_xcatdebugmode_diskful @@ -1,6 +1,7 @@ start:reg_set_xcatdebugmode_off_rhels_diskful_flat os:linux description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provison,xcatdebugmode cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 @@ -57,6 +58,7 @@ end start:reg_set_xcatdebugmode_value_one_rhels_diskful_flat os:linux description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provison,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 @@ -144,6 +146,7 @@ end start:reg_set_xcatdebugmode_value_two_rhels_diskful_flat os:linux description:site.xcatdebugmode value is 2, , the following logs will be shown and ssh is supported. +label:flat_cn_diskful,invoke_provison,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 @@ -231,6 +234,7 @@ end start:set_xcatdebugmode_off_rhels_diskful_flat_p8_le os:Linux description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provison,xcatdebugmode cmd:chtab key=xcatdebugmode site.value="0" check:rc==0 @@ -283,6 +287,7 @@ end start:set_xcatdebugmode_value_one_rhels_diskful_flat_p8_le os:Linux description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provison,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 @@ -372,6 +377,7 @@ end start:set_xcatdebugmode_value_two_rhels_diskful_flat_p8_le os:Linux description:site.xcatdebugmode value is 2, the following logs will be shown and ssh is supported. +label:flat_cn_diskful,invoke_provison,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 diff --git a/xCAT-test/autotest/testcase/xcatdebugmode/sles_xcatdebugmode_diskful b/xCAT-test/autotest/testcase/xcatdebugmode/sles_xcatdebugmode_diskful index 4191e6c51..71eb112e9 100644 --- a/xCAT-test/autotest/testcase/xcatdebugmode/sles_xcatdebugmode_diskful +++ b/xCAT-test/autotest/testcase/xcatdebugmode/sles_xcatdebugmode_diskful @@ -1,6 +1,7 @@ start:reg_set_xcatdebugmode_off_sles_diskful_flat os:linux description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provison,xcatdebugmode cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN @@ -67,6 +68,7 @@ end start:reg_set_xcatdebugmode_value_one_sles_diskful_flat os:linux description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provison,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 @@ -160,6 +162,7 @@ end start:set_xcatdebugmode_off_sles_diskful_flat_p8_le os:linux description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provison,xcatdebugmode cmd:chtab key=xcatdebugmode site.value="0" check:rc==0 @@ -221,6 +224,7 @@ end start:set_xcatdebugmode_value_one_sles_diskful_flat_p8_le os:linux description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provison,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 diff --git a/xCAT-test/autotest/testcase/xcatdebugmode/ubuntu_xcatdebugmode_diskful b/xCAT-test/autotest/testcase/xcatdebugmode/ubuntu_xcatdebugmode_diskful index bef44b866..e55e7b381 100644 --- a/xCAT-test/autotest/testcase/xcatdebugmode/ubuntu_xcatdebugmode_diskful +++ b/xCAT-test/autotest/testcase/xcatdebugmode/ubuntu_xcatdebugmode_diskful @@ -1,6 +1,7 @@ start:set_xcatdebugmode_off_ubuntule_diskful os:linux description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provison,xcatdebugmode cmd:chtab key=xcatdebugmode site.value="0" check:rc==0 cmd:copycds $$ISO @@ -44,6 +45,7 @@ end start:set_xcatdebugmode_off_ubuntux_vm_diskful os:linux description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provison,xcatdebugmode cmd:makedns -n check:rc==0 cmd:sleep 60 @@ -86,6 +88,7 @@ end start:set_xcatdebugmode_value_one_ubuntule_diskful os:linux description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provison,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 cmd:chtab key=xcatdebugmode site.value="1" @@ -157,6 +160,7 @@ end start:set_xcatdebugmode_value_one_ubuntux_vm_diskful os:linux description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provison,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 diff --git a/xCAT-test/autotest/testcase/xdshbak/cases0 b/xCAT-test/autotest/testcase/xdshbak/cases0 index d956d6d86..2765c6811 100644 --- a/xCAT-test/autotest/testcase/xdshbak/cases0 +++ b/xCAT-test/autotest/testcase/xdshbak/cases0 @@ -1,26 +1,31 @@ start:xdshbak_h +label:other,parallel_cmds cmd:xdshbak -h check:rc==0 check:output=~Usage end start:xdshbak_display +label:other,parallel_cmds cmd:xdsh $$CN cat /etc/hosts | xdshbak check:rc==0 check:output=~HOST:$$CN end start:xdshbak_c +label:other,parallel_cmds cmd:xdsh $$CN pwd |xdshbak -c check:rc==0 end start:xdshbak_q +label:other,parallel_cmds cmd:xdsh $$CN ls / |xdshbak -q check:rc==0 end start:xdshbak_x +label:other,parallel_cmds cmd:xdsh $$CN cat /etc/passwd|xdshbak -c check:rc==0 end From 342b7eab338d08c358dbbd988c5ee00e563b27ea Mon Sep 17 00:00:00 2001 From: litingt Date: Sun, 4 Nov 2018 23:41:03 -0500 Subject: [PATCH 044/121] update cases label --- xCAT-test/autotest/testcase/copycds/cases0 | 19 ++++++++++++++++++ .../autotest/testcase/dockercommand/cases0 | 1 + xCAT-test/autotest/testcase/ngpfb/cases0 | 2 +- xCAT-test/autotest/testcase/nodeset/cases0 | 20 +++++++++++++++++++ xCAT-test/autotest/testcase/pdu/case0 | 3 ++- .../autotest/testcase/runcmdinstaller/cases0 | 6 ++++-- 6 files changed, 47 insertions(+), 4 deletions(-) diff --git a/xCAT-test/autotest/testcase/copycds/cases0 b/xCAT-test/autotest/testcase/copycds/cases0 index 7f2632131..b1d796fd5 100644 --- a/xCAT-test/autotest/testcase/copycds/cases0 +++ b/xCAT-test/autotest/testcase/copycds/cases0 @@ -1,5 +1,6 @@ start:copycds_iso os:Linux +label:others cmd:rm -rf /install/__GETNODEATTR($$CN,os)__ #cmd:umount /mnt/xcat cmd:copycds $$ISO @@ -11,6 +12,7 @@ check:rc==0 end start:lskmodules_o +label:others cmd:lskmodules -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__ check:rc==0 check:output=~.ko(.xz): @@ -19,6 +21,7 @@ end start:copycds_n os:Linux +label:others #cmd:umount /mnt/xca cmd:rm -rf /install/__GETNODEATTR($$CN,os)__ cmd:copycds -n __GETNODEATTR($$CN,os)__ $$ISO @@ -33,6 +36,7 @@ end start:copycds_a os:Linux +label:others #cmd:umount /mnt/xcat cmd:copycds -a __GETNODEATTR($$CN,arch)__ $$ISO check:rc==0 @@ -44,6 +48,7 @@ end start:copycds_n_a os:Linux +label:others #cmd:umount /mnt/xcat cmd:copycds -n __GETNODEATTR($$CN,os)__ -a __GETNODEATTR($$CN,arch)__ $$ISO check:rc==0 @@ -55,6 +60,7 @@ end start:copycds_a_err os:Linux +label:others #cmd:umount /mnt/xcat cmd:copycds -a 386 $$ISO check:output=~Error @@ -62,6 +68,7 @@ end start:copycds_n_err os:Linux +label:others #cmd:umount /mnt/xcat cmd:copycds -n aix $$ISO check:rc!=0 @@ -70,6 +77,7 @@ end start:copycds_p os:Linux +label:others #cmd:umount /mnt/xcat cmd:mkdir -p /install/tmp cmd:copycds -p /install/tmp $$ISO @@ -84,6 +92,7 @@ end start:copycds_path os:Linux +label:others #cmd:umount /mnt/xcat cmd:mkdir -p /install/tmp cmd:copycds --path /install/tmp $$ISO @@ -99,6 +108,7 @@ end start:copycds_i os:Linux +label:others cmd:copycds -i $$ISO check:rc==0 check:output=~OS Image:$$ISO @@ -109,6 +119,7 @@ end start:copycds_inspection os:Linux +label:others cmd:copycds --inspection $$ISO check:rc==0 check:output=~OS Image:$$ISO @@ -119,6 +130,7 @@ end start:copycds_o os:Linux +label:others cmd:copycds -o $$ISO check:rc==0 check:output=~Copying media to /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__ @@ -129,6 +141,7 @@ end start:copycds_noosimage os:Linux +label:others cmd:copycds --noosimage $$ISO check:rc==0 check:output=~Copying media to /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__ @@ -139,6 +152,7 @@ end start:copycds_w os:Linux +label:others cmd:copycds $$ISO check:rc==0 cmd:copycds -w $$ISO @@ -149,6 +163,7 @@ end start:copycds_w2 os:Linux +label:others cmd:rm -rf /install/__GETNODEATTR($$CN,os)__ check:rc==0 cmd:copycds -w $$ISO @@ -159,6 +174,7 @@ end start:copycds_nonoverwrite os:Linux +label:others cmd:copycds $$ISO check:rc==0 cmd:copycds --nonoverwrite $$ISO @@ -168,6 +184,7 @@ end start:copycds_nonoverwrite2 os:Linux +label:others cmd:rm -rf /install/__GETNODEATTR($$CN,os)__ check:rc==0 cmd:copycds --nonoverwrite $$ISO @@ -178,6 +195,7 @@ end start:copycds_p_newdir os:Linux +label:others cmd:if [ -e /install/newdir ];then mv /install/newdir /install/newdirbak; fi cmd:copycds $$ISO -p /install/newdir check:rc==0 @@ -191,6 +209,7 @@ end start:copycds_p_noninstalldir os:Linux +label:others cmd:if [ -e /noninstalldir ];then mv /noninstalldir /noninstaldirbak; fi cmd:copycds $$ISO -p /noninstalldir check:rc==0 diff --git a/xCAT-test/autotest/testcase/dockercommand/cases0 b/xCAT-test/autotest/testcase/dockercommand/cases0 index c1cb737be..3446a4ca2 100644 --- a/xCAT-test/autotest/testcase/dockercommand/cases0 +++ b/xCAT-test/autotest/testcase/dockercommand/cases0 @@ -118,6 +118,7 @@ end start:rpower_pause_docker decription:pause all processes in the instance +label:others,docker cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker check:rc==0 cmd:makehosts $$DOCKERCN diff --git a/xCAT-test/autotest/testcase/ngpfb/cases0 b/xCAT-test/autotest/testcase/ngpfb/cases0 index d7e811de0..6ef0c8dcf 100644 --- a/xCAT-test/autotest/testcase/ngpfb/cases0 +++ b/xCAT-test/autotest/testcase/ngpfb/cases0 @@ -48,7 +48,7 @@ check:rc==0 end start:rspconfig_network - +label:others,hctrl_fsp cmd:rspconfig $$CN network=* check:rc==0 check:output=~OK diff --git a/xCAT-test/autotest/testcase/nodeset/cases0 b/xCAT-test/autotest/testcase/nodeset/cases0 index f4fc5b5ed..6080691da 100644 --- a/xCAT-test/autotest/testcase/nodeset/cases0 +++ b/xCAT-test/autotest/testcase/nodeset/cases0 @@ -1,5 +1,6 @@ start:nodeset_stat os:Linux +label:others cmd:nodeset $$CN stat check:rc==0 check:output=~$$CN:\s+[discover|boot|reboot|install|netboot|shell|standby] @@ -10,6 +11,7 @@ end start:nodeset_noderange os:Linux +label:others cmd:nodeset $$CN test check:rc!=0 check:output=~Error @@ -17,6 +19,7 @@ end start:nodeset_check_yaboot_no os:rhels +label:others cmd:mkdef -t node -o testnode1 arch=ppc64 cons=hmc groups=lpar hcp=hmc1 hwtype=lpar id=1 ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=hmc monserver=10.1.1.1 nameservers=10.1.1.1 nodetype=ppc,osi parent=fsp1 pprofile=testnode1 profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 check:rc==0 cmd:chdef testnode1 os=rhels7.5 netboot=yaboot @@ -33,6 +36,7 @@ end start:nodeset_check_yaboot_yes os:rhels +label:others cmd:mkdef -t node -o testnode1 arch=ppc64 cons=hmc groups=lpar hcp=hmc1 hwtype=lpar id=1 ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=hmc monserver=10.1.1.1 nameservers=10.1.1.1 nodetype=ppc,osi parent=fsp1 pprofile=testnode1 profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 check:rc==0 cmd:chdef testnode1 os=rhels5.5 netboot=yaboot @@ -49,6 +53,7 @@ end start:nodeset_check_grub2_yes os:rhels +label:others cmd:mkdef -t node -o testnode1 arch=ppc64 cons=hmc groups=lpar hcp=hmc1 hwtype=lpar id=1 ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=hmc monserver=10.1.1.1 nameservers=10.1.1.1 nodetype=ppc,osi parent=fsp1 pprofile=testnode1 profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 check:rc==0 cmd:chdef testnode1 os=rhels7.5 netboot=grub2 @@ -64,6 +69,7 @@ end start:nodeset_check_grub2_no os:rhels +label:others cmd:mkdef -t node -o testnode1 arch=ppc64 cons=hmc groups=lpar hcp=hmc1 hwtype=lpar id=1 ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=hmc monserver=10.1.1.1 nameservers=10.1.1.1 nodetype=ppc,osi parent=fsp1 pprofile=testnode1 profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 check:rc==0 cmd:chdef testnode1 os=rhels6.8 netboot=grub2 @@ -80,6 +86,7 @@ end start:nodeset_check_grub2_ubuntu os:ubuntu +label:others cmd:mkdef -t node -o testnode1 arch=x86_64 cons=kvm groups=kvm ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=kvm monserver=10.1.1.1 nameservers=10.1.1.1 profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 check:rc==0 cmd:chdef testnode1 os=ubuntu14.04.5 netboot=grub2 @@ -96,6 +103,7 @@ end start:nodeset_check_grub2_sles11 os:sles +label:others cmd:mkdef -t node -o testnode1 arch=ppc64 cons=hmc groups=lpar hcp=hmc1 hwtype=lpar id=1 ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=hmc monserver=10.1.1.1 nameservers=10.1.1.1 nodetype=ppc,osi parent=fsp1 pprofile=testnode1 profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 check:rc==0 cmd:chdef testnode1 os=sles11.4 netboot=grub2 @@ -111,6 +119,7 @@ end start:nodeset_check_yaboot_sles11 os:sles +label:others cmd:mkdef -t node -o testnode1 arch=ppc64 cons=hmc groups=lpar hcp=hmc1 hwtype=lpar id=1 ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=hmc monserver=10.1.1.1 nameservers=10.1.1.1 nodetype=ppc,osi parent=fsp1 pprofile=testnode1 profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 check:rc==0 cmd:chdef testnode1 os=sles11.4 netboot=yaboot @@ -126,6 +135,7 @@ end start:nodeset_check_grub2_sles12 os:sles +label:others cmd:mkdef -t node -o testnode1 arch=ppc64el cons=kvm groups=kvm ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=kvm monserver=10.1.1.1 nameservers=10.1.1.1 1 profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 check:rc==0 cmd:chdef testnode1 os=sles12 netboot=grub2 @@ -141,6 +151,7 @@ end start:nodeset_check_yaboot_sles12 os:sles +label:others cmd:mkdef -t node -o testnode1 arch=ppc64el cons=kvm groups=kvm ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=kvm monserver=10.1.1.1 nameservers=10.1.1.1 1 profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 check:rc==0 cmd:chdef testnode1 os=sles12 netboot=yaboot @@ -156,6 +167,7 @@ end start:nodeset_check_petitboot os:rhels +label:others cmd:mkdef -t node -o testnode1 arch=ppc64el cons=ipmi groups=pbmc mgt=ipmi ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 monserver=10.1.1.1 nameservers=10.1.1.1 nodetype=ppc,osi profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 check:rc==0 cmd:chdef testnode1 os=rhels7.5 netboot=petitboot @@ -169,6 +181,7 @@ cmd:noderm testnode1 end start:nodeset_check_warninginfo +label:others cmd:if [[ "__GETNODEATTR($$CN,arch)__" =~ "el" || "__GETNODEATTR($$CN,arch)__" =~ "le" ]]; then bootloader=xnba; else bootloader=petitboot; fi; mkdef -t node -o testnode1 arch=ppc64el cons=ipmi groups=pbmc mgt=ipmi ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 monserver=10.1.1.1 nameservers=10.1.1.1 nodetype=ppc,osi profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 netboot=$bootloader check:rc==0 cmd:lsdef testnode1 @@ -179,6 +192,7 @@ end start:nodeset_xnba description: Verify when xnba is used for OS loader, whether the configuration files under /tftpboot can be generated corrently +label:others cmd:rmdef testnode1 cmd:rm -f /tftpboot/xcat/xnba/nodes/testnode1 /tftpboot/xcat/xnba/nodes/testnode1.elilo cmd:mkdef -t node -o testnode1 arch=x86_64 cons=kvm groups=kvm ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=kvm profile=compute os=rhels6.99 @@ -220,6 +234,7 @@ end start:nodeset_grub2 description: Verify when grub2 is used for OS loader, whether the configuration files under /tftpboot can be generated corrently +label:others cmd:rmdef testnode1 cmd:rm -f /tftpboot/boot/grub2/{testnode1,grub.cfg-{01-e6-d4-d2-3a-ad-06,0[aA]0101[cC]8}} cmd:mkdef -t node -o testnode1 arch=ppc64 cons=hmc groups=lpar ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=hmc profile=compute os=rhels7.99 @@ -264,6 +279,7 @@ end start:nodeset_petitboot description: Verify when petitboot is used for OS loader, whether the configuration files under /tftpboot can be generated corrently +label:others cmd:rmdef testnode1 cmd:rm -f /tftpboot/petitboot/testnode1 cmd:mkdef -t node -o testnode1 arch=ppc64le cons=bmc groups=ipmi ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=ipmi profile=compute os=rhels7.99 @@ -305,6 +321,7 @@ end start:nodeset_yaboot description: Verify when yaboot is used for OS loader, whether the configuration files under /tftpboot can be generated corrently +label:others cmd:rmdef testnode1 cmd:rm -f /tftpboot/yaboot.conf-e6-d4-d2-3a-ad-06 cmd:mkdef -t node -o testnode1 arch=ppc64 cons=hmc groups=lpar ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=hmc profile=compute os=rhels6.99 @@ -346,6 +363,7 @@ end start:nodeset_errorcommand description:This testcase is to very nodeset osimage errorcommand could give right output +label:others Attribute: $$CN-The operation object of nodeset command cmd:nodeset $$CN osimage= __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute check:rc==1 @@ -355,6 +373,7 @@ end start:nodeset_disjointdhcps_petitboot description: Verify the disjointdhcps feature when petitboot is used for OS loader. +label:others cmd:rmdef testnode1 cmd:rm -f /tftpboot/petitboot/testnode1 cmd:mkdef -t node -o testnode1 arch=ppc64le cons=bmc groups=ipmi ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=ipmi profile=compute os=rhels7.99 @@ -454,6 +473,7 @@ end start:nodeset_switch_osimage description: This case is to verify if xcat supports nodeset osimage command for cumulus switch. This case is for bug 5126. os:Linux +label:others cmd:copycds $$CUMULUSOS |tee /tmp/cumulusimage check:rc==0 cmd:grep "The image" /tmp/cumulusimage |sed -r 's/.*\image(.*)\is.*/\1/' |tee /tmp/imagename diff --git a/xCAT-test/autotest/testcase/pdu/case0 b/xCAT-test/autotest/testcase/pdu/case0 index 16a8dd14d..952021ef8 100644 --- a/xCAT-test/autotest/testcase/pdu/case0 +++ b/xCAT-test/autotest/testcase/pdu/case0 @@ -1,5 +1,6 @@ start:lsdef_pdu_object -degscription:list pdu object and it's attribute +description:list pdu object and it's attribute +label:others cmd:lsdef -h check:output=~pdu cmd:mkdef $$PDU mgt=pdu nodetype=pdu groups=pdu diff --git a/xCAT-test/autotest/testcase/runcmdinstaller/cases0 b/xCAT-test/autotest/testcase/runcmdinstaller/cases0 index 8adefa9b1..d81df8c25 100644 --- a/xCAT-test/autotest/testcase/runcmdinstaller/cases0 +++ b/xCAT-test/autotest/testcase/runcmdinstaller/cases0 @@ -1,11 +1,13 @@ start:runcmdinstaller_h -descriptiop:runcmdinstaller -h +description:runcmdinstaller -h +label:others,postscripts cmd:runcmdinstaller -h check:rc==0 check:output=~runcmdinstaller end start:runcmdinstaller_command -descriptiop:runcmdinstaller +description:runcmdinstaller +label:others,postscripts cmd:chtab key=xcatdebugmode site.value="2" check:rc==0 cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute From 1eae3b5b2864d43033e8951fdb299722d465d11e Mon Sep 17 00:00:00 2001 From: yangsbj Date: Sun, 4 Nov 2018 23:41:34 -0500 Subject: [PATCH 045/121] remove temporary cases --- .../installation/change_apache_listen_port | 26 ------------------- .../testcase/installation/change_http_port.sh | 24 ----------------- 2 files changed, 50 deletions(-) delete mode 100644 xCAT-test/autotest/testcase/installation/change_apache_listen_port delete mode 100755 xCAT-test/autotest/testcase/installation/change_http_port.sh diff --git a/xCAT-test/autotest/testcase/installation/change_apache_listen_port b/xCAT-test/autotest/testcase/installation/change_apache_listen_port deleted file mode 100644 index 996482ef1..000000000 --- a/xCAT-test/autotest/testcase/installation/change_apache_listen_port +++ /dev/null @@ -1,26 +0,0 @@ -start:change_apache_listen_port_flat -cmd:netstat -nlp|grep -E "apache2|httpd" -check:output =~ 80 -cmd:lsdef -t site -i httpport -c |awk -F"=" '{print $2}' -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/installation/change_http_port.sh -cmd:netstat -nlp|grep -E "apache2|httpd" -check:output =~ 8899 -check:rc==0 -cmd:chdef -t site httpport=8899 -check:rc==0 -cmd:lsdef -t site -i httpport -c -check:output =~ 8899 -check:rc==0 -end - -start:change_apache_listen_port_hierarchy -cmd:xdsh $$SN "netstat -nlp|grep -E 'apache2|httpd'" -check:output =~ 80 -cmd:xdsh $$SN "lsdef -t site -i httpport -c |awk -F'=' '{print $2}'" -cmd:scp /opt/xcat/share/xcat/tools/autotest/testcase/installation/change_http_port.sh $$SN:/tmp -cmd:xdsh $$SN "ls -l /tmp/ |grep change_http_port.sh" -cmd:xdsh $$SN "chmod +x /tmp/change_http_port.sh && /tmp/change_http_port.sh" -cmd:xdsh $$SN "netstat -nlp|grep -E 'apache2|httpd' |grep 8899" -check:output =~ 8899 -check:rc==0 -end diff --git a/xCAT-test/autotest/testcase/installation/change_http_port.sh b/xCAT-test/autotest/testcase/installation/change_http_port.sh deleted file mode 100755 index a7f859c38..000000000 --- a/xCAT-test/autotest/testcase/installation/change_http_port.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -if [ -f "/etc/httpd/conf/httpd.conf" ]; then - config="/etc/httpd/conf/httpd.conf" -elif [ -f "/etc/apache2/ports.conf" ]; then - config="/etc/apache2/ports.conf" -elif [ -f "/etc/apache2/listen.conf" ]; then - config="/etc/apache2/listen.conf" -fi -port=`awk -F' ' '/^[Ll]isten / {print $2}' $config` -echo "The original httpd port is $port in $config" - -echo "start to change httpd listen port to 8899" -sed -i "s/^Listen 80/Listen 8899/g" $config -if [ -f "/etc/apache2/sites-enabled/000-default.conf" ]; then - sed -i "s/VirtualHost \*:80/VirtualHost \*:8899/g" /etc/apache2/sites-enabled/000-default.conf - service apache2 stop - sleep 1 - service apache2 start -else - service httpd stop - sleep 1 - service httpd start -fi -exit From 55a8ad96abb3125ba47d143d289c2cf31d755dd2 Mon Sep 17 00:00:00 2001 From: litingt Date: Mon, 5 Nov 2018 01:19:21 -0500 Subject: [PATCH 046/121] update according to comments --- xCAT-test/autotest/testcase/confignics/cases0 | 18 +++++++++--------- xCAT-test/autotest/testcase/genimage/cases0 | 8 ++++---- .../autotest/testcase/makeconservercf/cases0 | 6 +++--- .../autotest/testcase/makeknownhosts/cases0 | 9 +++++---- xCAT-test/autotest/testcase/packimg/cases0 | 6 +++--- xCAT-test/autotest/testcase/passwd/case0 | 16 ++++++++-------- xCAT-test/autotest/testcase/pdu/case0 | 16 ++++++++-------- .../testcase/simulator/clear_simulator | 8 ++++---- 8 files changed, 44 insertions(+), 43 deletions(-) diff --git a/xCAT-test/autotest/testcase/confignics/cases0 b/xCAT-test/autotest/testcase/confignics/cases0 index 173e582ea..029532f12 100644 --- a/xCAT-test/autotest/testcase/confignics/cases0 +++ b/xCAT-test/autotest/testcase/confignics/cases0 @@ -1,6 +1,6 @@ start:confignics_config_one_port_single_value description:confignics -label:others,network,confignics,updatenode +label:others,network,updatenode cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 100_1_0_0-255_255_0_0 net=100.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1501 @@ -20,7 +20,7 @@ end start:confignics_config_multiple_ports_single_value description:confignics -label:others,network,confignics,updatenode +label:others,network,updatenode cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 100_1_0_0-255_255_0_0 net=100.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1501 @@ -51,7 +51,7 @@ end start:confignics_config_multiple_ports_multiple_value description:confignics -label:others,network,confignics,updatenode +label:others,network,updatenode cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1501 @@ -96,7 +96,7 @@ end start:confignics_config_multiple_port_withnichostnamesuffixes_multiple_value description:confignics -label:others,network,confignics,updatenode +label:others,network,updatenode cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1501 @@ -151,7 +151,7 @@ end start:confignics_config_multiple_port_withnicaliases_multiple_value description:confignics -label:others,network,confignics,updatenode +label:others,network,updatenode cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC @@ -205,7 +205,7 @@ end start:confignics_disable_set_to_yes description:confignics -label:others,network,confignics,updatenode +label:others,network,updatenode cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN ifdown $$SECONDNIC @@ -228,7 +228,7 @@ end start:confignics_disable_set_to_1 description:confignics -label:others,network,confignics,updatenode +label:others,network,updatenode cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN ifdown $$SECONDNIC @@ -251,7 +251,7 @@ end start:confignics_s description:confignics_s -label:others,network,confignics,updatenode +label:others,network,updatenode cmd:tabdump networks > /opt/xcat/share/xcat/tools/autotest/testcase/confignics/networks.csv check:rc==0 cmd:/opt/xcat/share/xcat/tools/autotest/testcase/confignics/mtu_set_clean S 1496 @@ -276,7 +276,7 @@ check:rc==0 end start:chdef_nicips description:nicip could be set to null -label:others,network,confignics,updatenode +label:others,network,updatenode Attribute: $$CN-The operation object of chdef command cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 diff --git a/xCAT-test/autotest/testcase/genimage/cases0 b/xCAT-test/autotest/testcase/genimage/cases0 index 559773020..e2b023e6e 100644 --- a/xCAT-test/autotest/testcase/genimage/cases0 +++ b/xCAT-test/autotest/testcase/genimage/cases0 @@ -1,5 +1,5 @@ start:genimage_h -label:others +label:others,image os:Linux cmd:genimage -h check:output=~Usage @@ -7,7 +7,7 @@ check:rc==0 end start:genimage_help -label:others +label:others,image os:Linux cmd:genimage --help check:output=~Usage @@ -15,7 +15,7 @@ check:rc==0 end start:genimage_stateless -label:others +label:others,image os:Linux cmd:copycds $$ISO check:rc==0 @@ -28,7 +28,7 @@ cmd:mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/c end start:genimage_statelite -label:others +label:others,image os:Linux cmd:copycds $$ISO check:rc==0 diff --git a/xCAT-test/autotest/testcase/makeconservercf/cases0 b/xCAT-test/autotest/testcase/makeconservercf/cases0 index 95b9ba502..678aa4947 100644 --- a/xCAT-test/autotest/testcase/makeconservercf/cases0 +++ b/xCAT-test/autotest/testcase/makeconservercf/cases0 @@ -1,5 +1,5 @@ start:makeconservercf_null -label:others,conserver +label:others cmd:chdef -t node -o testnodetmp cons=hmc groups=all cmd:makeconservercf testnodetmp check:rc==0 @@ -11,7 +11,7 @@ cmd:rmdef -t node testnodetmp end start:makeconservercf_noderange -label:others,conserver +label:others cmd:chdef -t node -o testnodetmp cons=hmc groups=all cmd:makeconservercf testnodetmp check:rc==0 @@ -23,7 +23,7 @@ cmd:rmdef -t node testnodetmp end start:makeconservercf_d -label:others,conserver +label:others cmd:chdef -t node -o testnodetmp cons=hmc groups=all cmd:makeconservercf testnodetmp check:rc==0 diff --git a/xCAT-test/autotest/testcase/makeknownhosts/cases0 b/xCAT-test/autotest/testcase/makeknownhosts/cases0 index 69f7bf3ef..7978d7dcc 100644 --- a/xCAT-test/autotest/testcase/makeknownhosts/cases0 +++ b/xCAT-test/autotest/testcase/makeknownhosts/cases0 @@ -1,4 +1,5 @@ start:makeknownhosts_h +label:others,hosts cmd:makeknownhosts -h check:output=~Usage cmd:makeknownhosts --help @@ -7,7 +8,7 @@ end start:makeknownhosts_node description:Make a known_hosts file under $ROOTHOME/.ssh for input noderange -label:others +label:others,hosts cmd:makeknownhosts $$CN -r cmd:makeknownhosts $$CN check:rc==0 @@ -19,7 +20,7 @@ end start:makeknownhosts_node_r description:remove known node in $ROOTHOME/.ssh -label:others +label:others,hosts cmd:makeknownhosts $$CN cmd:cat ~/.ssh/known_hosts|grep $$CN check:output=~$$CN @@ -32,7 +33,7 @@ end start:makeknownhosts_node_d description:delete known node entry from $ROOTHOME/.ssh -label:others +label:others,hosts cmd:makeknownhosts $$CN cmd:cat ~/.ssh/known_hosts|grep $$CN check:output=~$$CN @@ -47,7 +48,7 @@ end start:makeknownhosts_node_v description:verbose -label:others +label:others,hosts cmd:makeknownhosts $$CN -V check:rc==0 check:output=~$$CN diff --git a/xCAT-test/autotest/testcase/packimg/cases0 b/xCAT-test/autotest/testcase/packimg/cases0 index b9f5b1721..a8d51ba00 100644 --- a/xCAT-test/autotest/testcase/packimg/cases0 +++ b/xCAT-test/autotest/testcase/packimg/cases0 @@ -188,7 +188,7 @@ end start:packimage_m_tar_c_pigz os:Linux description:test packimage -m tar -c pigz -label:others,packaging +label:others,packaging,invoke_provision #cmd:copycds $$ISO cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.tar.gz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.tar.gz /rootimg.tar.gz.bak;fi @@ -243,7 +243,7 @@ end start:packimage_m_tar_c_gzip os:Linux description:test packimage -m tar -c gzip -label:others,packaging +label:others,packaging,invoke_provision #cmd:copycds $$ISO cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.tar.gz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.tar.gz /rootimg.tar.gz.bak;fi @@ -294,7 +294,7 @@ end start:packimage_m_tar_c_xz os:Linux description:test packimage -m tar -c xz -label:others,packaging +label:others,packaging,invoke_provision #cmd:copycds $$ISO cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.tar.xz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.tar.xz /rootimg.tar.xz.bak;fi diff --git a/xCAT-test/autotest/testcase/passwd/case0 b/xCAT-test/autotest/testcase/passwd/case0 index 91350e546..8cf5869ec 100644 --- a/xCAT-test/autotest/testcase/passwd/case0 +++ b/xCAT-test/autotest/testcase/passwd/case0 @@ -1,6 +1,6 @@ start:encrypted_passwd_md5_diskfull description: this case is to test when cryptmethod=md5 in passwd table, the password is encryped with the md5 method. When compute node is diskfull provisioned, users can login node with correct password. This case should be run when node is correctly defined. -label:others +label:others,security cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:chtab key=system passwd.cryptmethod=md5 @@ -19,7 +19,7 @@ end start:encrypted_passwd_md5_diskless description: this case is to test when cryptmethod=md5 in passwd table, the password is encryped with the md5 method. When compute node is diskless provisioned, users can login node with correct password. This case should be run when node is correctly defined. -label:others +label:others,security cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:chtab key=system passwd.cryptmethod=md5 @@ -75,7 +75,7 @@ end start:encrypted_passwd_sha256_diskfull description: this case is to test when cryptmethod=sha256 in passwd table, the password is encryped with the sha256 method. When compute node is diskfull provisioned, users can login node with correct password. This case should be run when node is correctly defined. -label:others +label:others,security cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:chtab key=system passwd.cryptmethod=sha256 @@ -94,7 +94,7 @@ end start:encrypted_passwd_sha256_diskless description: this case is to test when cryptmethod=sha256 in passwd table, the password is encryped with the sha256 method. When compute node is diskless provisioned, users can login node with correct password. This case should be run when node is correctly defined. -label:others +label:others,security cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:chtab key=system passwd.cryptmethod=sha256 @@ -150,7 +150,7 @@ end start:encrypted_passwd_sha512_diskfull description: this case is to test when cryptmethod=sha512 in passwd table, the password is encryped with the sha512 method. When compute node is diskfull provisioned, users can login node with correct password. This case should be run when node is correctly defined. -label:others +label:others,security cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:chtab key=system passwd.cryptmethod=sha512 @@ -169,7 +169,7 @@ end start:encrypted_passwd_sha512_diskless description: this case is to test when cryptmethod=sha512 in passwd table, the password is encryped with the sha512 method. When compute node is diskless provisioned, users can login node with correct password. This case should be run when node is correctly defined. -label:others +label:others,security cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:chtab key=system passwd.cryptmethod=sha512 @@ -226,7 +226,7 @@ end start:encrypted_passwd_openssl_diskfull description: this case is to test when password is encrypted with openssl, the password is encryped in password table. When compute node is diskfull provisioned, users can login node with correct password. This case should be run when node is correctly defined. -label:others +label:others,security cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:gettab key=system passwd.password > /tmp/tmppassword @@ -252,7 +252,7 @@ end start:encrypted_passwd_openssl_diskless description: this case is to test when password is encrypted with openssl, the password is encryped in password table. When compute node is diskless provisioned, users can login node with correct password. This case should be run when node is correctly defined. -label:others +label:others,security cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:gettab key=system passwd.password > /tmp/tmppassword diff --git a/xCAT-test/autotest/testcase/pdu/case0 b/xCAT-test/autotest/testcase/pdu/case0 index 952021ef8..a03ff973c 100644 --- a/xCAT-test/autotest/testcase/pdu/case0 +++ b/xCAT-test/autotest/testcase/pdu/case0 @@ -1,6 +1,6 @@ start:lsdef_pdu_object description:list pdu object and it's attribute -label:others +label:others,PDU cmd:lsdef -h check:output=~pdu cmd:mkdef $$PDU mgt=pdu nodetype=pdu groups=pdu @@ -18,7 +18,7 @@ end start:mkdef_pdu_object description:create a pdu object and list it's attribute -label:others +label:others,PDU cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu check:rc==0 cmd:lsdef -t pdu @@ -42,7 +42,7 @@ end start:noderm_pdu_object description:create a pdu object and use noderm to remove it -label:others +label:others,PDU cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu check:rc==0 cmd:lsdef -t pdu @@ -62,7 +62,7 @@ end start:pdu_communication description:Verify a pdu snmp communication -label:others +label:others,PDU cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu check:rc==0 cmd:lsdef -t pdu @@ -81,7 +81,7 @@ end start:pdu_rinv description:Verify rinv works for pdu object -label:others +label:others,PDU cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu check:rc==0 cmd:makehosts $$PDU @@ -99,7 +99,7 @@ end start:pdu_rpower description:Verify rpower works for pdu object -label:others +label:others,PDU cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu check:rc==0 cmd:makehosts $$PDU @@ -129,7 +129,7 @@ end start:pdu_node_operation description:Verify operate node's pdu attribute could operate pdu -label:others +label:others,PDU cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu check:rc==0 cmd:makehosts $$PDU @@ -165,7 +165,7 @@ end start:pdu_bad_config description:test bad config with pdu -label:others +label:others,PDU cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu check:rc==0 cmd:makehosts $$PDU diff --git a/xCAT-test/autotest/testcase/simulator/clear_simulator b/xCAT-test/autotest/testcase/simulator/clear_simulator index e16821451..c1536f178 100644 --- a/xCAT-test/autotest/testcase/simulator/clear_simulator +++ b/xCAT-test/autotest/testcase/simulator/clear_simulator @@ -1,27 +1,27 @@ start:clear_openbmc_simulator description:clear evironment -label:others,hctrl_openbmc +label:others cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -c $$MN $$CN check:rc==0 end start:clear_openbmc_simulator_multiple_100 description:clear evironment that simulate 100 OpenBMCs -label:others,hctrl_openbmc +label:others cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -c $$MN $$CN $$bmcusername $$bmcpasswd 100 check:rc==0 end start:clear_openbmc_simulator_multiple_1000 description:clear evironment that simulate 1000 OpenBMCs -label:others,hctrl_openbmc +label:others cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -c $$MN $$CN $$bmcusername $$bmcpasswd 1000 check:rc==0 end start:clear_openbmc_simulator_multiple_5000 description:clear evironment that simulate 5000 OpenBMCs -label:others,hctrl_openbmc +label:others cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -c $$MN $$CN $$bmcusername $$bmcpasswd 5000 check:rc==0 end From dc8c8632835e0a415869a53c91f01543192d7f2c Mon Sep 17 00:00:00 2001 From: yangsbj Date: Mon, 5 Nov 2018 03:15:37 -0500 Subject: [PATCH 047/121] refine the PR --- xCAT/postscripts/xcatdsklspost | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index 1cfd3a89c..e6651d711 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -226,11 +226,11 @@ parsehttpserver () fi if [ "$option" = "server" ];then - return $server + echo "$server" fi if [ "$option" = "port" ];then - return $port + echo "$port" fi } @@ -251,13 +251,13 @@ else if [ $ARGNUM -gt 1 ]; then if [ $2 = "-m" ]; then P_SVR=$3 - P_SIP=parsehttpserver "$P_SVR" 'server' - HTTPPORT=parsehttpserver "$P_SVR" 'port' + P_SIP=$(parsehttpserver "$P_SVR" 'server') + HTTPPORT=$(parsehttpserver "$P_SVR" 'port') else if [ $2 = "-M" ]; then P_SVR=$3 - P_SIP=parsehttpserver "$P_SVR" 'server' - HTTPPORT=parsehttpserver "$P_SVR" 'port' + P_SIP=$(parsehttpserver "$P_SVR" 'server') + HTTPPORT=$(parsehttpserver "$P_SVR" 'port') new_ms=$P_SIP # -M means we will update xcatinfo file XCATSERVER fi fi @@ -434,8 +434,9 @@ else # for common mode MODE=1,2,3,5 (updatenode,moncfg,node deployment) # also update the XCATSERVER in the /etc/xcat/xcatinfo file with this # address if [ -n "$P_SIP" ]; then # passed in with updatenode on -M/-m - SIP="${P_SIP}:${HTTPPORT}" - download_postscripts $SIP + #SIP="${P_SIP}:${HTTPPORT}" + SIP=${P_SIP} + download_postscripts ${P_SIP}:${HTTPPORT} if [ $? -eq 0 ]; then downloaded=1 fi From c8a952a634c2885fc2c49c615171c80da5a7ec22 Mon Sep 17 00:00:00 2001 From: litingt Date: Mon, 5 Nov 2018 03:24:53 -0500 Subject: [PATCH 048/121] update for ci_tst --- xCAT-test/autotest/testcase/makeconservercf/cases0 | 6 +++--- xCAT-test/autotest/testcase/makeknownhosts/cases0 | 2 +- xCAT-test/autotest/testcase/makenetworks/cases0 | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/xCAT-test/autotest/testcase/makeconservercf/cases0 b/xCAT-test/autotest/testcase/makeconservercf/cases0 index 678aa4947..be7cc21b4 100644 --- a/xCAT-test/autotest/testcase/makeconservercf/cases0 +++ b/xCAT-test/autotest/testcase/makeconservercf/cases0 @@ -1,5 +1,5 @@ start:makeconservercf_null -label:others +label:others,ci_test cmd:chdef -t node -o testnodetmp cons=hmc groups=all cmd:makeconservercf testnodetmp check:rc==0 @@ -11,7 +11,7 @@ cmd:rmdef -t node testnodetmp end start:makeconservercf_noderange -label:others +label:others,ci_test cmd:chdef -t node -o testnodetmp cons=hmc groups=all cmd:makeconservercf testnodetmp check:rc==0 @@ -23,7 +23,7 @@ cmd:rmdef -t node testnodetmp end start:makeconservercf_d -label:others +label:others,ci_test cmd:chdef -t node -o testnodetmp cons=hmc groups=all cmd:makeconservercf testnodetmp check:rc==0 diff --git a/xCAT-test/autotest/testcase/makeknownhosts/cases0 b/xCAT-test/autotest/testcase/makeknownhosts/cases0 index 7978d7dcc..112b83166 100644 --- a/xCAT-test/autotest/testcase/makeknownhosts/cases0 +++ b/xCAT-test/autotest/testcase/makeknownhosts/cases0 @@ -1,5 +1,5 @@ start:makeknownhosts_h -label:others,hosts +label:others,ci_test,hosts cmd:makeknownhosts -h check:output=~Usage cmd:makeknownhosts --help diff --git a/xCAT-test/autotest/testcase/makenetworks/cases0 b/xCAT-test/autotest/testcase/makenetworks/cases0 index b99a8c858..e48ecdaa5 100644 --- a/xCAT-test/autotest/testcase/makenetworks/cases0 +++ b/xCAT-test/autotest/testcase/makenetworks/cases0 @@ -1,6 +1,6 @@ start:makenetworks_h description:help -label:others,network +label:others,ci_test,network cmd:makenetworks -h check:rc==0 check:output=~Usage @@ -8,7 +8,7 @@ end start:makenetworks_help description:help -label:others,network +label:others,ci_test,network cmd:makedhcp --help check:rc==0 check:output=~Usage @@ -16,7 +16,7 @@ end start:makenetworks_v description:version -label:others,network +label:others,ci_test,network cmd:makenetworks -v check:rc==0 check:output=~Version @@ -25,7 +25,7 @@ end start:makenetworks_d os:Linux description:makenetworks_d -label:others,network +label:others,ci_test,network cmd:makenetworks -d > /tmp/mynetworksstanzas check:rc==0 cmd:echo -ne "auto-testnetworks:\n objtype=network\n gateway=1.2.3.0\n mask=255.255.255.0\n net=1.2.3.1\n" >> /tmp/mynetworksstanzas From 004ed2c8585b71791d335ccfe71b61a7b6a02458 Mon Sep 17 00:00:00 2001 From: litingt Date: Mon, 5 Nov 2018 03:37:14 -0500 Subject: [PATCH 049/121] fix a typo --- xCAT-test/autotest/testcase/kdump/linux_diskless_kdump | 2 -- 1 file changed, 2 deletions(-) diff --git a/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump b/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump index 91047bca9..d9e8f86c7 100644 --- a/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump +++ b/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump @@ -38,7 +38,6 @@ cmd:if [ ! -d /kdumpdir ]; then mkdir -p /kdumpdir && chmod 777 /kdumpdir; fi cmd:if [ ! -f /etc/exports ] ;then touch /etc/exports;else cp /etc/exports /etc/exports.bak;fi cmd:cat /etc/exports|grep kdumpdir; if [ "$?" -ne "0" ]; then echo "/kdumpdir *(rw,no_root_squash,sync,no_subtree_check)" >> /etc/exports; fi cmd:cd /etc; export exports;cd -;service nfs restart -label:others,kdump,invoke_provision cmd:chdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute dump=nfs://$$MN/kdumpdir check:rc==0 @@ -73,7 +72,6 @@ check:output=~\d\d:\d\d:\d\d cmd:xdsh $$CN "echo 'echo 1 > /proc/sys/kernel/sysrq; echo c > /proc/sysrq-trigger' > /tmp/kdump.trigger" cmd:xdsh $$CN "chmod 755 /tmp/kdump.trigger" cmd:xdsh $$CN "service atd start" -label:others,kdump,invoke_provision cmd:xdsh $$CN "at now +1 minutes <<< /tmp/kdump.trigger" cmd:sleep 300 From e61c00cde7fbc24d7d3cea8ff594d3353768cfbf Mon Sep 17 00:00:00 2001 From: litingt Date: Mon, 5 Nov 2018 03:46:00 -0500 Subject: [PATCH 050/121] add comment for lsvm case --- xCAT-test/autotest/testcase/lsvm/cases0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-test/autotest/testcase/lsvm/cases0 b/xCAT-test/autotest/testcase/lsvm/cases0 index 6b89cb558..b740eb67e 100644 --- a/xCAT-test/autotest/testcase/lsvm/cases0 +++ b/xCAT-test/autotest/testcase/lsvm/cases0 @@ -1,6 +1,6 @@ #comment out for developper will not fix it #start:lsvm_null -label:others,hcp_hmc +#label:others,hcp_hmc #cmd:lsvm #check:rc!=0 #check:output=~Usage From 2d4141b7d7ea61e2bdd7006ab4bf59925abc340e Mon Sep 17 00:00:00 2001 From: yangsbj Date: Tue, 6 Nov 2018 01:36:29 -0500 Subject: [PATCH 051/121] modify HTTPPORT in post.xcat with macro TABLEBLANKOKAY --- xCAT-server/share/xcat/install/scripts/post.debian | 2 +- xCAT-server/share/xcat/install/scripts/post.xcat | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/share/xcat/install/scripts/post.debian b/xCAT-server/share/xcat/install/scripts/post.debian index b533faeb7..40d26c8f0 100644 --- a/xCAT-server/share/xcat/install/scripts/post.debian +++ b/xCAT-server/share/xcat/install/scripts/post.debian @@ -34,7 +34,7 @@ export MASTER_IP="#XCATVAR:XCATMASTER#" export MASTER_IPS="#XCATVAR:XCATMASTER#" export MASTER="#XCATVAR:XCATMASTER#" export INSTALLDIR=#TABLE:site:key=installdir:value# -export HTTPPORT=#TABLE:site:key=httpport:value# +export HTTPPORT=#TABLEBLANKOKAY:site:key=httpport:value# if [ -z "$INSTALLDIR" ]; then INSTALLDIR="/install" fi diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index fc614b805..6cf90fb96 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -8,7 +8,7 @@ export XCATIPORT=#TABLE:site:key=xcatiport:value# export INSTALLDIR=#TABLE:site:key=installdir:value# export TFTPDIR=#TABLE:site:key=tftpdir:value# export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#" -export HTTPPORT="#TABLE:site:key=httpport:value#" +export HTTPPORT="#TABLEBLANKOKAY:site:key=httpport:value#" #INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib# From 27ff17f11a5b1c68580c1a2f4cf55746fd57486d Mon Sep 17 00:00:00 2001 From: bybai Date: Tue, 6 Nov 2018 03:30:44 -0500 Subject: [PATCH 052/121] missing /etc/rsyslog.d/ from litefile table --- .../manage_clusters/ppc64le/statelite/config_statelite.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/config_statelite.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/config_statelite.rst index 3b0ec8e4b..2c8a02d28 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/config_statelite.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/config_statelite.rst @@ -47,6 +47,7 @@ This is the minimal list of files needed, you can add additional files to the li "ALL","/etc/ntp.conf","tmpfs",, "ALL","/etc/rsyslog.conf","tmpfs",, "ALL","/etc/rsyslog.conf.XCATORIG","tmpfs",, + "ALL","/etc/rsyslog.d/","tmpfs",, "ALL","/etc/udev/","tmpfs",, "ALL","/etc/ntp.conf.predhclient","tmpfs",, "ALL","/etc/resolv.conf","tmpfs",, From 5211c296d845af7875632f0929549da78746f453 Mon Sep 17 00:00:00 2001 From: zet809 Date: Wed, 7 Nov 2018 10:11:05 +0800 Subject: [PATCH 053/121] Add repoonly option for otherpkgs to only generate repo for pkgdir and otherpkgdir (#5768) * Add repoonly option for otherpkgs to only generate repo for pkgdir and otherpkgdir * Update otherpkgs based on comments --- xCAT/postscripts/otherpkgs | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/xCAT/postscripts/otherpkgs b/xCAT/postscripts/otherpkgs index 00a84f8e8..8865990b7 100755 --- a/xCAT/postscripts/otherpkgs +++ b/xCAT/postscripts/otherpkgs @@ -213,7 +213,20 @@ apt_get_update_if_repos_changed() #do nothing for diskless deployment case because it is done in the image already RETURNVAL=0 - +repoonly=0 +argnum=$# +args=$@ +if [ $argnum -eq 1 ]; then + if ( pmatch "$args" "--repoonly" ); then + repoonly=1 + else + echo "$(basename $0): option $args is not supported" + exit 1 + fi +elif [ $argnum -gt 1 ]; then + echo "$(basename $0): only option \"--repoonly\"is supported" + exit 1 +fi if [ "$(uname -s)" = "AIX" ]; then logger -p local4.info -t $log_label "otherpkgs not support on AIX, exiting " exit 0 @@ -231,7 +244,12 @@ if [ -z "$UPDATENODE" ] || [ $UPDATENODE -ne 1 ]; then fi fi -if [ -z "$OTHERPKGS_INDEX" ]; then +if ! pmatch $OSVER "rhel*" && [ "$repoonly" -eq 1 ]; then + echo "$0: the option \"repoonly\" only support rhel right now" + exit 0 +fi + +if [ -z "$OTHERPKGS_INDEX" ] && [ "$repoonly" -ne 1 ]; then echo "$(basename $0): no extra rpms to install" exit 0 fi @@ -813,6 +831,11 @@ EOF` fi fi + if [ "$repoonly" -eq 1 ]; then + echo "otherpkgs: "repoonly set, so ignore pkg installation ..."" + op_index=$((op_index+1)) + continue + fi #now update all the existing rpms if [ $hasyum -eq 1 ]; then if [ $VERBOSE ]; then From 30dec78b3799ece0f0d6abc10e1360ca7d835267 Mon Sep 17 00:00:00 2001 From: bxuxa Date: Wed, 7 Nov 2018 10:51:09 +0800 Subject: [PATCH 054/121] - Make travis continue to finish the real test when it failed to get the PR information from github - and redo the non-finished PR format checking at the end if all testing is passed. --- travis.pl | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/travis.pl b/travis.pl index 56f0f0a0a..988fb958d 100644 --- a/travis.pl +++ b/travis.pl @@ -114,7 +114,7 @@ sub check_pr_format{ unless ($pr_url_resp) { print "[check_pr_format] After $retries retries, not able to get response from $pr_url \n"; # Failed after trying a few times, return error - return 1; + return $counter; } my $pr_content = decode_json($pr_url_resp); my $pr_title = $pr_content->{title}; @@ -617,9 +617,13 @@ print Dumper \@disk; $last_func_start = timelocal(localtime()); print GREEN "\n------ Checking Pull Request Format ------\n"; $rst = check_pr_format(); +my $redo_check_pr = 0; if($rst){ - print RED "Check of pull request format failed\n"; - exit $rst; + if($rst <= $retries) { + print RED "Check of pull request format failed\n"; + exit $rst; + } + $redo_check_pr = 1; } mark_time("check_pr_format"); @@ -660,4 +664,14 @@ if($rst){ } mark_time("run_fast_regression_test"); +if ($redo_check_pr) { + print GREEN "\n------ Checking Pull Request Format ------\n"; + $rst = check_pr_format(); + if($rst){ + print RED "Check of pull request format failed\n"; + exit $rst; + } + mark_time("check_pr_format"); +} + exit 0; From e8e94249f830e6282f1ccd2fa697c7d8c4f10f29 Mon Sep 17 00:00:00 2001 From: litingt Date: Wed, 7 Nov 2018 00:45:52 -0500 Subject: [PATCH 055/121] update according to comments --- xCAT-test/autotest/testcase/makentp/cases0 | 28 ++++++++++------------ 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/xCAT-test/autotest/testcase/makentp/cases0 b/xCAT-test/autotest/testcase/makentp/cases0 index 0827649ee..28eef1e18 100644 --- a/xCAT-test/autotest/testcase/makentp/cases0 +++ b/xCAT-test/autotest/testcase/makentp/cases0 @@ -1,22 +1,22 @@ start:makentp_v - -descriptiop:makentp -v +description:makentp -v +label:others,ntp cmd:makentp -v check:rc==0 check:output=~Version end start:makentp_h - -descriptiop:makentp -h +description:makentp -h +label:others,ntp cmd:makentp -h check:rc==0 check:output=~Usage: makentp end start:makentp_extntpserver_null - -descriptiop:test makentp with default value. extntpserver is set to blank +description:test makentp with default value. extntpserver is set to blank +label:others,ntp cmd:lsdef -t site -o clustersite -i extntpservers -c >/tmp/extntpserver check:rc==0 cmd:chtab key=extntpservers site.value="" @@ -31,7 +31,6 @@ check:output=~checking if nptd is installed check:output=~backing up the ntp configuration file /etc/ntp.conf check:output=~stopping ntpserver check:output=~starting ntpserver - check:output=~enabling ntpserver cmd:extntpserver=`cat /tmp/ntpserver | awk -F = '{print \$2}'`;chtab key=extntpservers site.value=$extntpserver check:rc==0 @@ -41,8 +40,8 @@ check:rc==0 end start:makentp_extntpserver_value - -descriptiop:test makentp with extntpserver is set to a specific value +description:test makentp with extntpserver is set to a specific value +label:others,ntp cmd:lsdef -t site -o clustersite -i extntpservers -c >/tmp/extntpserver check:rc==0 cmd:chtab key=extntpservers site.value="$$extntpserversip" @@ -62,7 +61,6 @@ check:output=~backing up the ntp configuration file /etc/ntp.conf check:output=~ntp servers are: $$extntpserversip check:output=~stopping ntpserver check:output=~starting ntpserver - check:output=~enabling ntpserver cmd:date check:output=~$$DATE @@ -75,8 +73,8 @@ cmd:rm -rf /tmp/extntpserver end start:updatenode_computenode_P_setupntp - -descriptiop:using updatenode -P to setup ntp on compute node +description:using updatenode -P to setup ntp on compute node +label:others,ntp cmd:xdsh $$CN date -s 20000101 check:rc==0 cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "rhel" ]];then xdsh $$CN clock -w;else xdsh $$CN hwclock -w ; fi @@ -109,9 +107,8 @@ end start:makentp_initialize - -descriptiop:start ntp service on management node and synchronize time with external ntp server - +description:start ntp service on management node and synchronize time with external ntp server +label:others,ntp cmd:chtab key=extntpservers site.value="$$extntpserversip" check:rc==0 cmd:makentp -V @@ -122,7 +119,6 @@ check:output=~backing up the ntp configuration file /etc/ntp.conf check:output=~ntp servers are: $$extntpserversip check:output=~stopping ntpserver check:output=~starting ntpserver - check:output=~enabling ntpserver cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu" ]] || [[ "__GETNODEATTR($$CN,os)__" = "sles11.4" ]];then service ntp status;else service ntpd status; fi check:rc==0 From 13bca11a9d6c4bb7e98c12f68eb2d56aafa15d8d Mon Sep 17 00:00:00 2001 From: Yuan Bai Date: Wed, 7 Nov 2018 16:47:46 +0800 Subject: [PATCH 056/121] add sys log for redhat statelite (#5771) * add sys log for redhat statelite --- .../xcat/netboot/rh/dracut/xcat-premount.sh | 10 +++- .../netboot/rh/dracut_033/xcat-premount.sh | 8 ++- .../netboot/rh/dracut_033/xcat-prepivot.sh | 50 +++++++++++++----- .../share/xcat/netboot/rh/dracut_033/xcatroot | 22 +++++--- .../netboot/rh/dracut_047/xcat-premount.sh | 11 ++-- .../netboot/rh/dracut_047/xcat-prepivot.sh | 51 ++++++++++++++----- .../share/xcat/netboot/rh/dracut_047/xcatroot | 22 +++++--- .../netboot/sles/dracut_033/xcat-premount.sh | 10 +++- xCAT/postscripts/xcatdsklspost | 13 +++-- xCAT/postscripts/xcatpostinit1.netboot | 2 +- 10 files changed, 147 insertions(+), 52 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/rh/dracut/xcat-premount.sh b/xCAT-server/share/xcat/netboot/rh/dracut/xcat-premount.sh index 40c1dbbe5..9f320bb66 100644 --- a/xCAT-server/share/xcat/netboot/rh/dracut/xcat-premount.sh +++ b/xCAT-server/share/xcat/netboot/rh/dracut/xcat-premount.sh @@ -1,6 +1,8 @@ #!/bin/sh #script to update nodelist.nodestatus during provision +XCAT="$(getarg XCAT=)" +STATEMNT="$(getarg STATEMNT=)" MASTER=`echo $XCAT |awk -F: '{print $1}'` getarg nonodestatus @@ -11,8 +13,12 @@ if [ $? -ne 0 ]; then XCATIPORT="3002" fi - - +log_label="xcat.deployment" +[ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER" +logger $SYSLOGHOST -t $log_label -p local4.info "=============deployment starting====================" +logger $SYSLOGHOST -t $log_label -p local4.info "Starting xcat-premount..." +[ "$xcatdebugmode" > "0" ] && logger $SYSLOGHOST -t $log_label -p local4.debug "MASTER=$MASTER XCATIPORT=$XCATIPORT NODESTATUS=$NODESTATUS" if [ $NODESTATUS -ne 0 ];then + logger $SYSLOGHOST -t $log_label -p local4.info "Sending request to $MASTER:$XCATIPORT for changing status to netbooting..." /tmp/updateflag $MASTER $XCATIPORT "installstatus netbooting" fi diff --git a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcat-premount.sh b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcat-premount.sh index 394009dac..9f320bb66 100644 --- a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcat-premount.sh +++ b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcat-premount.sh @@ -13,8 +13,12 @@ if [ $? -ne 0 ]; then XCATIPORT="3002" fi - - +log_label="xcat.deployment" +[ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER" +logger $SYSLOGHOST -t $log_label -p local4.info "=============deployment starting====================" +logger $SYSLOGHOST -t $log_label -p local4.info "Starting xcat-premount..." +[ "$xcatdebugmode" > "0" ] && logger $SYSLOGHOST -t $log_label -p local4.debug "MASTER=$MASTER XCATIPORT=$XCATIPORT NODESTATUS=$NODESTATUS" if [ $NODESTATUS -ne 0 ];then + logger $SYSLOGHOST -t $log_label -p local4.info "Sending request to $MASTER:$XCATIPORT for changing status to netbooting..." /tmp/updateflag $MASTER $XCATIPORT "installstatus netbooting" fi diff --git a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcat-prepivot.sh b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcat-prepivot.sh index d8c232831..4bbdffa0f 100755 --- a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcat-prepivot.sh +++ b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcat-prepivot.sh @@ -1,9 +1,13 @@ #!/bin/sh +log_label="xcat.deployment" NEWROOT=/sysroot SERVER=${SERVER%%/*} SERVER=${SERVER%:} RWDIR=.statelite XCAT="$(getarg XCAT=)" +xcatdebugmode="$(getarg xcatdebugmode=)" +XCATMASTER=$XCAT +MASTER=`echo $XCATMASTER |awk -F: '{print $1}'` STATEMNT="$(getarg STATEMNT=)" if [ ! -z $STATEMNT ]; then #btw, uri style might have left future options other than nfs open, will u se // to detect uri in the future I guess SNAPSHOTSERVER=${STATEMNT%:*} @@ -17,6 +21,9 @@ if [ ! -z $STATEMNT ]; then #btw, uri style might have left future options other fi fi + +[ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER" +logger $SYSLOGHOST -t $log_label -p local4.info "Executing xcat-prepivot to set up statelite..." echo Setting up Statelite mkdir -p $NEWROOT @@ -27,14 +34,18 @@ MAXTRIES=7 ITER=0 if [ ! -e "$NEWROOT/$RWDIR" ]; then echo "" - echo "This NFS root directory doesn't have a /$RWDIR directory for me to mount a rw filesystem. You'd better create it... " + msg="This NFS root directory doesn't have a /$RWDIR directory for me to mount a rw filesystem. You'd better create it... " + echo "$msg" echo "" + logger $SYSLOGHOST -t $log_label -p local4.error "$msg" /bin/sh fi if [ ! -e "$NEWROOT/etc/init.d/statelite" ]; then echo "" - echo "$NEWROOT/etc/init.d/statelite doesn't exist. Perhaps you didn't create this image with th e -m statelite mode" + msg="$NEWROOT/etc/init.d/statelite doesn't exist. Perhaps you didn't create this image with the -m statelite mode" + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.error "$msg" echo "" /bin/sh fi @@ -59,15 +70,19 @@ if [ ! -z $SNAPSHOTSERVER ]; then while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do ITER=$(( ITER + 1 )) if [ "$ITER" == "$MAXTRIES" ]; then - echo "Your are dead, rpower $ME boot to play again." - echo "Possible problems: + msg="Your are dead, rpower $ME boot to play again. + Possible problems: 1. $SNAPSHOTSERVER is not exporting $SNAPSHOTROOT ? 2. Is DNS set up? Maybe that's why I can't mount $SNAPSHOTSERVER." + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.error "$msg" /bin/sh exit fi RS=$(( $RANDOM % 20 )) - echo "Trying again in $RS seconds..." + msg="Trying again in $RS seconds..." + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.info "$msg" sleep $RS done @@ -78,13 +93,17 @@ if [ ! -z $SNAPSHOTSERVER ]; then while ! umount -l $NEWROOT/$RWDIR/persistent; do ITER=$(( ITER + 1 )) if [ "$ITER" == "$MAXTRIES" ]; then - echo "Your are dead, rpower $ME boot to play again." - echo "Cannot umount $NEWROOT/$RWDIR/persistent." + msg="Your are dead, rpower $ME boot to play again. + Cannot umount $NEWROOT/$RWDIR/persistent." + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.error "$msg" /bin/sh exit fi RS=$(( $RANDOM % 20 )) - echo "Trying again in $RS seconds..." + msg="Trying again in $RS seconds..." + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.info "$msg" sleep $RS done @@ -93,20 +112,26 @@ if [ ! -z $SNAPSHOTSERVER ]; then while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do ITER=$(( ITER + 1 )) if [ "$ITER" == "$MAXTRIES" ]; then - echo "Your are dead, rpower $ME boot to play again." - echo "Possible problems: cannot mount to $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME." + msg="Your are dead, rpower $ME boot to play again. + Possible problems: cannot mount to $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME." + echo $msg + logger $SYSLOGHOST -t $log_label -p local4.info "$msg" /bin/sh exit fi RS=$(( $RANDOM % 20 )) - echo "Trying again in $RS seconds..." + msg="Trying again in $RS seconds..." + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.info "$msg" sleep $RS done fi # TODO: handle the dhclient/resolv.conf/ntp, etc -echo "Get to enable localdisk" +logger $SYSLOGHOST -t $log_label -p local4.info "Enabling localdisk ..." +echo "Enable localdisk ..." $NEWROOT/etc/init.d/localdisk +logger $SYSLOGHOST -t $log_label -p local4.info "Preparing mount points ..." $NEWROOT/etc/init.d/statelite READONLY=yes export READONLY @@ -174,3 +199,4 @@ fi echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm "$job"' > $hookdir/initqueue/xcat.sh # force udevsettle to break > $hookdir/initqueue/work +logger $SYSLOGHOST -t $log_label -p local4.info "Exit xcat-prepivot" diff --git a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot index 1bab4cf52..1531756fd 100755 --- a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot +++ b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot @@ -168,6 +168,7 @@ elif [ -r /rootimg-statelite.gz ]; then echo "" echo "The /$RWDIR directory doesn't exist in the rootimg... " echo "" + logger $SYSLOGHOST -t $log_label -p local4.err "The /$RWDIR directory doesn't exist in the rootimg..." /bin/sh fi @@ -175,6 +176,7 @@ elif [ -r /rootimg-statelite.gz ]; then echo "" echo "$NEWROOT/etc/init.d/statelite doesn't exist... " echo "" + logger $SYSLOGHOST -t $log_label -p local4.err "$NEWROOT/etc/init.d/statelite doesn't exist... " /bin/sh fi @@ -208,10 +210,12 @@ elif [ -r /rootimg-statelite.gz ]; then while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do ITER=$(( ITER + 1 )) if [ "$ITER" == "$MAXTRIES" ]; then - echo "You are dead, rpower $ME boot to play again." - echo "Possible problems: + msg="You are dead, rpower $ME boot to play again. + Possible problems: 1. $SNAPSHOTSERVER is not exporting $SNAPSHOTROOT ? 2. Is DNS set up? Maybe that's why I can't mount $SNAPSHOTSERVER." + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.err "$msg" /bin/sh exit fi @@ -227,8 +231,10 @@ elif [ -r /rootimg-statelite.gz ]; then while ! umount -l $NEWROOT/$RWDIR/persistent; do ITER=$(( ITER + 1 )) if [ "$ITER" == "$MAXTRIES" ]; then - echo "Your are dead, rpower $ME boot to play again." - echo "Cannot umount $NEWROOT/$RWDIR/persistent." + msg="Your are dead, rpower $ME boot to play again. + Cannot umount $NEWROOT/$RWDIR/persistent." + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.err "$msg" /bin/sh exit fi @@ -242,8 +248,10 @@ elif [ -r /rootimg-statelite.gz ]; then while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do ITER=$(( ITER + 1 )) if [ "$ITER" == "$MAXTRIES" ]; then - echo "Your are dead, rpower $ME boot to play again." - echo "Possible problems: cannot mount to $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME." + msg="Your are dead, rpower $ME boot to play again. + Possible problems: cannot mount to $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME." + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.err "$msg" /bin/sh exit fi @@ -253,7 +261,9 @@ elif [ -r /rootimg-statelite.gz ]; then done fi + logger $SYSLOGHOST -t $log_label -p local4.info "Enabling localdisk ..." $NEWROOT/etc/init.d/localdisk + logger $SYSLOGHOST -t $log_label -p local4.info "Preparing mount points ..." $NEWROOT/etc/init.d/statelite fastboot=yes export fastboot diff --git a/xCAT-server/share/xcat/netboot/rh/dracut_047/xcat-premount.sh b/xCAT-server/share/xcat/netboot/rh/dracut_047/xcat-premount.sh index 6c67fb267..9f320bb66 100644 --- a/xCAT-server/share/xcat/netboot/rh/dracut_047/xcat-premount.sh +++ b/xCAT-server/share/xcat/netboot/rh/dracut_047/xcat-premount.sh @@ -1,5 +1,4 @@ -#!/bin/bash -set -x +#!/bin/sh #script to update nodelist.nodestatus during provision XCAT="$(getarg XCAT=)" @@ -14,8 +13,12 @@ if [ $? -ne 0 ]; then XCATIPORT="3002" fi - - +log_label="xcat.deployment" +[ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER" +logger $SYSLOGHOST -t $log_label -p local4.info "=============deployment starting====================" +logger $SYSLOGHOST -t $log_label -p local4.info "Starting xcat-premount..." +[ "$xcatdebugmode" > "0" ] && logger $SYSLOGHOST -t $log_label -p local4.debug "MASTER=$MASTER XCATIPORT=$XCATIPORT NODESTATUS=$NODESTATUS" if [ $NODESTATUS -ne 0 ];then + logger $SYSLOGHOST -t $log_label -p local4.info "Sending request to $MASTER:$XCATIPORT for changing status to netbooting..." /tmp/updateflag $MASTER $XCATIPORT "installstatus netbooting" fi diff --git a/xCAT-server/share/xcat/netboot/rh/dracut_047/xcat-prepivot.sh b/xCAT-server/share/xcat/netboot/rh/dracut_047/xcat-prepivot.sh index c09dfe486..a3bcb8188 100755 --- a/xCAT-server/share/xcat/netboot/rh/dracut_047/xcat-prepivot.sh +++ b/xCAT-server/share/xcat/netboot/rh/dracut_047/xcat-prepivot.sh @@ -1,10 +1,13 @@ #!/bin/bash -set -x +log_label="xcat.deployment" NEWROOT=/sysroot SERVER=${SERVER%%/*} SERVER=${SERVER%:} RWDIR=.statelite XCAT="$(getarg XCAT=)" +xcatdebugmode="$(getarg xcatdebugmode=)" +XCATMASTER=$XCAT +MASTER=`echo $XCATMASTER |awk -F: '{print $1}'` STATEMNT="$(getarg STATEMNT=)" if [ ! -z $STATEMNT ]; then #btw, uri style might have left future options other than nfs open, will u se // to detect uri in the future I guess SNAPSHOTSERVER=${STATEMNT%:*} @@ -18,6 +21,9 @@ if [ ! -z $STATEMNT ]; then #btw, uri style might have left future options other fi fi + +[ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER" +logger $SYSLOGHOST -t $log_label -p local4.info "Executing xcat-prepivot to set up statelite..." echo Setting up Statelite mkdir -p $NEWROOT @@ -28,14 +34,18 @@ MAXTRIES=7 ITER=0 if [ ! -e "$NEWROOT/$RWDIR" ]; then echo "" - echo "This NFS root directory doesn't have a /$RWDIR directory for me to mount a rw filesystem. You'd better create it... " + msg="This NFS root directory doesn't have a /$RWDIR directory for me to mount a rw filesystem. You'd better create it... " + echo "$msg" echo "" + logger $SYSLOGHOST -t $log_label -p local4.error "$msg" /bin/sh fi if [ ! -e "$NEWROOT/etc/init.d/statelite" ]; then echo "" - echo "$NEWROOT/etc/init.d/statelite doesn't exist. Perhaps you didn't create this image with th e -m statelite mode" + msg="$NEWROOT/etc/init.d/statelite doesn't exist. Perhaps you didn't create this image with the -m statelite mode" + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.error "$msg" echo "" /bin/sh fi @@ -60,15 +70,19 @@ if [ ! -z $SNAPSHOTSERVER ]; then while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do ITER=$(( ITER + 1 )) if [ "$ITER" == "$MAXTRIES" ]; then - echo "Your are dead, rpower $ME boot to play again." - echo "Possible problems: + msg="Your are dead, rpower $ME boot to play again. + Possible problems: 1. $SNAPSHOTSERVER is not exporting $SNAPSHOTROOT ? 2. Is DNS set up? Maybe that's why I can't mount $SNAPSHOTSERVER." + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.error "$msg" /bin/sh exit fi RS=$(( $RANDOM % 20 )) - echo "Trying again in $RS seconds..." + msg="Trying again in $RS seconds..." + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.info "$msg" sleep $RS done @@ -79,13 +93,17 @@ if [ ! -z $SNAPSHOTSERVER ]; then while ! umount -l $NEWROOT/$RWDIR/persistent; do ITER=$(( ITER + 1 )) if [ "$ITER" == "$MAXTRIES" ]; then - echo "Your are dead, rpower $ME boot to play again." - echo "Cannot umount $NEWROOT/$RWDIR/persistent." + msg="Your are dead, rpower $ME boot to play again. + Cannot umount $NEWROOT/$RWDIR/persistent." + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.error "$msg" /bin/sh exit fi RS=$(( $RANDOM % 20 )) - echo "Trying again in $RS seconds..." + msg="Trying again in $RS seconds..." + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.info "$msg" sleep $RS done @@ -94,20 +112,26 @@ if [ ! -z $SNAPSHOTSERVER ]; then while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do ITER=$(( ITER + 1 )) if [ "$ITER" == "$MAXTRIES" ]; then - echo "Your are dead, rpower $ME boot to play again." - echo "Possible problems: cannot mount to $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME." + msg="Your are dead, rpower $ME boot to play again. + Possible problems: cannot mount to $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME." + echo $msg + logger $SYSLOGHOST -t $log_label -p local4.info "$msg" /bin/sh exit fi RS=$(( $RANDOM % 20 )) - echo "Trying again in $RS seconds..." + msg="Trying again in $RS seconds..." + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.info "$msg" sleep $RS done fi # TODO: handle the dhclient/resolv.conf/ntp, etc -echo "Get to enable localdisk" +logger $SYSLOGHOST -t $log_label -p local4.info "Enabling localdisk ..." +echo "Enable localdisk ..." $NEWROOT/etc/init.d/localdisk +logger $SYSLOGHOST -t $log_label -p local4.info "Preparing mount points ..." $NEWROOT/etc/init.d/statelite READONLY=yes export READONLY @@ -175,3 +199,4 @@ fi echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm "$job"' > $hookdir/initqueue/xcat.sh # force udevsettle to break > $hookdir/initqueue/work +logger $SYSLOGHOST -t $log_label -p local4.info "Exit xcat-prepivot" diff --git a/xCAT-server/share/xcat/netboot/rh/dracut_047/xcatroot b/xCAT-server/share/xcat/netboot/rh/dracut_047/xcatroot index 254adb7fe..9f2b4182b 100755 --- a/xCAT-server/share/xcat/netboot/rh/dracut_047/xcatroot +++ b/xCAT-server/share/xcat/netboot/rh/dracut_047/xcatroot @@ -168,6 +168,7 @@ elif [ -r /rootimg-statelite.gz ]; then echo "" echo "The /$RWDIR directory doesn't exist in the rootimg... " echo "" + logger $SYSLOGHOST -t $log_label -p local4.err "The /$RWDIR directory doesn't exist in the rootimg..." /bin/sh fi @@ -175,6 +176,7 @@ elif [ -r /rootimg-statelite.gz ]; then echo "" echo "$NEWROOT/etc/init.d/statelite doesn't exist... " echo "" + logger $SYSLOGHOST -t $log_label -p local4.err "$NEWROOT/etc/init.d/statelite doesn't exist... " /bin/sh fi @@ -208,10 +210,12 @@ elif [ -r /rootimg-statelite.gz ]; then while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do ITER=$(( ITER + 1 )) if [ "$ITER" == "$MAXTRIES" ]; then - echo "You are dead, rpower $ME boot to play again." - echo "Possible problems: + msg="You are dead, rpower $ME boot to play again. + Possible problems: 1. $SNAPSHOTSERVER is not exporting $SNAPSHOTROOT ? 2. Is DNS set up? Maybe that's why I can't mount $SNAPSHOTSERVER." + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.err "$msg" /bin/sh exit fi @@ -227,8 +231,10 @@ elif [ -r /rootimg-statelite.gz ]; then while ! umount -l $NEWROOT/$RWDIR/persistent; do ITER=$(( ITER + 1 )) if [ "$ITER" == "$MAXTRIES" ]; then - echo "Your are dead, rpower $ME boot to play again." - echo "Cannot umount $NEWROOT/$RWDIR/persistent." + msg="Your are dead, rpower $ME boot to play again. + Cannot umount $NEWROOT/$RWDIR/persistent." + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.err "$msg" /bin/sh exit fi @@ -242,8 +248,10 @@ elif [ -r /rootimg-statelite.gz ]; then while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do ITER=$(( ITER + 1 )) if [ "$ITER" == "$MAXTRIES" ]; then - echo "Your are dead, rpower $ME boot to play again." - echo "Possible problems: cannot mount to $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME." + msg="Your are dead, rpower $ME boot to play again. + Possible problems: cannot mount to $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME." + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.err "$msg" /bin/sh exit fi @@ -253,7 +261,9 @@ elif [ -r /rootimg-statelite.gz ]; then done fi + logger $SYSLOGHOST -t $log_label -p local4.info "Enabling localdisk ..." $NEWROOT/etc/init.d/localdisk + logger $SYSLOGHOST -t $log_label -p local4.info "Preparing mount points ..." $NEWROOT/etc/init.d/statelite fastboot=yes export fastboot diff --git a/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-premount.sh b/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-premount.sh index 40c1dbbe5..9f320bb66 100644 --- a/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-premount.sh +++ b/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-premount.sh @@ -1,6 +1,8 @@ #!/bin/sh #script to update nodelist.nodestatus during provision +XCAT="$(getarg XCAT=)" +STATEMNT="$(getarg STATEMNT=)" MASTER=`echo $XCAT |awk -F: '{print $1}'` getarg nonodestatus @@ -11,8 +13,12 @@ if [ $? -ne 0 ]; then XCATIPORT="3002" fi - - +log_label="xcat.deployment" +[ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER" +logger $SYSLOGHOST -t $log_label -p local4.info "=============deployment starting====================" +logger $SYSLOGHOST -t $log_label -p local4.info "Starting xcat-premount..." +[ "$xcatdebugmode" > "0" ] && logger $SYSLOGHOST -t $log_label -p local4.debug "MASTER=$MASTER XCATIPORT=$XCATIPORT NODESTATUS=$NODESTATUS" if [ $NODESTATUS -ne 0 ];then + logger $SYSLOGHOST -t $log_label -p local4.info "Sending request to $MASTER:$XCATIPORT for changing status to netbooting..." /tmp/updateflag $MASTER $XCATIPORT "installstatus netbooting" fi diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index e6651d711..0a94a131a 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -236,15 +236,13 @@ parsehttpserver () # Main # parse the arguments +log_label="xcat.updatenode" ARGNUM=$#; if [ -z $1 ]; then NODE_DEPLOYMENT=1 log_label="xcat.deployment" - echolog "info" "=============deployment starting====================" else NODE_DEPLOYMENT=0 - log_label="xcat.updatenode" - echolog "info" "=============updatenode starting====================" case $1 in 1|2|5) MODE=$1 @@ -299,9 +297,16 @@ else fi fi ;; - 3|4|6) MODE=$1;; + 4) + MODE=$1 + log_label="xcat.deployment" + ;; + 3|6) MODE=$1;; esac fi +if [ $NODE_DEPLOYMENT -ne 1 ] && [ $MODE -ne 4 ] ; then + echolog "info" "=============updatenode starting====================" +fi # set the default path for the xcatpost directory xcatpost="/xcatpost" # Check for debug mode and you have nodename available you can change the path for debug diff --git a/xCAT/postscripts/xcatpostinit1.netboot b/xCAT/postscripts/xcatpostinit1.netboot index 0128cefeb..851e43da4 100755 --- a/xCAT/postscripts/xcatpostinit1.netboot +++ b/xCAT/postscripts/xcatpostinit1.netboot @@ -22,7 +22,7 @@ fi if [ -n "$LOGLABEL" ]; then log_label=$LOGLABEL else - log_label="xcat" + log_label="xcat.deployment" fi XCATSERVER=$(grep --only-matching "\" /proc/cmdline |cut -d= -f2 |cut -d: -f1 2>/dev/null) From 43b31c380cd79a95f6723cf48ac57bbde1cffc89 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Fri, 26 Oct 2018 18:45:55 +0800 Subject: [PATCH 057/121] Patch sles_migration test cases. Workaround for github issue #5503 --- xCAT-test/autotest/testcase/migration/sles_migration | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/xCAT-test/autotest/testcase/migration/sles_migration b/xCAT-test/autotest/testcase/migration/sles_migration index af2cd1303..5cb02d7ba 100644 --- a/xCAT-test/autotest/testcase/migration/sles_migration +++ b/xCAT-test/autotest/testcase/migration/sles_migration @@ -90,7 +90,11 @@ cmd:xdsh $$CN "tar -jxvf /xcat-dep*.tar.bz2" check:rc==0 cmd:xdsh $$CN "cd /root/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c14`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" check:rc==0 -cmd:xdsh $$CN "zypper refresh;zypper -n --gpg-auto-import-keys update --force-resolution '*xCAT*'" +# Workaround github issue #5503 +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-dep.repo )" +cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n refresh" +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b" +cmd:xdsh $$CN "zypper refresh;zypper -n update --force-resolution '*xCAT*'" check:rc==0 cmd:xdsh $$CN "service xcatd status" check:rc==0 @@ -200,7 +204,11 @@ cmd:xdsh $$CN "tar -jxvf /xcat-dep*.tar.bz2" check:rc==0 cmd:xdsh $$CN "cd /root/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c14`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" check:rc==0 -cmd:xdsh $$CN "zypper refresh;zypper -n --gpg-auto-import-keys update --force-resolution '*xCAT*'" +# Workaround github issue #5503 +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-dep.repo )" +cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n refresh" +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b" +cmd:xdsh $$CN "zypper refresh;zypper -n update --force-resolution '*xCAT*'" check:rc==0 cmd:xdsh $$CN "service xcatd status" check:rc==0 From 01541aba74b52bede758f76ae28f8855631f43e0 Mon Sep 17 00:00:00 2001 From: yangsong Date: Wed, 7 Nov 2018 18:19:35 +0800 Subject: [PATCH 058/121] correct several issues on site.httpport in diskless provision (#5774) --- xCAT-server/lib/xcat/plugins/anaconda.pm | 5 +++-- xCAT-server/lib/xcat/plugins/debian.pm | 3 +-- xCAT/postscripts/xcatdsklspost | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 4fea40716..68011078a 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -652,8 +652,7 @@ sub mknetboot $kcmdline .= $statemnt . " "; $kcmdline .= "XCAT=$xcatmasterip:$xcatdport "; - - $kcmdline .= "XCATHTTPPORT=$httpport "; + if ($rootfstype ne "ramdisk") { @@ -695,6 +694,8 @@ sub mknetboot $kcmdline .= " nonodestatus "; } + $kcmdline .= "XCATHTTPPORT=$httpport "; + if (($::XCATSITEVALS{xcatdebugmode} eq "1") or ($::XCATSITEVALS{xcatdebugmode} eq "2")) { #for use in postscript and postbootscript in xcatdsklspost in the rootimg $kcmdline .= " LOGSERVER=$xcatmasterip "; diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm index 70c2e6ddb..44b434e7f 100644 --- a/xCAT-server/lib/xcat/plugins/debian.pm +++ b/xCAT-server/lib/xcat/plugins/debian.pm @@ -1336,8 +1336,6 @@ sub mknetboot } - $kcmdline .=" XCATHTTPPORT=$httpport "; - # add support for subVars in the value of "statemnt" my $statemnt = ""; if (exists($stateHash->{$node})) { @@ -1401,6 +1399,7 @@ sub mknetboot } + $kcmdline .=" XCATHTTPPORT=$httpport "; if (($::XCATSITEVALS{xcatdebugmode} eq "1") or ($::XCATSITEVALS{xcatdebugmode} eq "2")) { my ($host, $ipaddr) = xCAT::NetworkUtils->gethostnameandip($xcatmaster); diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index 0a94a131a..7147d2fb7 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -487,7 +487,7 @@ else # for common mode MODE=1,2,3,5 (updatenode,moncfg,node deployment) SIP=`echo $TMP | cut -d: -f1` elif [ "$KEY" = "XCATHTTPPORT" ];then - HTTPPORT=$(echo $i | awk -F= '{print $1}') + HTTPPORT=$(echo $i | awk -F= '{print $2}') [ -z "$HTTPPORT" ] && HTTPPORT="80" fi done From 602083bcc2be3f9074bd0940d4a24667f9f70e67 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Wed, 7 Nov 2018 21:15:48 -0500 Subject: [PATCH 059/121] fix issue 5724, adjust cases list to avoid some cases false failure --- xCAT-test/autotest/bundle/pegas_ppc64le.bundle | 12 ++++++------ xCAT-test/autotest/bundle/rhels6.9_ppc64.bundle | 8 ++++---- xCAT-test/autotest/bundle/rhels6.9_x86_64.bundle | 8 ++++---- xCAT-test/autotest/bundle/rhels7.4_ppc64.bundle | 8 ++++---- xCAT-test/autotest/bundle/rhels7.4_ppc64le.bundle | 10 ++++++---- xCAT-test/autotest/bundle/rhels7.4_x86_64.bundle | 8 ++++---- xCAT-test/autotest/bundle/sles11.4_ppc64.bundle | 4 ++-- xCAT-test/autotest/bundle/sles11.4_x86_64.bundle | 8 ++++---- xCAT-test/autotest/bundle/sles12.2_ppc64le.bundle | 12 ++++++------ xCAT-test/autotest/bundle/sles12.2_x86_64.bundle | 4 ++-- .../autotest/bundle/ubuntu16.04.1_ppc64le.bundle | 12 ++++++------ .../autotest/bundle/ubuntu16.04.1_x86_64.bundle | 12 ++++++------ 12 files changed, 54 insertions(+), 52 deletions(-) diff --git a/xCAT-test/autotest/bundle/pegas_ppc64le.bundle b/xCAT-test/autotest/bundle/pegas_ppc64le.bundle index 884d5453e..c7ae81ad6 100644 --- a/xCAT-test/autotest/bundle/pegas_ppc64le.bundle +++ b/xCAT-test/autotest/bundle/pegas_ppc64le.bundle @@ -269,8 +269,6 @@ makentp_v makentp_h nodeset_check_warninginfo runcmdinstaller_h -runcmdinstaller_command -get_xcat_postscripts_loginfo updatenode_postscripts_loginfo xcatd_start xcatd_stop @@ -311,10 +309,6 @@ rmimage_diskless updatenode_diskful_syncfiles_failing xdcp_nonroot_user xdsh_permission_denied -packimage_m_cpio_c_gzip -packimage_m_cpio_c_xz -packimage_m_tar_c_gzip -packimage_m_tar_c_xz packimage_m_invalid_archive_method packimage_m_invalid_compress_method confignetwork_vlan_false @@ -322,6 +316,12 @@ confignetwork__bridge_false nodeset_shell nodeset_cmdline nodeset_runimg +packimage_m_cpio_c_gzip +packimage_m_cpio_c_xz +packimage_m_tar_c_gzip +packimage_m_tar_c_xz +runcmdinstaller_command +get_xcat_postscripts_loginfo reg_linux_statelite_installation_flat SN_setup_case reg_linux_diskfull_installation_hierarchy diff --git a/xCAT-test/autotest/bundle/rhels6.9_ppc64.bundle b/xCAT-test/autotest/bundle/rhels6.9_ppc64.bundle index c782fe9f1..b1137d0bf 100644 --- a/xCAT-test/autotest/bundle/rhels6.9_ppc64.bundle +++ b/xCAT-test/autotest/bundle/rhels6.9_ppc64.bundle @@ -272,8 +272,6 @@ makentp_v makentp_h nodeset_check_warninginfo runcmdinstaller_h -runcmdinstaller_command -get_xcat_postscripts_loginfo updatenode_postscripts_loginfo bmcdiscover_h bmcdiscover_nmap_range @@ -312,12 +310,14 @@ updatenode_diskful_syncfiles_failing xdcp_nonroot_user xdsh_permission_denied reg_linux_diskless_installation_flat +packimage_m_invalid_archive_method +packimage_m_invalid_compress_method packimage_m_cpio_c_gzip packimage_m_cpio_c_xz packimage_m_tar_c_gzip packimage_m_tar_c_xz -packimage_m_invalid_archive_method -packimage_m_invalid_compress_method +runcmdinstaller_command +get_xcat_postscripts_loginfo reg_linux_statelite_installation_flat SN_setup_case reg_linux_diskfull_installation_hierarchy diff --git a/xCAT-test/autotest/bundle/rhels6.9_x86_64.bundle b/xCAT-test/autotest/bundle/rhels6.9_x86_64.bundle index 331edf666..95a28f122 100644 --- a/xCAT-test/autotest/bundle/rhels6.9_x86_64.bundle +++ b/xCAT-test/autotest/bundle/rhels6.9_x86_64.bundle @@ -234,10 +234,6 @@ updatenode_diskful_syncfiles_failing xdcp_nonroot_user xdsh_permission_denied reg_linux_diskless_installation_flat -packimage_m_cpio_c_gzip -packimage_m_cpio_c_xz -packimage_m_tar_c_gzip -packimage_m_tar_c_xz packimage_m_invalid_archive_method packimage_m_invalid_compress_method confignetwork_vlan_false @@ -245,6 +241,10 @@ confignetwork__bridge_false nodeset_shell nodeset_cmdline nodeset_runimg +packimage_m_cpio_c_gzip +packimage_m_cpio_c_xz +packimage_m_tar_c_gzip +packimage_m_tar_c_xz reg_linux_statelite_installation_flat SN_setup_case reg_linux_diskfull_installation_hierarchy diff --git a/xCAT-test/autotest/bundle/rhels7.4_ppc64.bundle b/xCAT-test/autotest/bundle/rhels7.4_ppc64.bundle index bb5016a0d..060343ce4 100644 --- a/xCAT-test/autotest/bundle/rhels7.4_ppc64.bundle +++ b/xCAT-test/autotest/bundle/rhels7.4_ppc64.bundle @@ -315,8 +315,6 @@ makentp_v makentp_h nodeset_check_warninginfo runcmdinstaller_h -runcmdinstaller_command -get_xcat_postscripts_loginfo updatenode_postscripts_loginfo bmcdiscover_h bmcdiscover_nmap_range @@ -356,12 +354,14 @@ updatenode_diskful_syncfiles_failing xdcp_nonroot_user xdsh_permission_denied reg_linux_diskless_installation_flat +packimage_m_invalid_archive_method +packimage_m_invalid_compress_method packimage_m_cpio_c_gzip packimage_m_cpio_c_xz packimage_m_tar_c_gzip packimage_m_tar_c_xz -packimage_m_invalid_archive_method -packimage_m_invalid_compress_method +runcmdinstaller_command +get_xcat_postscripts_loginfo reg_linux_statelite_installation_flat SN_setup_case reg_linux_diskfull_installation_hierarchy diff --git a/xCAT-test/autotest/bundle/rhels7.4_ppc64le.bundle b/xCAT-test/autotest/bundle/rhels7.4_ppc64le.bundle index 1dacbd5cf..e458f98cf 100644 --- a/xCAT-test/autotest/bundle/rhels7.4_ppc64le.bundle +++ b/xCAT-test/autotest/bundle/rhels7.4_ppc64le.bundle @@ -357,10 +357,6 @@ rmimage_diskless updatenode_diskful_syncfiles_failing xdcp_nonroot_user xdsh_permission_denied -packimage_m_cpio_c_gzip -packimage_m_cpio_c_xz -packimage_m_tar_c_gzip -packimage_m_tar_c_xz packimage_m_invalid_archive_method packimage_m_invalid_compress_method confignetwork_vlan_false @@ -368,6 +364,12 @@ confignetwork__bridge_false nodeset_shell nodeset_cmdline nodeset_runimg +packimage_m_cpio_c_gzip +packimage_m_cpio_c_xz +packimage_m_tar_c_gzip +packimage_m_tar_c_xz +runcmdinstaller_command +get_xcat_postscripts_loginfo reg_linux_statelite_installation_flat SN_setup_case reg_linux_diskfull_installation_hierarchy diff --git a/xCAT-test/autotest/bundle/rhels7.4_x86_64.bundle b/xCAT-test/autotest/bundle/rhels7.4_x86_64.bundle index 7324d4b32..463675df4 100644 --- a/xCAT-test/autotest/bundle/rhels7.4_x86_64.bundle +++ b/xCAT-test/autotest/bundle/rhels7.4_x86_64.bundle @@ -38,10 +38,6 @@ packimage_o_p_a_m packimage_imagename packimage_h packimage_v -packimage_m_cpio_c_gzip -packimage_m_cpio_c_xz -packimage_m_tar_c_gzip -packimage_m_tar_c_xz packimage_m_invalid_archive_method packimage_m_invalid_compress_method pping_h @@ -298,6 +294,10 @@ confignetwork__bridge_false nodeset_shell nodeset_cmdline nodeset_runimg +packimage_m_cpio_c_gzip +packimage_m_cpio_c_xz +packimage_m_tar_c_gzip +packimage_m_tar_c_xz reg_linux_diskless_installation_flat reg_linux_statelite_installation_flat SN_setup_case diff --git a/xCAT-test/autotest/bundle/sles11.4_ppc64.bundle b/xCAT-test/autotest/bundle/sles11.4_ppc64.bundle index d129a70cb..93a61d8e9 100644 --- a/xCAT-test/autotest/bundle/sles11.4_ppc64.bundle +++ b/xCAT-test/autotest/bundle/sles11.4_ppc64.bundle @@ -279,12 +279,12 @@ updatenode_diskful_syncfiles_failing xdcp_nonroot_user xdsh_permission_denied reg_linux_diskless_installation_flat +packimage_m_invalid_archive_method +packimage_m_invalid_compress_method packimage_m_cpio_c_gzip packimage_m_cpio_c_xz packimage_m_tar_c_gzip packimage_m_tar_c_xz -packimage_m_invalid_archive_method -packimage_m_invalid_compress_method reg_linux_statelite_installation_flat SN_setup_case reg_linux_diskfull_installation_hierarchy diff --git a/xCAT-test/autotest/bundle/sles11.4_x86_64.bundle b/xCAT-test/autotest/bundle/sles11.4_x86_64.bundle index 8a5bcdd14..984deb670 100644 --- a/xCAT-test/autotest/bundle/sles11.4_x86_64.bundle +++ b/xCAT-test/autotest/bundle/sles11.4_x86_64.bundle @@ -237,15 +237,15 @@ updatenode_diskful_syncfiles_failing xdcp_nonroot_user xdsh_permission_denied reg_linux_diskless_installation_flat -packimage_m_cpio_c_gzip -packimage_m_cpio_c_xz -packimage_m_tar_c_gzip -packimage_m_tar_c_xz packimage_m_invalid_archive_method packimage_m_invalid_compress_method nodeset_shell nodeset_cmdline nodeset_runimg +packimage_m_cpio_c_gzip +packimage_m_cpio_c_xz +packimage_m_tar_c_gzip +packimage_m_tar_c_xz reg_linux_statelite_installation_flat SN_setup_case reg_linux_diskfull_installation_hierarchy diff --git a/xCAT-test/autotest/bundle/sles12.2_ppc64le.bundle b/xCAT-test/autotest/bundle/sles12.2_ppc64le.bundle index e424b8db1..72dd12d00 100644 --- a/xCAT-test/autotest/bundle/sles12.2_ppc64le.bundle +++ b/xCAT-test/autotest/bundle/sles12.2_ppc64le.bundle @@ -34,12 +34,6 @@ packimage_o_p_a_m packimage_imagename packimage_h packimage_v -packimage_m_cpio_c_gzip -packimage_m_cpio_c_pigz -packimage_m_cpio_c_xz -packimage_m_tar_c_pigz -packimage_m_tar_c_gzip -packimage_m_tar_c_xz packimage_m_invalid_archive_method packimage_m_invalid_compress_method pping_h @@ -254,6 +248,12 @@ xdsh_permission_denied nodeset_shell nodeset_cmdline nodeset_runimg +packimage_m_cpio_c_gzip +packimage_m_cpio_c_pigz +packimage_m_cpio_c_xz +packimage_m_tar_c_pigz +packimage_m_tar_c_gzip +packimage_m_tar_c_xz sles_migration1 sles_migration2 reg_linux_statelite_installation_flat diff --git a/xCAT-test/autotest/bundle/sles12.2_x86_64.bundle b/xCAT-test/autotest/bundle/sles12.2_x86_64.bundle index 9fc44f715..e76d2d630 100644 --- a/xCAT-test/autotest/bundle/sles12.2_x86_64.bundle +++ b/xCAT-test/autotest/bundle/sles12.2_x86_64.bundle @@ -253,14 +253,14 @@ nodeset_runimg sles_migration1 sles_migration2 reg_linux_diskless_installation_flat +packimage_m_invalid_archive_method +packimage_m_invalid_compress_method packimage_m_cpio_c_gzip packimage_m_cpio_c_pigz packimage_m_cpio_c_xz packimage_m_tar_c_pigz packimage_m_tar_c_gzip packimage_m_tar_c_xz -packimage_m_invalid_archive_method -packimage_m_invalid_compress_method reg_linux_statelite_installation_flat SN_setup_case reg_linux_diskfull_installation_hierarchy diff --git a/xCAT-test/autotest/bundle/ubuntu16.04.1_ppc64le.bundle b/xCAT-test/autotest/bundle/ubuntu16.04.1_ppc64le.bundle index 9a8f49bf5..e75157e51 100644 --- a/xCAT-test/autotest/bundle/ubuntu16.04.1_ppc64le.bundle +++ b/xCAT-test/autotest/bundle/ubuntu16.04.1_ppc64le.bundle @@ -25,12 +25,6 @@ packimage_o_p_a_m packimage_imagename packimage_h packimage_v -packimage_m_cpio_c_gzip -packimage_m_cpio_c_pigz -packimage_m_cpio_c_xz -packimage_m_tar_c_pigz -packimage_m_tar_c_gzip -packimage_m_tar_c_xz packimage_m_invalid_archive_method packimage_m_invalid_compress_method pping_h @@ -242,6 +236,12 @@ xdsh_permission_denied nodeset_shell nodeset_cmdline nodeset_runimg +packimage_m_cpio_c_gzip +packimage_m_cpio_c_pigz +packimage_m_cpio_c_xz +packimage_m_tar_c_pigz +packimage_m_tar_c_gzip +packimage_m_tar_c_xz ubuntu_migration1_p8le ubuntu_migration2_p8le diff --git a/xCAT-test/autotest/bundle/ubuntu16.04.1_x86_64.bundle b/xCAT-test/autotest/bundle/ubuntu16.04.1_x86_64.bundle index a8bee6335..5c755deab 100644 --- a/xCAT-test/autotest/bundle/ubuntu16.04.1_x86_64.bundle +++ b/xCAT-test/autotest/bundle/ubuntu16.04.1_x86_64.bundle @@ -21,12 +21,6 @@ packimage_o_p_a_m packimage_imagename packimage_h packimage_v -packimage_m_cpio_c_gzip -packimage_m_cpio_c_pigz -packimage_m_cpio_c_xz -packimage_m_tar_c_pigz -packimage_m_tar_c_gzip -packimage_m_tar_c_xz packimage_m_invalid_archive_method packimage_m_invalid_compress_method pping_h @@ -239,5 +233,11 @@ xdsh_permission_denied nodeset_shell nodeset_cmdline nodeset_runimg +packimage_m_cpio_c_gzip +packimage_m_cpio_c_pigz +packimage_m_cpio_c_xz +packimage_m_tar_c_pigz +packimage_m_tar_c_gzip +packimage_m_tar_c_xz ubuntu_migration1_vm ubuntu_migration2_vm From f55b3f867bf1b06f40c70dc7d53f324163a34fef Mon Sep 17 00:00:00 2001 From: yangsong Date: Thu, 8 Nov 2018 17:50:14 +0800 Subject: [PATCH 060/121] several issues on site.httpport in otherpks and ospkgs (#5777) * correct several issues * refine ospkgs to support site.httpport --- xCAT-server/lib/perl/xCAT/Template.pm | 30 +++++++++++++++++---------- xCAT/postscripts/ospkgs | 4 ++-- xCAT/postscripts/otherpkgs | 8 +++---- 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index 818cbf490..513a1a9e6 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -139,6 +139,13 @@ sub subvars { } $ENV{INSTALLDIR} = $installroot; + my $httpport; + $httpport = xCAT::TableUtils->get_site_attribute("httpport"); + if (!defined($httpport)) { + $httpport = "80"; + } + $ENV{HTTPPORT} = $httpport; + #replace the env with the right value so that correct include files can be found $inc =~ s/#ENV:([^#]+)#/envvar($1)/eg; @@ -282,6 +289,7 @@ sub subvars { $inc =~ s/#INCLUDE:([^#^\n]+)#/includefile($1, 0, 0)/eg; } + #support multiple paths of osimage in rh/sles diskfull installation my @pkgdirs; if (defined($media_dir)) { @@ -295,11 +303,11 @@ sub subvars { 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. - $source_in_pre .= "echo 'url --url http://'\$nextserver'/$pkgdir' >> /tmp/repos"; - $source .= "url --url http://#TABLE:noderes:\$NODE:nfsserver#/$pkgdir\n"; #For rhels5.9 + $source_in_pre .= "echo 'url --url http://'\$nextserver':$httpport/$pkgdir' >> /tmp/repos"; + $source .= "url --url http://#TABLE:noderes:\$NODE:nfsserver#:#TABLE:site:key=httpport:value#/$pkgdir\n"; #For rhels5.9 } else { - $source_in_pre .= "\necho 'repo --name=pkg$c --baseurl=http://'\$nextserver'/$pkgdir' >> /tmp/repos"; - $source .= "repo --name=pkg$c --baseurl=http://#TABLE:noderes:\$NODE:nfsserver#/$pkgdir\n"; #for rhels5.9 + $source_in_pre .= "\necho 'repo --name=pkg$c --baseurl=http://'\$nextserver':$httpport/$pkgdir' >> /tmp/repos"; + $source .= "repo --name=pkg$c --baseurl=http://#TABLE:noderes:\$NODE:nfsserver#:#TABLE:site:key=httpport:value#/$pkgdir\n"; #for rhels5.9 } my $distrepofile="/install/postscripts/repos/$pkgdir/local-repository.tmpl"; if( -f "$distrepofile"){ @@ -309,13 +317,13 @@ sub subvars { open($repofd,"<","$distrepofile"); $repo_in_post = <$repofd>; close($repofd); - $repo_in_post =~ s#baseurl=#baseurl=http://$master/#g; + $repo_in_post =~ s#baseurl=#baseurl=http://$master:$httpport/#g; $writerepo .= "\ncat >/etc/yum.repos.d/local-repository-$c.repo << 'EOF'\n"; $writerepo .="$repo_in_post\n"; $writerepo .="EOF\n"; } } elsif ($platform =~ /^(sles|suse)/) { - my $http = "http://#TABLE:noderes:\$NODE:nfsserver#$pkgdir"; + my $http = "http://#TABLE:noderes:\$NODE:nfsserver#:#TABLE:site:key=httpport:value#$pkgdir"; $source .= " $http SuSE-Linux-pkg$c @@ -323,7 +331,7 @@ sub subvars { false SuSE-Linux-pkg$c "; - $source_in_pre .= "http://'\$nextserver'$pkgdirSuSE-Linux-pkg$c/falseSuSE-Linux-pkg$c"; + $source_in_pre .= "http://'\$nextserver':$httpport$pkgdirSuSE-Linux-pkg$c/falseSuSE-Linux-pkg$c"; } elsif ($platform =~ /^sle15*/) { if ( -d "$pkgdir") { opendir(DIR,$pkgdir); @@ -339,7 +347,7 @@ sub subvars { $product_name=$subdir; } if (defined($product_name) && defined($product_dir)){ - $source .="http://XCATNEXTSERVERHOOK$pkgdir$product_name/$product_dir"; + $source .="http://XCATNEXTSERVERHOOK:$httpport$pkgdir$product_name/$product_dir"; } } } @@ -392,7 +400,7 @@ sub subvars { $inc =~ s/#UNCOMMENTOENABLESSH#/ /g; } - my $sles_sdk_media = "http://" . $tmpl_hash->{tftpserver} . $media_dir . "/sdk1"; + my $sles_sdk_media = "http://" . $tmpl_hash->{tftpserver}.':'.$httpport . $media_dir . "/sdk1"; $inc =~ s/#SLES_SDK_MEDIA#/$sles_sdk_media/eg; @@ -531,7 +539,7 @@ sub subvars { } } elsif ("ubuntu" eq $platform) { - my $default_script = " wget http://`cat /tmp/xcatserver`" . $ENV{INSTALLDIR} . "/autoinst/getinstdisk; chmod u+x getinstdisk; ./getinstdisk;"; + my $default_script = " wget http://`cat /tmp/xcatserver`".':'.$ENV{HTTPPORT} . $ENV{INSTALLDIR} . "/autoinst/getinstdisk; chmod u+x getinstdisk; ./getinstdisk;"; $inc =~ s/#INCLUDE_GET_INSTALL_DISK_SCRIPT#/$default_script/; } else { @@ -1117,7 +1125,7 @@ sub mirrorspec { if (!$pkgdir) { $pkgdir = $_; } else { - my $osuurl = "http://" . $masternode . $_ . " ./"; + my $osuurl = "http://" . $masternode.':'.$ENV{httpport} . $_ . " ./"; push @mirrors, $osuurl; } } diff --git a/xCAT/postscripts/ospkgs b/xCAT/postscripts/ospkgs index f3dfea148..ea5e414e9 100755 --- a/xCAT/postscripts/ospkgs +++ b/xCAT/postscripts/ospkgs @@ -250,7 +250,7 @@ do OSPKGDIR="$OSPKGDIR" if [ $mounted -eq 0 ]; then #OSPKGDIR="$OSPKGDIR" - ospkgdir="$NFSSERVER$dir" + ospkgdir="${NFSSERVER}:${HTTPPORT}$dir" else ospkgdir="$dir" fi @@ -632,7 +632,7 @@ elif ( pmatch "$OSVER" "sle*" ); then for sdk_src in $SDKDIR; do bname=`basename $sdk_src` if [ $mounted -eq 0 ]; then - sdk_src="http://$NFSSERVER/$sdk_src" + sdk_src="http://$NFSSERVER:$HTTPPORT/$sdk_src" else sdk_src="file://$sdk_src" fi diff --git a/xCAT/postscripts/otherpkgs b/xCAT/postscripts/otherpkgs index 8865990b7..abb4b3219 100755 --- a/xCAT/postscripts/otherpkgs +++ b/xCAT/postscripts/otherpkgs @@ -290,7 +290,7 @@ fi #when it is not set, we need to figure it out here if [ -z "$OTHERPKGDIR" ]; then if [ $mounted -eq 0 ]; then - OTHERPKGDIR="$NFSSERVER$INSTALLDIR/post/otherpkgs/$OSVER/$ARCH" + OTHERPKGDIR="${NFSSERVER}:${HTTPPORT}$INSTALLDIR/post/otherpkgs/$OSVER/$ARCH" else OTHERPKGDIR="$INSTALLDIR/post/otherpkgs/$OSVER/$ARCH" fi @@ -300,7 +300,7 @@ if [ -z "$OTHERPKGDIR" ]; then fi else if [ $mounted -eq 0 ]; then - OTHERPKGDIR=${NFSSERVER}${OTHERPKGDIR} + OTHERPKGDIR=${NFSSERVER}:${HTTPPORT}${OTHERPKGDIR} fi fi @@ -331,7 +331,7 @@ fi OSPKGDIR="$OSPKGDIR" if [ $mounted -eq 0 ]; then #OSPKGDIR="$OSPKGDIR" - ospkgdir="$NFSSERVER$dir" + ospkgdir="${NFSSERVER}:${HTTPPORT}$dir" else ospkgdir="$dir" fi @@ -523,7 +523,7 @@ if ( ! ( pmatch "$OSVER" "sles10*" ) && [ $haszypper -eq 1 ] ); then for sdk_src in $SDKDIR; do bname=`basename $sdk_src` if [ $mounted -eq 0 ]; then - sdk_src="http://$NFSSERVER/$sdk_src" + sdk_src="http://${NFSSERVER}:${HTTPPORT}/$sdk_src" else sdk_src="file://$sdk_src" fi From cfdce8a7a5466798b1ae7f4bbd2857af69b3d698 Mon Sep 17 00:00:00 2001 From: Yuan Bai Date: Fri, 9 Nov 2018 14:12:56 +0800 Subject: [PATCH 061/121] fix 5733 genimage in ubuntu16.04.5 failure (#5781) --- .../share/xcat/netboot/ubuntu/compute.ubuntu16.04.pkglist | 1 - .../xcat/netboot/ubuntu/compute.ubuntu16.04.ppc64el.pkglist | 1 - .../share/xcat/netboot/ubuntu/compute.ubuntu16.04.x86_64.pkglist | 1 - 3 files changed, 3 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.pkglist b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.pkglist index 1eb4bf416..194157acc 100644 --- a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.pkglist +++ b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.pkglist @@ -6,7 +6,6 @@ linux-image-generic-lts-xenial openssh-server openssh-client wget -vim ntp rsyslog rsync diff --git a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.ppc64el.pkglist b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.ppc64el.pkglist index df556b887..5bf569fd1 100644 --- a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.ppc64el.pkglist +++ b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.ppc64el.pkglist @@ -7,7 +7,6 @@ linux-image-generic openssh-server openssh-client wget -vim ntp ntpdate rsync diff --git a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.x86_64.pkglist b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.x86_64.pkglist index df556b887..5bf569fd1 100644 --- a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.x86_64.pkglist +++ b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.x86_64.pkglist @@ -7,7 +7,6 @@ linux-image-generic openssh-server openssh-client wget -vim ntp ntpdate rsync From 92c019bdb39066c685784b059bc2af4073e666d7 Mon Sep 17 00:00:00 2001 From: yangsong Date: Fri, 9 Nov 2018 15:28:17 +0800 Subject: [PATCH 062/121] set default value for $::XCATSITEVALS{httpport} if site.httpport is not specified (#5780) --- perl-xCAT/xCAT/Client.pm | 5 +++++ xCAT-server/lib/perl/xCAT/Template.pm | 20 ++++++++++---------- xCAT-server/sbin/xcatd | 4 ++++ 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/perl-xCAT/xCAT/Client.pm b/perl-xCAT/xCAT/Client.pm index e6b1e1d04..fc778c721 100644 --- a/perl-xCAT/xCAT/Client.pm +++ b/perl-xCAT/xCAT/Client.pm @@ -1037,6 +1037,11 @@ sub populate_site_hash { foreach (@records) { $::XCATSITEVALS{ $_->{key} } = $_->{value}; } + + unless (exists($::XCATSITEVALS{'httpport'}) and ($::XCATSITEVALS{'httpport'} ne "")){ + $::XCATSITEVALS{'httpport'}="80"; + } + } diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index 513a1a9e6..c43753b27 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -146,7 +146,7 @@ sub subvars { } $ENV{HTTPPORT} = $httpport; - + my $httpportsuffix=":$httpport"; #replace the env with the right value so that correct include files can be found $inc =~ s/#ENV:([^#]+)#/envvar($1)/eg; my $res; @@ -303,11 +303,11 @@ sub subvars { 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. - $source_in_pre .= "echo 'url --url http://'\$nextserver':$httpport/$pkgdir' >> /tmp/repos"; - $source .= "url --url http://#TABLE:noderes:\$NODE:nfsserver#:#TABLE:site:key=httpport:value#/$pkgdir\n"; #For rhels5.9 + $source_in_pre .= "echo 'url --url http://'\$nextserver'$httpportsuffix/$pkgdir' >> /tmp/repos"; + $source .= "url --url http://#TABLE:noderes:\$NODE:nfsserver#$httpportsuffix/$pkgdir\n"; #For rhels5.9 } else { - $source_in_pre .= "\necho 'repo --name=pkg$c --baseurl=http://'\$nextserver':$httpport/$pkgdir' >> /tmp/repos"; - $source .= "repo --name=pkg$c --baseurl=http://#TABLE:noderes:\$NODE:nfsserver#:#TABLE:site:key=httpport:value#/$pkgdir\n"; #for rhels5.9 + $source_in_pre .= "\necho 'repo --name=pkg$c --baseurl=http://'\$nextserver'$httpportsuffix/$pkgdir' >> /tmp/repos"; + $source .= "repo --name=pkg$c --baseurl=http://#TABLE:noderes:\$NODE:nfsserver#$httpportsuffix/$pkgdir\n"; #for rhels5.9 } my $distrepofile="/install/postscripts/repos/$pkgdir/local-repository.tmpl"; if( -f "$distrepofile"){ @@ -317,13 +317,13 @@ sub subvars { open($repofd,"<","$distrepofile"); $repo_in_post = <$repofd>; close($repofd); - $repo_in_post =~ s#baseurl=#baseurl=http://$master:$httpport/#g; + $repo_in_post =~ s#baseurl=#baseurl=http://$master$httpportsuffix/#g; $writerepo .= "\ncat >/etc/yum.repos.d/local-repository-$c.repo << 'EOF'\n"; $writerepo .="$repo_in_post\n"; $writerepo .="EOF\n"; } } elsif ($platform =~ /^(sles|suse)/) { - my $http = "http://#TABLE:noderes:\$NODE:nfsserver#:#TABLE:site:key=httpport:value#$pkgdir"; + my $http = "http://#TABLE:noderes:\$NODE:nfsserver#$httpportsuffix/$pkgdir"; $source .= " $http SuSE-Linux-pkg$c @@ -331,7 +331,7 @@ sub subvars { false SuSE-Linux-pkg$c "; - $source_in_pre .= "http://'\$nextserver':$httpport$pkgdirSuSE-Linux-pkg$c/falseSuSE-Linux-pkg$c"; + $source_in_pre .= "http://'\$nextserver'$httpportsuffix$pkgdirSuSE-Linux-pkg$c/falseSuSE-Linux-pkg$c"; } elsif ($platform =~ /^sle15*/) { if ( -d "$pkgdir") { opendir(DIR,$pkgdir); @@ -347,7 +347,7 @@ sub subvars { $product_name=$subdir; } if (defined($product_name) && defined($product_dir)){ - $source .="http://XCATNEXTSERVERHOOK:$httpport$pkgdir$product_name/$product_dir"; + $source .="http://XCATNEXTSERVERHOOK$httpportsuffix$pkgdir$product_name/$product_dir"; } } } @@ -400,7 +400,7 @@ sub subvars { $inc =~ s/#UNCOMMENTOENABLESSH#/ /g; } - my $sles_sdk_media = "http://" . $tmpl_hash->{tftpserver}.':'.$httpport . $media_dir . "/sdk1"; + my $sles_sdk_media = "http://" . $tmpl_hash->{tftpserver}.$httpportsuffix . $media_dir . "/sdk1"; $inc =~ s/#SLES_SDK_MEDIA#/$sles_sdk_media/eg; diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index 5ecc294de..0f55e83c6 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -2625,6 +2625,10 @@ sub populate_site_hash { foreach (@records) { $::XCATSITEVALS{ $_->{key} } = $_->{value}; } + + unless (exists($::XCATSITEVALS{'httpport'}) and ($::XCATSITEVALS{'httpport'} ne "")){ + $::XCATSITEVALS{'httpport'}="80"; + } } sub populate_vpd_hash { From 5db2dbd62cad9ba4aa1c7d9845260245466d1ca8 Mon Sep 17 00:00:00 2001 From: Yuan Bai Date: Fri, 9 Nov 2018 17:03:58 +0800 Subject: [PATCH 063/121] fix5209 nodeset cannot find pxelinux.0 (#5783) * distro pxelinux.0 default path is changed in ubuntu 16.04 --- xCAT-server/lib/xcat/plugins/mknb.pm | 4 ++++ xCAT-server/lib/xcat/plugins/pxe.pm | 21 ++++++++------------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/mknb.pm b/xCAT-server/lib/xcat/plugins/mknb.pm index b352f6a5f..a24ad1870 100644 --- a/xCAT-server/lib/xcat/plugins/mknb.pm +++ b/xCAT-server/lib/xcat/plugins/mknb.pm @@ -253,6 +253,10 @@ sub process_request { copy("/usr/lib/syslinux/pxelinux.0", "$tftpdir/pxelinux.0"); } elsif (-r "/usr/share/syslinux/pxelinux.0") { copy("/usr/share/syslinux/pxelinux.0", "$tftpdir/pxelinux.0"); + } elsif ("/usr/lib/PXELINUX/pxelinux.0") { + copy("/usr/lib/PXELINUX/pxelinux.0", "$tftpdir/pxelinux.0"); + } else { + copy("/opt/xcat/share/xcat/netboot/syslinux/pxelinux.0", "$tftpdir/pxelinux.0"); } if (-r "$tftpdir/pxelinux.0") { chmod(0644, "$tftpdir/pxelinux.0"); diff --git a/xCAT-server/lib/xcat/plugins/pxe.pm b/xCAT-server/lib/xcat/plugins/pxe.pm index 0031d9bdf..dab9cbe81 100644 --- a/xCAT-server/lib/xcat/plugins/pxe.pm +++ b/xCAT-server/lib/xcat/plugins/pxe.pm @@ -478,24 +478,19 @@ sub process_request { } #end prescripts code - if (!-r "$tftpdir/pxelinux.0") { - unless (-r "/usr/lib/syslinux/pxelinux.0" or -r "/usr/share/syslinux/pxelinux.0") { - $::PXE_callback->({ error => ["Unable to find pxelinux.0 "], errorcode => [1] }); - return; + my @pxelinuxpaths=("/usr/lib/syslinux/pxelinux.0","/usr/share/syslinux/pxelinux.0","/usr/lib/PXELINUX/pxelinux.0","/opt/xcat/share/xcat/netboot/syslinux/pxelinux.0"); + foreach $path (@pxelinuxpaths) { + if (-r "$path") { + copy("$path","$globaltftpdir/pxelinux.0"); + chmod(0644, "$globaltftpdir/pxelinux.0"); + last; } - if (-r "/usr/lib/syslinux/pxelinux.0") { - copy("/usr/lib/syslinux/pxelinux.0", "$tftpdir/pxelinux.0"); - } else { - copy("/usr/share/syslinux/pxelinux.0", "$tftpdir/pxelinux.0"); - } - chmod(0644, "$tftpdir/pxelinux.0"); } - unless (-r "$tftpdir/pxelinux.0") { - $::PXE_callback->({ errror => ["Unable to find pxelinux.0 from syslinux"], errorcode => [1] }); + unless (-r "$globaltftpdir/pxelinux.0") { + $::PXE_callback->({ errror => ["Unable to find pxelinux.0 from syslinux or pxelinux"], errorcode => [1] }); return; } - $errored = 0; my %bphash; my $inittime = 0; From 5559e44b4aa9dd3886ef04d9af3295a4a29d05c4 Mon Sep 17 00:00:00 2001 From: Weihua Hu Date: Fri, 9 Nov 2018 18:25:28 +0800 Subject: [PATCH 064/121] enhance xcattest for issue 5773 and task 383 (#5782) --- xCAT-test/xcattest | 215 +++++++++++++++++++++++++-------------------- 1 file changed, 121 insertions(+), 94 deletions(-) diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index 4923db1c4..2c8894661 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -71,7 +71,7 @@ my $restore = 0; my $quiet = 0; my $search_expression = undef; -my %label_map; +my @total_label_set=(); my %case_label_map; my @label_order = (["xcat_install"], ["mn_only"], @@ -169,11 +169,17 @@ if ($rst) { } if($search_expression){ - $rst = scan_existed_labels(\%case_label_map, \%label_map, \$error); + $rst = scan_existed_labels(\%case_label_map, \@total_label_set, \$error); if($rst) { log_this($running_log_fd, "$error"); to_exit(1); } + if($xcatdebug){ + print "------The total labels are:---------\n"; + print Dumper \@total_label_set; + print "------The case and its labels:-------\n"; + print Dumper \%case_label_map + } } $rst = calculate_cases_to_be_run(\@cases_to_be_run, \$error); @@ -247,19 +253,22 @@ if (defined $list) { to_exit(1); } } elsif ($list eq "labelinfo"){ - $rst = scan_existed_labels(\%case_label_map, \%label_map, \$error); + $rst = scan_existed_labels(\%case_label_map, \@total_label_set, \$error); + if($xcatdebug){ + print "------The total labels are:---------\n"; + print Dumper \@total_label_set; + print "------The case and its labels:-------\n"; + print Dumper \%case_label_map + } my %label_conut; my %case_label_str_map; foreach my $case (keys %case_label_map){ - if($case_label_map{$case}{label_str}){ - $case_label_str_map{$case} = $case_label_map{$case}{label_str}; - my @labels = split(",", $case_label_map{$case}{label_str}); - foreach my $label (@labels){ - if(!exists $label_conut{$label}){ - $label_conut{$label}=1; - }else{ - $label_conut{$label}+=1; - } + $case_label_str_map{$case} = join (",", @{$case_label_map{$case}{labels}}); + foreach my $label (@{$case_label_map{$case}{labels}}){ + if(!exists $label_conut{$label}){ + $label_conut{$label}=1; + }else{ + $label_conut{$label}+=1; } } } @@ -268,7 +277,7 @@ if (defined $list) { log_this($running_log_fd, "The labels of cases:"); log_this($running_log_fd, "-------------------------------"); print_table(\%case_label_str_map); - my $label_total_num=keys %label_conut; + my $label_total_num=@total_label_set; log_this($running_log_fd, "\n-------------------------------"); log_this($running_log_fd, "There are $label_total_num different labels"); log_this($running_log_fd, "The number of cases of each label:"); @@ -276,9 +285,20 @@ if (defined $list) { print_table(\%label_conut); log_this($running_log_fd, "-------------------------------"); my $total_case = keys %case_label_map; - my $case_with_label_num = keys %case_label_str_map; - log_this($running_log_fd, "There are $total_case cases totaly, there are $case_with_label_num cases with label."); - + my @cases_without_manual_labels=(); + foreach my $case ( keys %case_label_map){ + if(! exists ($case_label_map{$case}{manual_labels})){ + push @cases_without_manual_labels, $case; + } + } + my $case_without_manual_label_num = @cases_without_manual_labels; + log_this($running_log_fd, "There are $total_case cases totaly, there are $case_without_manual_label_num cases without manual label."); + log_this($running_log_fd, "-------------------------------"); + log_this($running_log_fd, "The cases without manual label are:"); + log_this($running_log_fd, "-------------------------------"); + foreach my $case (sort @cases_without_manual_labels){ + print "$case\n"; + } } to_exit(0); @@ -1914,7 +1934,7 @@ sub gettablevalue sub print_table { my $msg_ref = shift; - my $desiredwidth = 120; + my $desiredwidth = 160; my $screenwidth = (`tput cols` + 0); my $finallen = ($screenwidth > $desiredwidth ? $desiredwidth : $screenwidth); @@ -1995,85 +2015,51 @@ sub filter_case_by_label { my $rest_cases_to_be_run_ref = shift; my $error_ref = shift; - my @filters = (); - my $rst = parse_filters(\@filters, $error_ref); - if($rst){ - return 1; - } - #print Dumper \@filters; - my @targetcases = (); foreach my $case (keys %{$case_label_map_ref}) { if(@$cases_to_be_run_ref){ - next unless(grep { /^$case$/ } @$cases_to_be_run_ref); + next unless(inarray($cases_to_be_run_ref, $case)); } - foreach my $f (@filters) { - my $hit = 1; - foreach my $c (@$f) { - if (($c > 0) and (($case_label_map_ref->{$case}->{label} & $c) == 0)) { - $hit = 0; - last; - } elsif (($c < 0) and (($case_label_map_ref->{$case}->{label} & ($c * -1)) != 0)) { - $hit = 0; - last; + my $match_filter=0; + my @exps = split('\|', $search_expression); + foreach my $e (@exps) { + $e =~ s/\+/ /g; + $e =~ s/\-/ -/g; + my $match_sub_filter = 1; + my @tags = split(' ', $e); + foreach my $t (@tags) { + if ($t =~ /^-(.+)/) { + $match_sub_filter = 0 if (inarray ($case_label_map_ref->{$case}->{labels}, $1)); + }else{ + $match_sub_filter = 0 unless (inarray ($case_label_map_ref->{$case}->{labels}, $t)); } + last unless ($match_sub_filter); } - push @targetcases, $case if ($hit and !(grep { /^$case$/ } @targetcases)); - } - } + if ($match_sub_filter){ + $match_filter =1; + last; + } + } + push @targetcases, $case if ($match_filter); + } #print Dumper \@targetcases; + #order cases which matches filters by Vertical Dimension Labels for (my $i = 0 ; $i <= $#label_order ; $i++) { foreach my $l (@{ $label_order[$i] }) { foreach my $c (@targetcases) { - push @{$rest_cases_to_be_run_ref}, $c if (defined ($label_map{$l}) && (($case_label_map_ref->{$c}->{label} & $label_map{$l}) != 0)); + push @{$rest_cases_to_be_run_ref}, $c if (inarray($case_label_map_ref->{$c}->{labels}, $l)); } } } return 0; } -sub parse_filters{ - my $filters_ref=shift; - my $error_ref=shift; - - my $index = 0; - my @undefined_labels; - my @exps = split('\|', $search_expression); - foreach my $e (@exps) { - $e =~ s/\+/ /g; - $e =~ s/\-/ -/g; - my @tags = split(' ', $e); - foreach my $t (@tags) { - if ($t =~ /^-(.+)/) { - my $tmpt = $1; - unless (grep { /^$tmpt$/ } keys(%label_map)) { - push @undefined_labels, $tmpt; - next; - } - push @{ $filters_ref->[$index] }, ($label_map{$tmpt} * -1); - } else { - unless (grep { /^$t$/ } keys(%label_map)) { - push @undefined_labels, $t; - next; - } - push @{ $filters_ref->[$index] }, $label_map{$t}; - } - } - $index += 1; - } - -# if (@undefined_labels) { -# $$error_ref = "Label \"" . join(",", @undefined_labels) . "\" are not exist. Existed labels are: " . join(" ", keys(%label_map)); -# return 1; -# } - return 0; -} sub scan_existed_labels { my $case_label_map_ref = shift; - my $label_map_ref = shift; + my $total_label_set_ref = shift; my $error_ref = shift; my $label_value = 1; @@ -2084,6 +2070,8 @@ sub scan_existed_labels { foreach my $file (@files) { my @output = runcmd("grep -E \"^start:|^hcp:|^os:|^arch:|^label:\" $file"); my $current_case_name = ""; + my $cmd_cases_belong_to = calculate_case_belong_to_which_cmd($file); + #print "cmd_cases_belong_to = $cmd_cases_belong_to\n"; foreach my $line (@output) { $line =~ s/^\s+|#[^!].+|\s+$//g; @@ -2093,45 +2081,84 @@ sub scan_existed_labels { my @labels = (); if ($line =~ /^start\s*:\s*(.*)/) { $current_case_name = $1; - $case_label_map_ref->{$current_case_name}->{label} = 0; - $case_label_map_ref->{$current_case_name}->{label_str} = ""; + if ($cmd_cases_belong_to){ + $case_label_map_ref->{$current_case_name}->{labels} = [$cmd_cases_belong_to]; + push @$total_label_set_ref, $cmd_cases_belong_to unless(inarray($total_label_set_ref, $cmd_cases_belong_to)); + }else{ + $case_label_map_ref->{$current_case_name}->{labels} = []; + } } elsif ($line =~ /^os\s*:\s*(\w[\w\, ]+)/) { my @oss = split(",", $1); foreach my $os (@oss) { $os =~ s/^\s+|\s+$//g; - push @labels, "os=$os"; + my $label_str = lc("os=$os"); + push @{$case_label_map_ref->{$current_case_name}->{labels}}, $label_str unless(inarray($case_label_map_ref->{$current_case_name}->{labels}, $label_str)); + push @$total_label_set_ref, $label_str unless(inarray($total_label_set_ref, $label_str)); } + } elsif ($line =~ /^arch\s*:\s*(\w[\w\, ]+)/) { my @archs = split(",", $1); foreach my $arch (@archs) { $arch =~ s/^\s+|\s+$//g; - push @labels, "arch=$arch"; + my $label_str = lc("arch=$arch"); + push @{$case_label_map_ref->{$current_case_name}->{labels}}, $label_str unless(inarray($case_label_map_ref->{$current_case_name}->{labels}, $label_str)); + push @$total_label_set_ref, $label_str unless(inarray($total_label_set_ref, $label_str)); } } elsif ($line =~ /^hcp\s*:\s*(\w[\w\, ]+)/) { my @hcps = split(",", $1); foreach my $hcp (@hcps) { $hcp =~ s/^\s+|\s+$//g; - push @labels, "hcp=$hcp"; + my $label_str = lc("hcp=$hcp"); + push @{$case_label_map_ref->{$current_case_name}->{labels}}, $label_str unless(inarray($case_label_map_ref->{$current_case_name}->{labels}, $label_str)); + push @$total_label_set_ref, $label_str unless(inarray($total_label_set_ref, $label_str)); + } } elsif ($line =~ /^label\s*:\s*(.+)/) { my @tmp = split(",", $1); - foreach my $l (@tmp){ - $l =~ s/^\s+|\s+$//g; - push @labels, $l; - } - } - - if($current_case_name){ - foreach my $t (@labels) { - unless (exists $label_map_ref->{$t}) { - $label_map_ref->{$t} = $label_value; - $label_value *= 2; - } - $case_label_map_ref->{$current_case_name}->{label} |= $label_map_ref->{$t}; - $case_label_map_ref->{$current_case_name}->{label_str} .= "$t,"; + foreach my $label_str (@tmp){ + $label_str =~ s/^\s+|\s+$//g; + push @{$case_label_map_ref->{$current_case_name}->{labels}}, $label_str unless(inarray($case_label_map_ref->{$current_case_name}->{labels}, $label_str)); + push @{$case_label_map_ref->{$current_case_name}->{manual_labels}},$label_str unless(inarray($case_label_map_ref->{$current_case_name}->{manual_labels}, $label_str)); + push @$total_label_set_ref, $label_str unless(inarray($total_label_set_ref, $label_str)); } } } + } return 0; } + +sub calculate_case_belong_to_which_cmd { + my $file_path = shift; + my $command = undef; + + if ($file_path =~ "\/autotest\/testcase") { + my @path_str = split("/", $file_path); + #print Dumper \@path_str; + my $index = 0; + foreach my $str (@path_str) { + if ($str =~ "autotest") { + $index += 1; + last; + } + $index += 1; + } + #print "index=$index\n"; + $command = lc($path_str[ $index + 1 ]); + } + return $command; +} + +sub inarray{ + my $array = shift; + my $element = shift; + my $hit = 0; + + foreach my $e (@$array){ + if (lc("$e") eq lc("$element")){ + $hit = 1; + last; + } + } + return $hit; +} From 7f0ed6caee9620aa51ab8048c1fce328128f3b07 Mon Sep 17 00:00:00 2001 From: yangsong Date: Fri, 9 Nov 2018 18:35:14 +0800 Subject: [PATCH 065/121] remove mistake breaks (#5784) --- xCAT/postscripts/xcatdsklspost | 3 --- 1 file changed, 3 deletions(-) diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index 7147d2fb7..38ac8ca6a 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -380,7 +380,6 @@ if [ "$MODE" = "4" ]; then # for statelite mode else echo "XCATSERVER=$XCATSERVER" >> /opt/xcat/xcatinfo fi - break elif [ "$KEY" = "XCATHTTPPORT" ]; then HTTPPORT=`echo $i | awk -F= '{print $2}'` grep 'HTTPPORT' /opt/xcat/xcatinfo > /dev/null 2>&1 @@ -389,8 +388,6 @@ if [ "$MODE" = "4" ]; then # for statelite mode else echo "HTTPPORT=$HTTPPORT" >> /opt/xcat/xcatinfo fi - break - fi done From 239ffd7eb78666f0f60698ef9edb8d8f121db378 Mon Sep 17 00:00:00 2001 From: Yuan Bai Date: Mon, 12 Nov 2018 15:22:14 +0800 Subject: [PATCH 066/121] fix 5789 xcatlib.sh: line 186: &0 : syntax error (#5790) --- xCAT/postscripts/xcatlib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT/postscripts/xcatlib.sh b/xCAT/postscripts/xcatlib.sh index afa5bcf87..e8f9859ab 100755 --- a/xCAT/postscripts/xcatlib.sh +++ b/xCAT/postscripts/xcatlib.sh @@ -107,7 +107,7 @@ function v4prefix2mask(){ local num_index=1 local str_temp='' local str_mask='' - + [ ! $a ] && a=0 while [[ $num_index -le 4 ]] do if [ $a -ge 8 ];then From c8a1e02afbaf889cbe4502279f3ad4b8bf5661f3 Mon Sep 17 00:00:00 2001 From: litingt Date: Mon, 12 Nov 2018 03:16:06 -0500 Subject: [PATCH 067/121] do task395, update xcat-inventory cases for code design change -- fix the output change --- .../testcase/xcat-inventory/cases.environment | 4 +- .../testcase/xcat-inventory/cases.nics | 4 +- .../testcase/xcat-inventory/cases.osimage | 39 ++++++++----------- 3 files changed, 20 insertions(+), 27 deletions(-) diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.environment b/xCAT-test/autotest/testcase/xcat-inventory/cases.environment index 2c057ec18..2fd08a52a 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.environment +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.environment @@ -112,7 +112,7 @@ check:rc==0 cmd:xcat-inventory export -t osimage -o test.environments.osimage -f /tmp/export/test.environments.osimage.yaml --format yaml check:rc==0 check:output=~The inventory data has been dumped to /tmp/export/test.environments.osimage.yaml -cmd:diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml /tmp/export/test.environments.osimage.yaml --ignore-blank-lines -I "^#" +cmd:#! /bin/bash diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml /tmp/export/test.environments.osimage.yaml --ignore-blank-lines -I "^#" -I "schema_version" check:rc==0 cmd:rmdef -t osimage -o test.environments.osimage check:rc==0 @@ -131,7 +131,7 @@ cmd:diff -y /tmp/export/test.environments.osimage.json.stanza /opt/xcat/share/xc check:rc==0 cmd:xcat-inventory export -t osimage -o test.environments.osimage -f /tmp/export/test.environments.osimage.json check:rc==0 -cmd:diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json /tmp/export/test.environments.osimage.json --ignore-blank-lines -I "^#" +cmd:#! /bin/bash diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json /tmp/export/test.environments.osimage.json --ignore-blank-lines -I "^#" -I "schema_version" check:rc==0 cmd:dir="/tmp/export"; rm -rf $dir; if [ -d ${dir}".bak" ];then mv ${dir}".bak" $dir; fi cmd: rmdef -t osimage -o test.environments.osimage diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.nics b/xCAT-test/autotest/testcase/xcat-inventory/cases.nics index ca205dce8..8a9af9526 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.nics +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.nics @@ -9,11 +9,11 @@ check:rc==0 cmd:xcat-inventory export -t node -o testnodes -f /tmp/export/nics.yaml --format yaml check:rc==0 check:output=~The inventory data has been dumped to /tmp/export/nics.yaml -cmd:diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/nics.yaml /tmp/export/nics.yaml --ignore-blank-lines -I "^#" +cmd:#! /bin/bash diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/nics.yaml /tmp/export/nics.yaml --ignore-blank-lines -I "^#" -I "schema_version" check:rc==0 cmd:xcat-inventory export -t node -o testnodes -f /tmp/export/nics.json --format json check:rc==0 -cmd:diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/nics.json /tmp/export/nics.json --ignore-blank-lines -I "^#" +cmd:#! /bin/bash diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/nics.json /tmp/export/nics.json --ignore-blank-lines -I "^#" -I "schema_version" check:rc==0 cmd:tabch -d node="testnodes" nics check:rc==0 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage b/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage index 953649020..cce5a594b 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage @@ -28,7 +28,7 @@ cmd: scp $$DSTMN:/tmp/export_import_single_osimage_by_yaml_$$DSTMN/dst_bogus_ima check:rc==0 cmd: cat /tmp/export_import_single_osimage_by_yaml/dst_bogus_image.stanza check:rc==0 -cmd:diff -y /tmp/export_import_single_osimage_by_yaml/src_bogus_osimage.stanza /tmp/export_import_single_osimage_by_yaml/dst_bogus_image.stanza +cmd:diff -y /tmp/export_import_single_osimage_by_yaml/src_bogus_osimage.stanza /tmp/export_import_single_osimage_by_yaml/dst_bogus_image.stanza -I "environvar" check:rc==0 cmd:ssh $$DSTMN 'rmdef -t osimage -o bogus_image' check:rc==0 @@ -72,7 +72,7 @@ cmd: scp $$DSTMN:/tmp/export_import_single_osimage_by_json_$$DSTMN/dst_bogus_ima check:rc==0 cmd: cat /tmp/export_import_single_osimage_by_json/dst_bogus_image.stanza check:rc==0 -cmd:diff -y /tmp/export_import_single_osimage_by_json/src_bogus_osimage.stanza /tmp/export_import_single_osimage_by_json/dst_bogus_image.stanza +cmd:diff -y /tmp/export_import_single_osimage_by_json/src_bogus_osimage.stanza /tmp/export_import_single_osimage_by_json/dst_bogus_image.stanza -I "environvar" check:rc==0 cmd:ssh $$DSTMN 'rmdef -t osimage -o bogus_image' check:rc==0 @@ -99,27 +99,27 @@ cmd:chdef -t osimage -o bogus_image addkcmdline=addkcmdline boottarget=boottarge check:rc==0 cmd:xcat-inventory export -t osimage |tee /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file check:rc==0 -cmd:grep ' "osimage": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +cmd:grep "osimage:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file check:rc==0 -cmd:grep '"bogus_image": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +cmd:grep "bogus_image:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file check:rc==0 -cmd: grep '"node": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +cmd: grep -w "node:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file check:rc!=0 -cmd: grep '"obj_type": "node",' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +cmd: grep "obj_type: node" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file check:rc!=0 -cmd: grep '"policy": {'' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +cmd: grep "policy:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file check:rc!=0 -cmd: grep '"passwd": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +cmd: grep "passwd:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file check:rc!=0 -cmd: grep '"network": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +cmd: grep "network:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file check:rc!=0 -cmd: grep '"route": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +cmd: grep "route:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file check:rc!=0 -cmd: grep '"site": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +cmd: grep "site:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file check:rc!=0 cmd:lsdef -t osimage |tee /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/osimage_in_xcat_db check:rc==0 -cmd: a=0;for i in `awk -F' ' '{print $1}' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/osimage_in_xcat_db`; do if grep -E "\"$i\": {" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file > /dev/null; then ((a++));fi; done; do=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/osimage_in_xcat_db|wc -l);if [[ $do -eq $a ]]; then exit 0; else exit 1;fi +cmd: a=0;for i in `awk -F' ' '{print $1}' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/osimage_in_xcat_db`; do if grep -E "$i:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file > /dev/null; then ((a++));fi; done; do=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/osimage_in_xcat_db|wc -l);if [[ $do -eq $a ]]; then exit 0; else exit 1;fi check:rc==0 cmd: rmdef -t osimage -o bogus_image check:rc==0 @@ -437,7 +437,7 @@ cmd:xcat-inventory import -f /tmp/xcat_inventory_try_to_import_all_type_is_osima check:rc==0 cmd:lsdef -t osimage -l|sort > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/import_osimage check:rc==0 -cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/target_osimage_sort /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/import_osimage +cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/target_osimage_sort /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/import_osimage -I "environvar=OBJNAME=bogus_image" check:rc==0 cmd:lsdef -t node -l > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/after_nodes_db check:rc==0 @@ -768,7 +768,7 @@ cmd:xcat-inventory import -f /tmp/xcat_inventory_try_to_import_all_type_is_osima check:rc==0 cmd:lsdef -t osimage -l|sort > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/import_osimage check:rc==0 -cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/target_osimage_sort /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/import_osimage +cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/target_osimage_sort /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/import_osimage -I "environvar=OBJNAME=bogus_image" check:rc==0 cmd:lsdef -t node -l > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/after_nodes_db check:rc==0 @@ -851,7 +851,7 @@ cmd: scp $$DSTMN:/tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN check:rc==0 cmd: cat /tmp/export_single_osimage_then_modify_json_then_import/dst_bogus_image.stanza check:rc==0 -cmd:diff -y /tmp/export_single_osimage_then_modify_json_then_import/src_bogus_osimage.stanza /tmp/export_single_osimage_then_modify_json_then_import/dst_bogus_image.stanza +cmd:diff -y /tmp/export_single_osimage_then_modify_json_then_import/src_bogus_osimage.stanza /tmp/export_single_osimage_then_modify_json_then_import/dst_bogus_image.stanza -I "environvar=OBJNAME=bogus_image" check:rc==0 cmd:ssh $$DSTMN 'rmdef -t osimage -o bogus_image' check:rc==0 @@ -908,7 +908,7 @@ cmd: scp $$DSTMN:/tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN check:rc==0 cmd: cat /tmp/export_single_osimage_then_modify_yaml_then_import/dst_bogus_image.stanza check:rc==0 -cmd:diff -y /tmp/export_single_osimage_then_modify_yaml_then_import/src_bogus_osimage.stanza /tmp/export_single_osimage_then_modify_yaml_then_import/dst_bogus_image.stanza +cmd:diff -y /tmp/export_single_osimage_then_modify_yaml_then_import/src_bogus_osimage.stanza /tmp/export_single_osimage_then_modify_yaml_then_import/dst_bogus_image.stanza -I "environvar=OBJNAME=bogus_image" check:rc==0 cmd:ssh $$DSTMN 'rmdef -t osimage -o bogus_image' check:rc==0 @@ -1208,12 +1208,8 @@ check:rc==0 cmd:rm -rf /tmp/otherpkglist /tmp/synclists /tmp/postinstall /tmp/exlist /tmp/pkglist /tmp/template /tmp/partitionfile cmd:xcat-inventory import -t osimage -d /opt/inventory/site check:rc==0 -check:output=~Importing object: test_myimage1 check:output=~Inventory import successfully! -check:output=~The object test_myimage1 has been imported -check:output=~Importing object: test_myimage2 check:output=~Inventory import successfully! -check:output=~The object test_myimage2 has been imported cmd:lsdef -t osimage -o test_myimage1,test_myimage2 check:rc==0 cmd:otherpkglist=`lsdef -t osimage -o test_myimage1 |grep otherpkglist|awk -F= '{print $2}'`;diff -y $otherpkglist /opt/inventory/site/osimage/test_myimage1$otherpkglist @@ -1249,7 +1245,6 @@ check:rc==0 cmd: if [ -e /tmp/test_myimage1.stanza ]; then cat /tmp/test_myimage1.stanza |mkdef -z;fi cmd: if [ -e /tmp/test_myimage2.stanza ]; then cat /tmp/test_myimage2.stanza |mkdef -z;fi cmd:dir="/opt/inventory/site/osimage"; rm -rf $dir; if [ -d ${dir}".bak" ];then mv ${dir}".bak" $dir; fi -cmd:dir="/opt/inventory/site/osimage"; rm -rf $dir; if [ -d ${dir}".bak" ];then mv ${dir}".bak" $dir; fi cmd:file="/tmp/otherpkglist"; rm -rf $file; if [ -d ${file}".bak" ];then mv ${file}".bak" $file; fi cmd:file="/tmp/synclists"; rm -rf $file; if [ -d ${file}".bak" ];then mv ${file}".bak" $file; fi cmd:file="/tmp/postinstall"; rm -rf $file; if [ -d ${file}".bak" ];then mv ${file}".bak" $file; fi @@ -1285,10 +1280,8 @@ check:output=~The osimage objects has been exported to directory /tmp/export cmd:ls -lFR /tmp/export cmd: xcat-inventory import -t osimage -d /tmp/export -c check:rc==0 -check:output=~Importing object: test_myimage1 check:output=~Inventory import successfully! check:output=~The object test_myimage1 has been imported -check:output=~Importing object: test_myimage2 check:output=~Inventory import successfully! check:output=~The object test_myimage2 has been imported cmd:lsdef -t osimage -o test_myimage1,test_myimage2 From 28ba3a5cffd5930f0b0decfd5cb15d38484f4909 Mon Sep 17 00:00:00 2001 From: Bin Xu Date: Tue, 13 Nov 2018 14:06:10 +0800 Subject: [PATCH 068/121] imporve the performance to list group object when lots of groups defined (#5769) * imporve the performance to list group object when lots of groups defined (#5761) * - for list group attribute, using the similiar method as node object, but for group not consider the inherit and regex translation (pass $options{keep_raw} = 1) --- perl-xCAT/xCAT/DBobjUtils.pm | 215 +++++++++++++++++++++-------------- perl-xCAT/xCAT/Table.pm | 32 +++--- 2 files changed, 146 insertions(+), 101 deletions(-) diff --git a/perl-xCAT/xCAT/DBobjUtils.pm b/perl-xCAT/xCAT/DBobjUtils.pm index 6971a8d86..e561d7aed 100755 --- a/perl-xCAT/xCAT/DBobjUtils.pm +++ b/perl-xCAT/xCAT/DBobjUtils.pm @@ -92,19 +92,20 @@ sub getObjectsOfType } # if this is type "group" we need to check the nodelist table - my @nodeGroupList = (); if ($type eq 'group') { my $table = "nodelist"; + my %ext_groups = (); my @TableRowArray = xCAT::DBobjUtils->getDBtable($table); - foreach (@TableRowArray) { - my @tmplist = split(',', $_->{'groups'}); - push(@nodeGroupList, @tmplist); - } - foreach my $n (@nodeGroupList) { - if (!grep(/^$n$/, @objlist)) { - push(@objlist, $n); + foreach my $r (@TableRowArray) { + my @tmplist = split(',', $r->{'groups'}); + foreach (@tmplist) { + $ext_groups{$_} = 1 unless exists($ext_groups{$_}) ; } } + foreach (@objlist) { + $ext_groups{$_} = 1 unless exists($ext_groups{$_}) ; + } + @objlist = sort keys %ext_groups; } @{ $::saveObjList{$type} } = @objlist; @@ -142,7 +143,6 @@ sub getobjattrs my $class = shift; my $ref_hash = shift; my @attrs; - # The $attrs is an optional argument if (ref $_[0]) { @attrs = @{ shift() }; @@ -164,35 +164,18 @@ sub getobjattrs # go through each object type and look up all the info for each object foreach my $objtype (keys %objtypelist) { - # only do node type for now - if ($objtype eq 'node') { - + # only do node and nodegroup type for now + if ($objtype eq 'node' || $objtype eq 'group') { # find the list of tables and corresponding attrs # - for this object type - # get the object type decription from Schema.pm - my $datatype = $xCAT::Schema::defspec{$objtype}; - foreach my $this_attr (@{ $datatype->{'attrs'} }) { - my $attr = $this_attr->{attr_name}; - if (scalar(@attrs) > 0) { # Only query specific attributes - if (!grep(/^$attr$/, @attrs)) { - next; # This attribute is not needed - } - } - - # table_attr is the attr that actually appears in the - # table which could possibly be different then the attr - # used in the node def - # ex. 'nodetype.arch' - my ($lookup_table, $table_attr) = split('\.', $this_attr->{tabentry}); - if (!grep(/^$table_attr$/, @{ $tableattrs{$lookup_table} })) { - push @{ $tableattrs{$lookup_table} }, $table_attr; - } - } + # get the object type description from Schema.pm + my %tableattrs = xCAT::DBobjUtils->gettbldesc($objtype, \@attrs); + my @objlist = @{ $objtypelist{$objtype} }; # foreach table look up the list of attrs for this # list of object names foreach my $table (keys %tableattrs) { - + next if ($table eq 'nodegroup'); #getNodesAttribs cannot handle this table now # open the table # with autocommit => 0, it does not work on Ubuntu running mysql my $thistable = xCAT::Table->new($table, -create => 1, -autocommit => 1); @@ -203,9 +186,14 @@ sub getobjattrs next; } - my @objlist = @{ $objtypelist{$objtype} }; - - my $rec = $thistable->getNodesAttribs(\@objlist, @{ $tableattrs{$table} }); + my $rec; + if ($objtype eq 'node') { + $rec = $thistable->getNodesAttribs(\@objlist, @{$tableattrs{$table}}); + } else { + my %options = (); + $options{keep_raw} = 1; + $rec = $thistable->getNodesAttribs(\@objlist, \@{$tableattrs{$table}}, %options); + } # fill in %tabhash with any values that are set foreach my $n (@objlist) { @@ -232,6 +220,62 @@ sub getobjattrs #---------------------------------------------------------------------------- +=head3 gettbldesc + + Get required table and columns from the Schema for specified definition type. + + $objtype: definition type + $attrs_ref: only get the specific attributes, + this can be useful especially for performance considerations + Arguments: + Returns: + undef - error + hash ref - $tblattrshash{tablename} = [col1, col2] + Globals: + Error: + Example: + + To get the table attributes for object type + ex. + + xCAT::DBobjUtils->gettbldesc('node', @attr); + + Comments: + +=cut + +#----------------------------------------------------------------------------- +sub gettbldesc { + my ($class, $objtype) = @_; + my @attrs; + # The $attrs is an optional argument + if (ref $_[0]) { + @attrs = @{ shift() }; + } + my %tableattrs = (); + my $datatype = $xCAT::Schema::defspec{$objtype}; + foreach my $this_attr (@{ $datatype->{'attrs'} }) { + my $attr = $this_attr->{attr_name}; + if (scalar(@attrs) > 0) { # Only query specific attributes + if (!grep(/^$attr$/, @attrs)) { + next; # This attribute is not needed + } + } + + # table_attr is the attr that actually appears in the + # table which could possibly be different then the attr + # used in the node def + # ex. 'nodetype.arch' + my ($lookup_table, $table_attr) = split('\.', $this_attr->{tabentry}); + if (!grep(/^$table_attr$/, @{ $tableattrs{$lookup_table} })) { + push @{ $tableattrs{$lookup_table} }, $table_attr; + } + } + return %tableattrs; +} + +#---------------------------------------------------------------------------- + =head3 getobjdefs Get object definitions from the DB. @@ -263,13 +307,14 @@ sub getobjattrs sub getobjdefs { my ($class, $hash_ref, $verbose, $attrs_ref, $chname_ref) = @_; - my %objhash; + my %typehash = %$hash_ref; - my %tabhash; - my @attrs; + my @attrs; # required attributes if (ref($attrs_ref)) { @attrs = @$attrs_ref; } + my %objhash; # fetched result will be stored in this hash + my %tabhash; # used to cache the some result for node/group @::foundTableList = (); @@ -283,40 +328,7 @@ sub getobjdefs return %objhash; } - # see if we need to get any objects of type 'node' - my $getnodes = 0; - foreach my $objname (keys %typehash) { - if ($typehash{$objname} eq 'node') { - $getnodes = 1; - } - } - - # if so then get node info from tables now - # still may need to look up values in some tables using - # other keys - also need to figure out what tables to take - # values from when using 'only_if' - see below - # - but this saves lots of time - if ($getnodes) { - if (scalar(@attrs) > 0) { # Only get specific attributes of the node - # find the onlyif key for the attributes - REDO: my $datatype = $xCAT::Schema::defspec{'node'}; - foreach my $this_attr (@{ $datatype->{'attrs'} }) { - my $attr = $this_attr->{attr_name}; - if (exists($this_attr->{only_if})) { - my ($onlyif_key, $onlyif_value) = split('\=', $this_attr->{only_if}); - if (!grep (/^$onlyif_key$/, @attrs)) { - push @attrs, $onlyif_key; - goto REDO; - } - } - } - %tabhash = xCAT::DBobjUtils->getobjattrs(\%typehash, \@attrs); - } else { - %tabhash = xCAT::DBobjUtils->getobjattrs(\%typehash); - } - } - - # Classify the nodes with type + # Classify the objects with type, for example, {'node' => ['cn1', 'cn2']} my %type_obj = (); foreach my $objname (keys %typehash) { push @{ $type_obj{ $typehash{$objname} } }, $objname; @@ -422,10 +434,38 @@ sub getobjdefs # get the object type decription from Schema.pm my $datatype = $xCAT::Schema::defspec{$objtype}; + # if so then get objects info from tables now + # still may need to look up values in some tables using + # other keys - also need to figure out what tables to take + # values from when using 'only_if' - see below + # - but this saves lots of time + if ($objtype eq 'node' or $objtype eq 'group') { + if (scalar(@attrs) > 0) { + # Only get specific attributes of the object + # find the onlyif key for the attributes + REDO: + foreach my $this_attr (@{$datatype->{'attrs'}}) { + my $attr = $this_attr->{attr_name}; + if (exists($this_attr->{only_if})) { + my ($onlyif_key, $onlyif_value) = split('\=', $this_attr->{only_if}); + if (!grep (/^$onlyif_key$/, @attrs)) { + push @attrs, $onlyif_key; + goto REDO; + } + } + } + %tabhash = xCAT::DBobjUtils->getobjattrs(\%typehash, \@attrs); + } + else { + %tabhash = xCAT::DBobjUtils->getobjattrs(\%typehash); + } + } + # get the key to look for, for this object type my $objkey = $datatype->{'objkey'}; # go through the list of valid attrs foreach my $this_attr (@{ $datatype->{'attrs'} }) { + my $ent; my $attr = $this_attr->{attr_name}; @@ -435,7 +475,7 @@ sub getobjdefs } # skip the attributes that does not needed for node type - if ($getnodes) { + if ($objtype eq 'node') { if (scalar(@attrs) > 0 && !grep(/^$attr$/, @attrs)) { next; } @@ -449,33 +489,33 @@ sub getobjdefs # ex. noderes.nfsdir my ($tab, $tabattr) = split('\.', $this_attr->{tabentry}); - foreach my $objname (sort @{ $type_obj{$objtype} }) { + my $check_attr = undef; + my $check_value = undef; + if (exists $this_attr->{only_if}) { + ($check_attr, $check_value) = split('\=', $this_attr->{only_if}); + } + foreach my $objname (sort @{ $type_obj{$objtype} }) { # get table lookup info from Schema.pm # !!!! some tables depend on the value of certain attrs # we need to look up attrs in the correct order or we will # not be able to determine what tables to look # in for some attrs. - if (exists($this_attr->{only_if})) { - my ($check_attr, $check_value) = split('\=', $this_attr->{only_if}); - + if (defined($check_attr) && defined($check_value)) { # if the object value is not the value we need # to match then try the next only_if value next if (!($objhash{$objname}{$check_attr} =~ /\b$check_value\b/)); } - $objhash{$objname}{'objtype'} = $objtype; - my %tabentry = (); + my %tabentry = (); # def commands need to support multiple keys in one table # the subroutine parse_access_tabentry is used for supporting multiple keys - my $rc = xCAT::DBobjUtils->parse_access_tabentry($objname, - $this_attr->{access_tabentry}, \%tabentry); + my $rc = xCAT::DBobjUtils->parse_access_tabentry($objname, $this_attr->{access_tabentry}, \%tabentry); if ($rc != 0) { my $rsp; - $rsp->{data}->[0] = -"access_tabentry \'$this_attr->{access_tabentry}\' is not valid."; + $rsp->{data}->[0] = "access_tabentry \'$this_attr->{access_tabentry}\' is not valid."; xCAT::MsgUtils->message("E", $rsp, $::callback); next; } @@ -490,7 +530,8 @@ sub getobjdefs # The %tabhash is for performance considerations my $tabspec = $xCAT::Schema::tabspec{$lookup_table}; my $nodecol = $tabspec->{'nodecol'} if defined($tabspec->{'nodecol'}); - if (($lookup_attr eq 'node' && $objtype eq 'node') || (defined($nodecol) && $objtype eq 'node' && $lookup_table ne 'ppcdirect')) { + if (($lookup_attr eq 'node' && ($objtype eq 'node' || $objtype eq 'group')) || + (defined($nodecol) && ($objtype eq 'node' || $objtype eq 'group') && $lookup_table ne 'ppcdirect')) { if (defined($tabhash{$lookup_table}{$objname}{$tabattr})) { if ($verbose == 1) { $objhash{$objname}{$attr} = "$tabhash{$lookup_table}{$objname}{$tabattr}\t(Table:$lookup_table - Key:$lookup_attr - Column:$tabattr)"; @@ -509,7 +550,6 @@ sub getobjdefs $notsearched = 1; } } - # Not in tabhash, # Need to lookup the table if ($intabhash == 0 && $notsearched == 1) { @@ -580,7 +620,8 @@ sub getDBtable # save this table info - in case this subr gets called multiple times # --nocache flag specifies not to use cahe - if (grep(/^$table$/, @::foundTableList) && !$::opt_nc) { + #if (grep(/^$table$/, @::foundTableList) && !$::opt_nc) { + if (exists $::TableHash{$table} && !$::opt_nc) { # already have this @rows = @{ $::TableHash{$table} }; @@ -600,7 +641,7 @@ sub getDBtable # keep track of the fact that we checked this table # - even if it's empty! - push(@::foundTableList, $thistable->{tabname}); + #push(@::foundTableList, $thistable->{tabname}); @{ $::TableHash{$table} } = @rows; diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 36ecc10fa..2b3d50fc1 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -2797,20 +2797,21 @@ sub getNodeAttribs unless (scalar keys %{ $data[0] }) { return undef; } - my $attrib; - foreach $datum (@data) { - foreach $attrib (@attribs) - { - unless (defined $datum->{$attrib}) { - - #skip undefined values, save time - next; - } - my $retval; - if (defined($retval = transRegexAttrs($node, $datum->{$attrib}))) { - $datum->{$attrib} = $retval; - } else { - delete $datum->{$attrib}; + if (!exists($options{keep_raw})){ + my $attrib; + foreach $datum (@data) { + foreach $attrib (@attribs) { + unless (defined $datum->{$attrib}) { + #skip undefined values, save time + next; + } + my $retval; + if (defined($retval = transRegexAttrs($node, $datum->{$attrib}))) { + $datum->{$attrib} = $retval; + } + else { + delete $datum->{$attrib}; + } } } } @@ -2984,6 +2985,9 @@ sub getNodeAttribs_nosub_returnany } @results = $self->getAttribs({ $nodekey => $node }, @attribs); + # return the DB without any rendering, this is for fetch attributes of group + return @results if (exists($options{keep_raw})); + my %attribsToDo; for (@attribs) { $attribsToDo{$_} = 0 From 67e5a95878c8fe2b07e7e435ed48df0ab39f3bc5 Mon Sep 17 00:00:00 2001 From: cxhong Date: Wed, 14 Nov 2018 00:41:15 -0500 Subject: [PATCH 069/121] Modify configinterface postscripts to handle the MASTER IP address (#5786) * Modify configinterface postscripts to handle the MASTER IP address * Add modification from comments --- xCAT/postscripts/configinterface | 40 +++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/xCAT/postscripts/configinterface b/xCAT/postscripts/configinterface index cc75ea143..1ec8d0d8b 100755 --- a/xCAT/postscripts/configinterface +++ b/xCAT/postscripts/configinterface @@ -9,29 +9,57 @@ fi xcat_intf="/etc/network/interfaces.d/xCAT.intf" -MASTER=$(cat /var/lib/dhcp/dhclient.eth0.leases|sed -n 's/.*cumulus-provision-url.*http:\/\+\([^\/]\+\)\/.*/\1/p'|tail -1) -if [ -z "$MASTER" ]; then - echo "xCAT Master unset! Cannot download interface description" - exit 2 +if [ -f /xcatpost/mypostscript ]; then + MASTER=`grep '^MASTER_IP=' /xcatpost/mypostscript |cut -d= -f2|sed s/\'//g` fi +if [ -z "$MASTER" ]; then + MASTER=$(cat /var/lib/dhcp/dhclient.eth0.leases|sed -n 's/.*cumulus-provision-url.*http:\/\+\([^\/]\+\)\/.*/\1/p'|tail -1) + if [ -z "$MASTER" ]; then + echo "xCAT Master unset! Cannot download interface description" + exit 2 + fi +fi + +#Validate if this IP is reachable +ping $MASTER -c 1 >/dev/null +if [ $? -ne 0 ]; then + echo "ERROR: The xCAT Master ip address $MASTER is not reachable"; + exit 1; +fi + +ORIGFILE=/tmp/xCAT.intf.orig TMPINT=/tmp/xCAT.intf -rm $TMPINT 2>/dev/null +rm -f $TMPINT 2>/dev/null UPDATED=0 +DOWNLOADED=0 for name in $NODE ${GROUP//,/ } default; do curl -s -o $TMPINT -f http://${MASTER}/install/custom/sw_os/cumulus/interface/$name if [ -f $TMPINT ]; then + DOWNLOADED=1 if ! diff $TMPINT $xcat_intf > /dev/null; then - mv $TMPINT $xcat_intf + rm -f $ORIGFILE + cp $xcat_intf $ORIGFILE + mv -f $TMPINT $xcat_intf UPDATED=1 + echo "New interface file downloaded, keep old one to $ORIGFILE"; fi break fi done +if [ $DOWNLOADED -eq 1 ] && [ $UPDATED -eq 0 ]; then + echo "New interface file downloaded to $TMPINT, same as $xcat_intf file"; +fi + +if [ $DOWNLOADED -eq 0 ] && [ -f $xcat_intf ]; then + echo "NO new interface file downloaded, keep same $xcat_intf file"; +fi + if [ ! -f $xcat_intf ]; then UPDATED=1 + echo "NO new interface file downloaded, create a default $xcat_intf file"; echo "#This is sample interface file provided by xCAT" > $xcat_intf echo "# bridge-vlan-aware: set to yes to indicate that the bridge is VLAN-aware. " >> $xcat_intf From 19c5ab3f49d836b5c4962c33fa7f09824d8a1f61 Mon Sep 17 00:00:00 2001 From: Yuan Bai Date: Wed, 14 Nov 2018 14:31:41 +0800 Subject: [PATCH 070/121] fix 5800 nicextraparams does not overwrite existed ifcfg attribute (#5801) --- xCAT/postscripts/nicutils.sh | 6 ++---- xCAT/postscripts/xcatlib.sh | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/xCAT/postscripts/nicutils.sh b/xCAT/postscripts/nicutils.sh index 8e1fa0551..74e6131ce 100755 --- a/xCAT/postscripts/nicutils.sh +++ b/xCAT/postscripts/nicutils.sh @@ -573,18 +573,16 @@ function create_persistent_ifcfg { attrs=${attrs}${attrs:+,}"${name}=${value}" i=$((i+1)) done - # record manual and auto attributes first # since input attributes might overwrite them. # - # record input attributes later. They will overwrite + # record extra attributes later. They will overwrite # previous generated attributes if duplicate. [ -f $fcfg ] && mv -f $fcfg `dirname $fcfg`/.`basename $fcfg`.bak - echo "$attrs,$inattrs" \ | $sed -e 's/,/\n/g' | grep -v "^$" \ + echo "$inattrs,$attrs" \ | $sed -e 's/,/\n/g' | grep -v "^$" \ | $sed -e 's/=/="/' -e 's/ *$/"/' \ | uniq_per_key -t'=' -k1 >$fcfg local rc=$? - # log for debug echo "['ifcfg-${ifname}']" >&2 cat $fcfg | $sed -e 's/^/ >> /g' | log_lines info diff --git a/xCAT/postscripts/xcatlib.sh b/xCAT/postscripts/xcatlib.sh index e8f9859ab..e1c688402 100755 --- a/xCAT/postscripts/xcatlib.sh +++ b/xCAT/postscripts/xcatlib.sh @@ -733,7 +733,7 @@ function parse_nic_extra_params() { do token2="${params_temp[$k]}" array_extra_param_names[$k]=`echo "$token2" | cut -d'=' -f 1` - array_extra_param_values[$k]=`echo "$token2" | cut -d'=' -f 2` + array_extra_param_values[$k]=`echo "$token2" | cut -d'=' -f 2-` k=$((k+1)) done } From cb3dca58d9d226e02319c59e77a46db38ab1fd3a Mon Sep 17 00:00:00 2001 From: litingt Date: Wed, 14 Nov 2018 22:06:12 -0500 Subject: [PATCH 071/121] update 2 wrong cases, rmimage and makedhcp_n_linux --- xCAT-test/autotest/testcase/makedhcp/cases0 | 2 +- xCAT-test/autotest/testcase/ngpfb/cases0 | 9 --------- xCAT-test/autotest/testcase/rmimage/case0 | 3 ++- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/xCAT-test/autotest/testcase/makedhcp/cases0 b/xCAT-test/autotest/testcase/makedhcp/cases0 index e4c1d685a..359c5a97d 100644 --- a/xCAT-test/autotest/testcase/makedhcp/cases0 +++ b/xCAT-test/autotest/testcase/makedhcp/cases0 @@ -34,7 +34,7 @@ end start:makedhcp_n_linux description:Create a new dhcp configuration file with a network statement for each network the dhcp daemon should listen on -label:ci_test +label:others,ci_test os:Linux cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi cmd:makedhcp -n diff --git a/xCAT-test/autotest/testcase/ngpfb/cases0 b/xCAT-test/autotest/testcase/ngpfb/cases0 index 6ef0c8dcf..e3604488d 100644 --- a/xCAT-test/autotest/testcase/ngpfb/cases0 +++ b/xCAT-test/autotest/testcase/ngpfb/cases0 @@ -1,7 +1,6 @@ #comments:make sure you have compute node definition on your MN #this case is just supplement for some commands,after your executing,check output from log start:lsslp_cmm - description:for part of ngp firebird commands label:others,hctrl_fsp cmd:makedhcp -n @@ -14,7 +13,6 @@ check:output=~(groups=cmm,all) end start:rspconfig_snmp_ssh - description:rspconfig snmpcfg sshcfg label:others,hctrl_fsp cmd:makehosts cmm @@ -35,7 +33,6 @@ check:output=~enabled end start:rscan_cmm - description:rscan cmm label:others,hctrl_fsp cmd:rscan cmm @@ -55,7 +52,6 @@ check:output=~OK end start:rspconfig_textid - description:rspconfig textid label:others,hctrl_fsp cmd:rspconfig $$CN textid=abc123 @@ -78,7 +74,6 @@ check:output=~(\w+)(.*?)\1 end start:rspconfig_hwconn - description:for hwconn label:others,hctrl_fsp cmd:rmhwconn $$CN @@ -102,7 +97,6 @@ check:output=~(LINE UP) end start:rpower_bladenode - description:rpower label:others,hctrl_fsp cmd:rpower $$CN off @@ -116,7 +110,6 @@ check:output=~Success end start:rspconfig_solcfg - description:for solcfg label:others,hctrl_fsp cmd:rspconfig cmm solcfg=enable @@ -132,7 +125,6 @@ check:output!~enable end start:getmacs_d_blade - description:getmacs label:others,hctrl_fsp cmd:makeconservercf @@ -148,7 +140,6 @@ check:output=~[a-f0-9A-F]{12}|[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0-9A-F]{2}:[a-f0 end start:rinv_firm_fb - description:check firmware level label:others,hctrl_fsp cmd:rinv $$CN firm diff --git a/xCAT-test/autotest/testcase/rmimage/case0 b/xCAT-test/autotest/testcase/rmimage/case0 index a5f1ea566..991efd372 100644 --- a/xCAT-test/autotest/testcase/rmimage/case0 +++ b/xCAT-test/autotest/testcase/rmimage/case0 @@ -1,6 +1,7 @@ start:rmimage_diskless -descriptiion:This case is to test rmimage could work correctly to remove all image files. +description:This case is to test rmimage could work correctly to remove all image files. cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute.bak;fi +label:others,packaging cmd:copycds $$ISO check:rc==0 cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute From 74e207adbd256f3c9fd73025c63672f37bede62d Mon Sep 17 00:00:00 2001 From: litingt Date: Thu, 15 Nov 2018 02:14:12 -0500 Subject: [PATCH 072/121] update confignetwork cases to remove invoke_provision for some cases --- .../autotest/testcase/confignetwork/cases0 | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/xCAT-test/autotest/testcase/confignetwork/cases0 b/xCAT-test/autotest/testcase/confignetwork/cases0 index cb1248391..127e9c2f7 100644 --- a/xCAT-test/autotest/testcase/confignetwork/cases0 +++ b/xCAT-test/autotest/testcase/confignetwork/cases0 @@ -152,7 +152,7 @@ end start:confignetwork_s_installnic_secondarynic_updatenode description: this case is to test confignetwork -s could configure installnic and secondarynic successfully with updatenode. -label:others,network,invoke_provision +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -184,7 +184,7 @@ end start:confignetwork_secondarynic_updatenode description: this case is to test confignetwork could configure secondarynic successfully with updatenode. -label:others,network,invoke_provision +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -214,7 +214,7 @@ end start: confignetwork_secondarynic_nicaliases_updatenode description: this case is to test confignetwork could config secondarynic nicaliases successfully with updatenode. -label:others,network,invoke_provision +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -257,7 +257,7 @@ end start:confignetwork_secondarynic_nicextraparams_updatenode description: this case is to test confignetwork could configure secondarynic nicextraparams successfully with updatenode. -label:others,network,invoke_provision +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -301,7 +301,7 @@ end start:confignetwork_secondarynic_nicnetworks_updatenode_false description: this case is to test confignetwork could return error message when there is no not enough attributes when configing secondarynic with updatenode. -label:others,network,invoke_provision +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC @@ -318,7 +318,7 @@ end start:confignetwork_secondarynic_nicips_updatenode_false description: this case is to test confignetwork could return error message when there is no not enough attributes when configing secondarynic with updatenode. -label:others,network,invoke_provision +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC @@ -335,7 +335,7 @@ end start:confignetwork_secondarynic_nictype_updatenode_false description: this case is to test confignetwork could return error message when there is no not enough attributes when configing secondarynic with updatenode. -label:others,network,invoke_provision +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC @@ -353,7 +353,7 @@ end start:confignetwork_disable_set_to_yes description: this case is to test if confignetwork could work correctly when disable is set to yes in nics table -label:others,network,invoke_provision +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=100.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC @@ -374,7 +374,7 @@ end start:confignetwork_disable_set_to_1 description: this case is to test if confignetwork could work correctly when disable is set to 1 in nics table -label:others,network,invoke_provision +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=100.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC @@ -395,7 +395,7 @@ end start:confignetwork_niccustomscripts description: this case is to test confignetwork could config secondarynic and envoke scripts to execute. -label:others,network,invoke_provision +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:echo "echo hello > /tmp/confignetwork_niccustomscript" > /tmp/script1 @@ -423,7 +423,7 @@ end start:confignetwork_secondarynic_thirdnic_multiplevalue_updatenode description:this case is to verify if confignetwork could config serveral nics' multiple value at the same time. -label:others,network,invoke_provision +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -483,7 +483,7 @@ end start:confignetwork_vlan_eth0 description: this case is to verify if confignetwork could config vlan for CN.When CN has Ethernet nic eth0, user wants to confgure 2 vlans, Configure vlan eth0.6 60.5.106.9 and eth0.7 70.5.106.9 based on ethernet nic eth0 -label:others,network,invoke_provision +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -535,7 +535,7 @@ end start:confignetwork_vlan_false description:this case is to verify if confignetwork could process the false value when vlan nicdevice is not correctly set -label:others,network,invoke_provision +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -580,7 +580,7 @@ end start:confignetwork_bond_eth2_eth3 description: this case is to verify if confignetwork could config bond for CN.CN has 2 Ethernet nics, eth2 and eth3, user configures bond bond0 using ethernet nic eth2 and eth3. -label:others,network,invoke_provision +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -635,7 +635,7 @@ end start:confignetwork_bond_false description: this case is to verify if confignetwork could process when bond is not correctly set. -label:others,network,invoke_provision +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -684,7 +684,7 @@ end start:confignetwork_vlan_bond description: this case is to verify if confignetwork could config bond for CN.CN has 2 Ethernet nic eth2 and eth3, user wants to bond them to bond0, then make 2 vlan bond0.2 and bond0.3 for data network. -label:others,network,invoke_provision +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -750,7 +750,7 @@ end start:confignetwork_2eth_bridge_br0 description:this case is to verify if confignetwork could config bridge for CN.CN has 2 Ethernet nics eth2 and eth3, user want to configure bond bond0 using eth2 and eth3, creates bridge br0 based on bond0. -label:others,network,invoke_provision +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -805,7 +805,7 @@ end start:confignetwork_2eth_bridge_br22_br33 description:this case is to verify if confignetwork could config bridge for CN.CN has 2 Ethernet nics eth2 and eth3, user wants to bond them as bond0, then make vlan bond0.2 and bond0.3, using bond0.2 create bridge br22,using bond0.3 create bridge br33. Use confignetwork to configure bond bond0, create vlan bond0.2 and bond0.3, create bridge br22 and br33. -label:others,network,invoke_provision +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -872,7 +872,7 @@ end start:confignetwork_installnic_2eth_bridge_br22_br33 description:this case is to test if confignetwork could config installnic and 2 bridges at the same time -label:others,network,invoke_provision +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -942,7 +942,7 @@ end start:confignetwork__bridge_false description:this case is to test if confignetwork could process false value when the bridge is not correctly set. -label:others,network,invoke_provision +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" @@ -975,7 +975,7 @@ end start:confignetwork_static_installnic description:Reconfigure installnic without dhclient lease file -label:others,network,invoke_provision +label:others,network cmd:lsdef $$CN -z && lsdef -l $$CN -z >/tmp/CN.stanza check:rc==0 cmd:xdsh $$CN "mkdir -p /tmp/backupnet" From ea05e0afbe825491810980905ce34e4dbfec050f Mon Sep 17 00:00:00 2001 From: litingt Date: Thu, 15 Nov 2018 02:44:58 -0500 Subject: [PATCH 073/121] fix some error label --- xCAT-test/autotest/testcase/lsvm/cases0 | 6 +++--- xCAT-test/autotest/testcase/xdshbak/cases0 | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/xCAT-test/autotest/testcase/lsvm/cases0 b/xCAT-test/autotest/testcase/lsvm/cases0 index b740eb67e..9929a5ea1 100644 --- a/xCAT-test/autotest/testcase/lsvm/cases0 +++ b/xCAT-test/autotest/testcase/lsvm/cases0 @@ -1,19 +1,19 @@ #comment out for developper will not fix it #start:lsvm_null -#label:others,hcp_hmc +#label:others,hctrl_hmc #cmd:lsvm #check:rc!=0 #check:output=~Usage #end start:lsvm_node -label:others,hcp_hmc +label:others,hctrl_hmc hcp:hmc,ivm cmd:lsvm $$CN check:rc==0 check:output=~name=$$CN end start:lsvm_err_node -label:others,hcp_hmc +label:others,hctrl_hmc cmd:lsvm testnode check:rc!=0 check:output=~Error diff --git a/xCAT-test/autotest/testcase/xdshbak/cases0 b/xCAT-test/autotest/testcase/xdshbak/cases0 index 2765c6811..1cbc6aa9b 100644 --- a/xCAT-test/autotest/testcase/xdshbak/cases0 +++ b/xCAT-test/autotest/testcase/xdshbak/cases0 @@ -1,31 +1,31 @@ start:xdshbak_h -label:other,parallel_cmds +label:others,parallel_cmds cmd:xdshbak -h check:rc==0 check:output=~Usage end start:xdshbak_display -label:other,parallel_cmds +label:others,parallel_cmds cmd:xdsh $$CN cat /etc/hosts | xdshbak check:rc==0 check:output=~HOST:$$CN end start:xdshbak_c -label:other,parallel_cmds +label:others,parallel_cmds cmd:xdsh $$CN pwd |xdshbak -c check:rc==0 end start:xdshbak_q -label:other,parallel_cmds +label:others,parallel_cmds cmd:xdsh $$CN ls / |xdshbak -q check:rc==0 end start:xdshbak_x -label:other,parallel_cmds +label:others,parallel_cmds cmd:xdsh $$CN cat /etc/passwd|xdshbak -c check:rc==0 end From 672db26f33eb60a221820e1cbe2486de4f97aace Mon Sep 17 00:00:00 2001 From: litingt Date: Thu, 15 Nov 2018 03:39:24 -0500 Subject: [PATCH 074/121] update ci_test label for maeknetwork and nodestat cases --- xCAT-test/autotest/testcase/makenetworks/cases0 | 4 ++-- xCAT-test/autotest/testcase/nodestat/cases0 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-test/autotest/testcase/makenetworks/cases0 b/xCAT-test/autotest/testcase/makenetworks/cases0 index e48ecdaa5..d7d035e61 100644 --- a/xCAT-test/autotest/testcase/makenetworks/cases0 +++ b/xCAT-test/autotest/testcase/makenetworks/cases0 @@ -25,7 +25,7 @@ end start:makenetworks_d os:Linux description:makenetworks_d -label:others,ci_test,network +label:others,network cmd:makenetworks -d > /tmp/mynetworksstanzas check:rc==0 cmd:echo -ne "auto-testnetworks:\n objtype=network\n gateway=1.2.3.0\n mask=255.255.255.0\n net=1.2.3.1\n" >> /tmp/mynetworksstanzas @@ -40,7 +40,7 @@ end start:makenetworks_d_V description:display,verbose -label:others,network +label:others,ci_test,network cmd:makenetworks check:rc==0 cmd:makenetworks -d -V diff --git a/xCAT-test/autotest/testcase/nodestat/cases0 b/xCAT-test/autotest/testcase/nodestat/cases0 index 60244cabb..6184447b4 100644 --- a/xCAT-test/autotest/testcase/nodestat/cases0 +++ b/xCAT-test/autotest/testcase/nodestat/cases0 @@ -7,7 +7,7 @@ check:output=~noping|sshd|install|snmp|pbs end start:nodestat_err_node -label:others +label:others,ci_test cmd:nodestat testnode check:rc!=0 check:output=~Error From ed6852a9e4ce23609e8618aed4b8610b38336366 Mon Sep 17 00:00:00 2001 From: Yuan Bai Date: Thu, 15 Nov 2018 17:12:55 +0800 Subject: [PATCH 075/121] add log tag for postscripts (#5805) --- xCAT/postscripts/addsiteyum | 7 +++- xCAT/postscripts/configbond | 10 ++++-- xCAT/postscripts/configib | 20 ++++++++---- xCAT/postscripts/confignics | 35 ++++++++++++-------- xCAT/postscripts/enablecapi | 8 ++++- xCAT/postscripts/mkhyperv | 26 ++++++++++----- xCAT/postscripts/mkresolvconf | 10 ++++-- xCAT/postscripts/mountinstall | 7 +++- xCAT/postscripts/odbcsetup | 27 +++++++++------- xCAT/postscripts/redirectps | 11 ++++--- xCAT/postscripts/routeop | 12 ++++--- xCAT/postscripts/serialconsole | 9 ++++-- xCAT/postscripts/setbootfromdisk | 22 +++++++------ xCAT/postscripts/setbootfromnet | 16 +++++---- xCAT/postscripts/setiscsiparms.awk | 9 ++++-- xCAT/postscripts/setupLDAP | 8 +++-- xCAT/postscripts/setupesx | 14 +++++--- xCAT/postscripts/setupnfsv4replication | 9 ++++-- xCAT/postscripts/setupntp | 16 +++++---- xCAT/postscripts/setupntp.traditional | 18 +++++++---- xCAT/postscripts/setuppostbootscripts | 10 ++++-- xCAT/postscripts/setupscratch | 22 +++++++------ xCAT/postscripts/sudoer | 8 +++-- xCAT/postscripts/umountpost | 8 +++-- xCAT/postscripts/unlocktftpdir.awk | 9 ++++-- xCAT/postscripts/xcatclient | 15 ++++++--- xCAT/postscripts/xcatpostinit | 16 +++++---- xCAT/postscripts/xcatserver | 45 ++++++++++++++------------ 28 files changed, 278 insertions(+), 149 deletions(-) diff --git a/xCAT/postscripts/addsiteyum b/xCAT/postscripts/addsiteyum index 69e11ee69..d7232dabc 100755 --- a/xCAT/postscripts/addsiteyum +++ b/xCAT/postscripts/addsiteyum @@ -1,7 +1,12 @@ #!/bin/bash +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi cd `dirname $0` if [ ! -d repos/$OSVER/$ARCH ]; then - logger -t xcat -p local4.err "addsiteyum: repos/$OSVER/$ARCH is not a directory" + logger -t $log_label -p local4.err "addsiteyum: repos/$OSVER/$ARCH is not a directory" exit -1; fi for i in repos/$OSVER/$ARCH/* diff --git a/xCAT/postscripts/configbond b/xCAT/postscripts/configbond index 659561d32..8b340428d 100755 --- a/xCAT/postscripts/configbond +++ b/xCAT/postscripts/configbond @@ -40,6 +40,12 @@ if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then . $str_dir_name/xcatlib.sh fi +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi + # Subroutine to display message and pass it to syslog # Usage: showmsg "message to putput" ["error"] function showmsg() { @@ -47,9 +53,9 @@ function showmsg() { error=$2 if [ -n "$error" ]; then - $(logger -t xcat -p local4.err $msg) + $(logger -t $log_label -p local4.err $msg) else - $(logger -t xcat -p local4.info $msg) + $(logger -t $log_label -p local4.info $msg) fi echo $msg diff --git a/xCAT/postscripts/configib b/xCAT/postscripts/configib index 0deac3f8d..eb3d56f1b 100755 --- a/xCAT/postscripts/configib +++ b/xCAT/postscripts/configib @@ -23,6 +23,12 @@ if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then . $str_dir_name/xcatlib.sh fi +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi + #This is the number of ports for each ib adpator. portnum=1 if [ -n "$NIC_IBAPORTS" ]; then @@ -86,7 +92,7 @@ then if [ $? -ne 0 ] then echo "Not found the driver dameon: rdma or openibd" - logger -p local4.info -t xcat "Not found the driver dameon: rdma or openibd" + logger -p local4.info -t $log_label "Not found the driver dameon: rdma or openibd" exit fi fi @@ -153,7 +159,7 @@ then OS_name="ubuntu" else echo "Unsupported to config IB on this OS!" - logger -p local4.info -t xcat "Unsupported to config IB on this OS!" + logger -p local4.info -t $log_label "Unsupported to config IB on this OS!" exit fi @@ -269,7 +275,7 @@ do if [ -z "$nicnets" ]; then echo "No network defined for $nic" - logger -p local4.info -t xcat "No network defined for $nic" + logger -p local4.info -t $log_label "No network defined for $nic" continue fi @@ -342,7 +348,7 @@ do # Setup goodnics list if [ "$found" == "0" ]; then echo "Cannot find network $nicnet for $nic" - logger -p local4.info -t xcat "Cannot find network $nicnet for $nic" + logger -p local4.info -t $log_label "Cannot find network $nicnet for $nic" continue else if [ -z "$goodnics" ]; then @@ -605,7 +611,7 @@ netmask $netmask" >> /etc/network/interfaces else echo "Unsupported operating system" - logger -p local4.err -t xcat "Unsupported operating system" + logger -p local4.err -t $log_label "Unsupported operating system" fi elif [ $PLTFRM == "AIX" ]; then @@ -617,7 +623,7 @@ netmask $netmask" >> /etc/network/interfaces if [ $? -ne 0 ] then echo "$mltnum is not available." - logger -p local4.info -t xcat "$mltnum is not available." + logger -p local4.info -t $log_label "$mltnum is not available." continue fi @@ -680,7 +686,7 @@ then #/sbin/service $ib_driver restart if [ "$restart_ib_driver" = "1" ]; then echo "restart $ib_driver service" - logger -p local4.info -t xcat "restart $ib_driver service" + logger -p local4.info -t $log_label "restart $ib_driver service" restartservice $ib_driver fi for nic in `echo "$goodnics" | tr "," "\n"|sort -u` diff --git a/xCAT/postscripts/confignics b/xCAT/postscripts/confignics index f5b6a228a..039bd4cad 100755 --- a/xCAT/postscripts/confignics +++ b/xCAT/postscripts/confignics @@ -18,6 +18,13 @@ if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then str_dir_name=`dirname $0` . $str_dir_name/xcatlib.sh fi + +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi + error_code=0 #the nics' information contain: #1. ip address @@ -137,7 +144,7 @@ str_inst_nic='' str_ib_nics='' str_os_type=`uname | tr 'A-Z' 'a-z'` if [ "$str_os_type" = "aix" ];then - logger -t xcat -p local4.err "confignics: aix does not support in this build" + logger -t $log_label -p local4.err "confignics: aix does not support in this build" echo "confignics: aix does not support in this build" exit 1 fi @@ -166,7 +173,7 @@ then then if [ $bool_cfg_inst_nic -eq 1 -o $bool_remove -eq 1 -o ! -z "$num_iba_ports" ] then - logger -t xcat -p local4.info "confignics --script could Not be used with other options" + logger -t $log_label -p local4.info "confignics --script could Not be used with other options" echo "confignics --script could Not be used with other options" exit 1 fi @@ -175,7 +182,7 @@ then fi fi -logger -t xcat -p local4.info "confignics is called: config install nic:$bool_cfg_inst_nic, remove: $bool_remove, iba ports: $num_iba_ports" +logger -t $log_label -p local4.info "confignics is called: config install nic:$bool_cfg_inst_nic, remove: $bool_remove, iba ports: $num_iba_ports" echo "confignics on $NODE: config install nic:$bool_cfg_inst_nic, remove: $bool_remove, iba ports: $num_iba_ports" str_temp='' @@ -211,10 +218,10 @@ bool_exit_flag=0 #check the required attributes if [ -z "$NICIPS" ];then if [ $bool_cfg_inst_nic -eq 1 ];then - logger -t xcat -p local4.info "confignics: configure the install nic. " + logger -t $log_label -p local4.info "confignics: configure the install nic. " echo "confignics on $NODE:configure the install nic. " else - logger -t xcat -p local4.info "confignics: nicips attribute is not defined. " + logger -t $log_label -p local4.info "confignics: nicips attribute is not defined. " echo "confignics on $NODE: nicips attribute is not defined. " exit 1 fi @@ -275,7 +282,7 @@ if [ $bool_remove -eq 1 ];then continue fi - logger -t xcat -p local4.info "confignics: remove nic $str_temp_nic" + logger -t $log_label -p local4.info "confignics: remove nic $str_temp_nic" echo "confignics on $NODE: remove nic $str_temp_nic" configeth -r $str_temp_nic if [ $? -ne 0 ]; then @@ -305,13 +312,13 @@ do # don't run customized script for installnic if not specify the -s continue fi - logger -t xcat -p local4.info "confignics: processing custom scripts: ${array_temp[1]} for interface $key" + logger -t $log_label -p local4.info "confignics: processing custom scripts: ${array_temp[1]} for interface $key" echo "confignics on $NODE: processing custom scripts: ${array_temp[1]} for interface $key" ${array_temp[1]} else if [ "$key" = "$str_inst_nic" ];then if [ $bool_cfg_inst_nic -eq 1 ];then - logger -t xcat -p local4.info "confignics: call 'configeth $str_inst_nic'" + logger -t $log_label -p local4.info "confignics: call 'configeth $str_inst_nic'" echo "confignics on $NODE: call 'configeth -s $str_inst_nic" configeth -s $str_inst_nic if [ $? -ne 0 ]; then @@ -327,7 +334,7 @@ do elif [ `echo $key | grep -E 'ib[0-9]+'` ];then str_nic_type="infiniband" else - logger -t xcat -p local4.info "confignics: unknown nic type for $key: $str_value ." + logger -t $log_label -p local4.info "confignics: unknown nic type for $key: $str_value ." echo "confignics on $NODE: unknown nic type for $key: $str_value ." error_code=1 continue @@ -336,13 +343,13 @@ do str_network=$(checknetwork ${array_temp[0]}) echo "$str_network" | grep -i 'error' > /dev/null if [ $? -eq 0 ];then - logger -t xcat -p local4.info "$str_network" + logger -t $log_label -p local4.info "$str_network" echo "confignics on $NODE: $str_network" continue fi if [ "$str_nic_type" = "ethernet" ];then - logger -t xcat -p local4.info "confignics: call 'configeth $key ${array_temp[0]} $str_network'" + logger -t $log_label -p local4.info "confignics: call 'configeth $key ${array_temp[0]} $str_network'" echo "confignics on $NODE: call 'configeth $key ${array_temp[0]} $str_network'" configeth $key ${array_temp[0]} $str_network if [ $? -ne 0 ]; then @@ -355,19 +362,19 @@ do str_ib_nics=$key fi else - logger -t xcat -p local4.info "confignics: unknown type $str_nic_type for NIC: $key" + logger -t $log_label -p local4.info "confignics: unknown type $str_nic_type for NIC: $key" echo "confignics on $NODE: unknown type $str_nic_type for NIC: $key" error_code=1 fi fi done if [ -n "$str_ib_nics" ];then - logger -t xcat -p local4.info "confignics: executed script: configib for nics: $str_ib_nics, ports: $num_iba_ports" + logger -t $log_label -p local4.info "confignics: executed script: configib for nics: $str_ib_nics, ports: $num_iba_ports" echo "confignics on $NODE: executed script: configib for nics: $str_ib_nics, ports: $num_iba_ports" NIC_IBNICS=$str_ib_nics NIC_IBAPORTS=$num_iba_ports configib else if [ $bool_remove -eq 1 ];then - logger -t xcat -p local4.info "confignics: executed script: 'configib -u' to remove all ib nics and configuration files" + logger -t $log_label -p local4.info "confignics: executed script: 'configib -u' to remove all ib nics and configuration files" echo "confignics on $NODE: executed script: 'configib -r' to remove all ib nics and configuration files" configib if [ $? -ne 0 ]; then diff --git a/xCAT/postscripts/enablecapi b/xCAT/postscripts/enablecapi index 923adacc3..64a67158b 100644 --- a/xCAT/postscripts/enablecapi +++ b/xCAT/postscripts/enablecapi @@ -5,6 +5,12 @@ if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then . $str_dir_name/xcatlib.sh fi +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi + #--------------------------------------------------------------------------- #=head1 enablecapi #=head2 enable CAPI and tunnel Atomics for compute nodes @@ -16,7 +22,7 @@ fi function logerr { echo "$@" - logger -t xcat -p local4.err $@ + logger -t $log_label -p local4.err $@ } diff --git a/xCAT/postscripts/mkhyperv b/xCAT/postscripts/mkhyperv index c015a299e..358ec2190 100755 --- a/xCAT/postscripts/mkhyperv +++ b/xCAT/postscripts/mkhyperv @@ -69,6 +69,11 @@ cat < /etc/init.d/kvm # kvm init script - stripped off bridge code, but still 'Takes care # # description: The KVM is a kernel level Virtual Machine Monitor. +if [ -n "\$LOGLABEL" ]; then + log_label=\$LOGLABEL +else + log_label="xcat" +fi start () { grep -q GenuineIntel /proc/cpuinfo && /sbin/modprobe kvm-intel grep -q AuthenticAMD /proc/cpuinfo && /sbin/modprobe kvm-amd @@ -77,17 +82,17 @@ stop () { grep -q GenuineIntel /proc/cpuinfo && /sbin/modprobe -r kvm-intel grep -q AuthenticAMD /proc/cpuinfo && /sbin/modprobe -r kvm-amd } -logger -t xcat -p local4.info "KVM $1" +logger -t \$log_label -p local4.info "KVM $1" case "\$1" in start) echo -n $"Starting KVM: " - logger -t xcat -p local4.info "Starting KVM:" + logger -t \$log_label -p local4.info "Starting KVM:" start echo ;; stop) echo -n $"Shutting down KVM: " - logger -t xcat -p local4.info "Shutting down KVM:" + logger -t \$log_label -p local4.info "Shutting down KVM:" stop echo ;; @@ -96,9 +101,9 @@ case "\$1" in ;; *) echo "Unknown command: \$1" >&2 - logger -t xcat -p local4.info "Unknown command: \$1" + logger -t \$log_label -p local4.info "Unknown command: \$1" echo "Valid commands are: start, stop, status" >&2 - logger -t xcat -p local4.info "Valid commands are: start, stop, status" + logger -t \$log_label -p local4.info "Valid commands are: start, stop, status" exit 1 esac EOF @@ -117,6 +122,11 @@ cat < /etc/init.d/iscsiconnect # # chkconfig: 345 10 75 # description: iscsi script to discover and connect to targets on boot +if [ -n "\$log_label" ]; then + log_label=\$log_label +else + log_label="xcat" +fi connect_targets() { iscsiadm -m discovery -t st -p $ISCSITARGET @@ -126,7 +136,7 @@ disconnect_targets() { iscsiadm -m node --logout } -logger -t xcat -p local4.info "iscsi $1" +logger -t \$log_label -p local4.info "iscsi $1" case "\$1" in start) connect_targets @@ -139,9 +149,9 @@ case "\$1" in ;; *) echo "Unknown command: \$1" >&2 - logger -t xcat -p local4.info "Unknown command: \$1" + logger -t \$log_label -p local4.info "Unknown command: \$1" echo "Valid commands are: start, stop, status" >&2 - logger -t xcat -p local4.info "Valid commands are: start, stop, status" + logger -t \$log_label -p local4.info "Valid commands are: start, stop, status" exit 1 esac EOF diff --git a/xCAT/postscripts/mkresolvconf b/xCAT/postscripts/mkresolvconf index f89476d86..04c224546 100755 --- a/xCAT/postscripts/mkresolvconf +++ b/xCAT/postscripts/mkresolvconf @@ -20,9 +20,15 @@ domain=$DOMAIN # this is the domain name used in this cluster nameservers=$NAMESERVERS # nameservers defined in the site table node=$NODE +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi + if [ -n "$master" ] && [ -n "$domain" ]; then - #logger -t xcat "Created /etc/resolv.conf file on $node." + #logger -t $log_label "Created /etc/resolv.conf file on $node." cp $conf_file $conf_file_bak > /dev/null 2>&1 echo "search $domain" >$conf_file if [[ "$nameservers" != "" ]]; then @@ -35,7 +41,7 @@ if [ -n "$master" ] && [ -n "$domain" ]; then fi else - logger -t xcat -p local4.err "Could not create resolv.conf on $node." + logger -t $log_label -p local4.err "Could not create resolv.conf on $node." exit 1 fi diff --git a/xCAT/postscripts/mountinstall b/xCAT/postscripts/mountinstall index df213cb7c..5219152d4 100755 --- a/xCAT/postscripts/mountinstall +++ b/xCAT/postscripts/mountinstall @@ -27,6 +27,11 @@ if [ -z "$INSTALLDIR" ]; then INSTALLDIR="/install" fi +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi mount | grep "$MASTER:$INSTALLDIR on /install" if [ $? -eq 0 ] @@ -42,7 +47,7 @@ mount $MASTER:$INSTALLDIR /install if [ $? -ne 0 ] then errmsg="Failed to run mount $MASTER:$INSTALLDIR /install" - logger -t xcat -p local4.err $errmsg + logger -t $log_label -p local4.err $errmsg echo $errmsg exit 1 fi diff --git a/xCAT/postscripts/odbcsetup b/xCAT/postscripts/odbcsetup index 142d6ac92..b8eed004d 100755 --- a/xCAT/postscripts/odbcsetup +++ b/xCAT/postscripts/odbcsetup @@ -33,7 +33,10 @@ use xCAT::Utils; use xCAT::MsgUtils; # MAIN - +my $log_label=$ENV{'LOGLABEL'}; +if (!$log_label) { + $log_label="xcat" +} my $rc = 0; my $cmd; @@ -54,7 +57,7 @@ my $dbname = xCAT::Utils->get_DBName; if ($dbname eq "DB2") { $msg = "odbcsetup:Setting up ODBC for DB2"; - `logger -t xcat -p local4.info $msg`; + `logger -t $log_label -p local4.info $msg`; &setupdb2odbc; } @@ -63,19 +66,19 @@ else if ($dbname eq "MYSQL") { $msg = "odbcsetup:Setting up ODBC for MYSQL"; - `logger -t xcat -p local4.info $msg`; + `logger -t $log_label -p local4.info $msg`; &setupmysqlodbc; } else { if ($dbname eq "PG") { $msg = "odbcsetup:Setting up ODBC for PostgreSQL"; - `logger -t xcat -p local4.info $msg`; + `logger -t $log_label -p local4.info $msg`; &setupPGodbc; } else { $msg = "odbcsetup:cfgloc file does not contain MySQL, DB2 or PG, will not setup ODBC."; - `logger -t xcat -p local4.err $msg`; + `logger -t $log_label -p local4.err $msg`; exit 1; } } @@ -114,12 +117,12 @@ sub setupdb2odbc $cmd = "$::XCATROOT/bin/db2sqlsetup -o -C"; } $msg = "odbcsetup: Running Client ODBC setup. \"$cmd\"\n"; - `logger -t xcat -p local4.info $msg`; + `logger -t $log_label -p local4.info $msg`; $rc = &runcmd($cmd); $msg = "odbcsetup: Client ODBC setup finished.\n"; - `logger -t xcat -p local4.info $msg`; + `logger -t $log_label -p local4.info $msg`; return $rc; @@ -137,12 +140,12 @@ sub setupmysqlodbc my $cmd; $cmd = "$::XCATROOT/bin/mysqlsetup -o"; $msg = "odbcsetup: Running Client ODBC setup. \"$cmd\"\n"; - `logger -t xcat -p local4.info $msg`; + `logger -t $log_label -p local4.info $msg`; $rc = &runcmd($cmd); $msg = "odbcsetup: Client ODBC setup finished.\n"; - `logger -t xcat -p local4.info $msg`; + `logger -t $log_label -p local4.info $msg`; return $rc; @@ -161,12 +164,12 @@ sub setupPGodbc my $cmd; $cmd = "$::XCATROOT/bin/pgsqlsetup -o"; $msg = "odbcsetup: Running Client ODBC setup. \"$cmd\"\n"; - `logger -t xcat -p local4.info $msg`; + `logger -t $log_label -p local4.info $msg`; $rc = &runcmd($cmd); $msg = "odbcsetup: Client ODBC setup finished.\n"; - `logger -t xcat -p local4.info $msg`; + `logger -t $log_label -p local4.info $msg`; return $rc; @@ -194,7 +197,7 @@ sub runcmd { my $msg = "odbcsetup:\"$cmd\" returned rc=$rc \"$::outref\"\n"; print $msg; - `logger -t xcat -p local4.err $msg`; + `logger -t $log_label -p local4.err $msg`; return 1; } } diff --git a/xCAT/postscripts/redirectps b/xCAT/postscripts/redirectps index 4263037b1..2f9f6c1f9 100755 --- a/xCAT/postscripts/redirectps +++ b/xCAT/postscripts/redirectps @@ -7,10 +7,13 @@ # which is specified through nfsserver attribute # ##################################################### - +my $log_label=$ENV{'LOGLABEL'}; +if (!$log_label) { + $log_label="xcat" +} if (!$ENV{'NFSSERVER'}) { -`logger -t xcat -p local4.err "environment variable does not exist, exiting..."`; +`logger -t $log_label -p local4.err "environment variable does not exist, exiting..."`; exit -1; } @@ -80,13 +83,13 @@ sub runcmd $rc = $? >> 8; if ($rc > 0) { -`logger -t xcat -p local4.err "runcmd $cmd failed, error message is:"`; +`logger -t $log_label -p local4.err "runcmd $cmd failed, error message is:"`; my $errmsg; foreach my $err (@::outref) { $errmsg .= $err; } - `logger -t xcat -p local4.err "$errmsg"`; + `logger -t $log_label -p local4.err "$errmsg"`; exit -1; } } diff --git a/xCAT/postscripts/routeop b/xCAT/postscripts/routeop index eda755fa4..fbded3f97 100755 --- a/xCAT/postscripts/routeop +++ b/xCAT/postscripts/routeop @@ -33,7 +33,11 @@ if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then . /xcatpost/xcatlib.sh fi fi - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi op=$1 net=$2 @@ -806,7 +810,7 @@ if [ "$op" = "add" ]; then result=`$cmd 2>&1` code=$? if [ $code -ne 0 ]; then - logger -t xcat -p local4.err "$cmd\nerror code=$code, result=$result." + logger -t $log_label -p local4.err "$cmd\nerror code=$code, result=$result." echo " error code=$code, result=$result." if [ -f "/etc/debian_version" ];then exit 1; @@ -856,7 +860,7 @@ elif [ "$op" = "delete" ]; then result=`$cmd 2>&1` code=$? if [ $code -ne 0 ]; then - logger -t xcat -p local4.err "$cmd\nerror code=$code, result=$result." + logger -t $log_label -p local4.err "$cmd\nerror code=$code, result=$result." echo " error code=$code, result=$result." fi else @@ -909,7 +913,7 @@ elif [ "$op" = "replace" ]; then result=`$cmd 2>&1` code=$? if [ $code -ne 0 ]; then - logger -t xcat -p local4.err "Error: $cmd [error code=$code, result=$result]" + logger -t $log_label -p local4.err "Error: $cmd [error code=$code, result=$result]" echo "Error: $cmd [error code=$code, result=$result]" exit 1; fi diff --git a/xCAT/postscripts/serialconsole b/xCAT/postscripts/serialconsole index d1b3a0b31..72c589e40 100755 --- a/xCAT/postscripts/serialconsole +++ b/xCAT/postscripts/serialconsole @@ -1,10 +1,15 @@ # IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi GRUB="" for i in /boot/grub/grub.conf /boot/grub/menu.lst do if [ -r "$i" ] then - logger -t xcat -p local4.info "Install: got GRUB at $i" + logger -t $log_label -p local4.info "Install: got GRUB at $i" GRUB=$i GRUBDIR=$(dirname $GRUB) GRUBFILE=$(basename $GRUB) @@ -14,7 +19,7 @@ done if [ -n "$GRUB" ] then - logger -t xcat -p local4.info "Install: the GRUB dir is $GRUBDIR" + logger -t $log_label -p local4.info "Install: the GRUB dir is $GRUBDIR" cd $GRUBDIR perl -pi -e 's/^gfxmenu/#gfxmenu/' $GRUBFILE perl -pi -e 's/^color/#color/' $GRUBFILE diff --git a/xCAT/postscripts/setbootfromdisk b/xCAT/postscripts/setbootfromdisk index 60539988b..fe5267030 100755 --- a/xCAT/postscripts/setbootfromdisk +++ b/xCAT/postscripts/setbootfromdisk @@ -10,7 +10,11 @@ # on Redhat-family OSes with POWER system # #----------------------------------------------------------------------------- - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi OS=`uname` if [[ $OS = "Linux" ]]; then if [[ $OSVER = fedora* ]] || [[ $OSVER = rhels5* ]] || [[ $OSVER = rhel6* ]] || [[ $OSVER=rhels6* ]] || [[ -f /etc/fedora-release ]] || [[ -f /etc/redhat-release ]]; then @@ -36,13 +40,13 @@ if [[ $OS = "Linux" ]]; then then if echo $MPATH | grep "sdd" then - logger -t xcat -p local4.info setbootfromdisk: Setting sda sdb sdc sdd to be the default bootup device + logger -t $log_label -p local4.info setbootfromdisk: Setting sda sdb sdc sdd to be the default bootup device echo "setbootfromdisk: setting up sda sdb sdc sdd to be the default bootup device" bootlist -m normal sda sdb sdc sdd exit 0 fi fi - logger -t xcat -p local4.info setbootfromdisk: Setting sda sdb to be the default bootup device + logger -t $log_label -p local4.info setbootfromdisk: Setting sda sdb to be the default bootup device echo "setbootfromdisk: setting up sda sdb to be the default bootup device for software raid" bootlist -m normal sda sdb exit 0 @@ -67,13 +71,13 @@ if [[ $OS = "Linux" ]]; then then if echo $i | grep "sda" then - logger -t xcat -p local4.info setbootfromdisk: Setting sda sdb to be the default bootup device + logger -t $log_label -p local4.info setbootfromdisk: Setting sda sdb to be the default bootup device echo "setbootfromdisk: setting up sda sdb to be the default bootup device" bootlist -m normal sda sdb exit 0 elif echo $i | grep "sdc" then - logger -t xcat -p local4.info setbootfromdisk: Setting sdc sdd to be the default bootup device + logger -t $log_label -p local4.info setbootfromdisk: Setting sdc sdd to be the default bootup device echo "setbootfromdisk: setting up sdc sdd to be the default bootup device" bootlist -m normal sdc sdd exit 0 @@ -84,7 +88,7 @@ if [[ $OS = "Linux" ]]; then if echo $MPATH | grep "sdb" then - logger -t xcat -p local4.info setbootfromdisk: Setting sda sdb to be the default bootup device + logger -t $log_label -p local4.info setbootfromdisk: Setting sda sdb to be the default bootup device echo "setbootfromdisk: setting up sda sdb to be the default bootup device" bootlist -m normal sda sdb exit 0 @@ -92,15 +96,15 @@ if [[ $OS = "Linux" ]]; then fi if [[ -z $BOOTDEVICE ]]; then - logger -t xcat -p local4.err setbootfromdisk: cannot find the booting device + logger -t $log_label -p local4.err setbootfromdisk: cannot find the booting device else - logger -t xcat -p local4.info setbootfromdisk: Setting $BOOTDEVICE to be the default bootup device + logger -t $log_label -p local4.info setbootfromdisk: Setting $BOOTDEVICE to be the default bootup device echo "setbootfromdisk: setting up $BOOTDEVICE as the default bootup device" bootlist -m normal $BOOTDEVICE exit 0 fi else - logger -t xcat -p local4.err Could not find /usr/sbin/bootlist + logger -t $log_label -p local4.err Could not find /usr/sbin/bootlist echo "setbootfromdisk: could not find /usr/sbin/bootlist" exit -1 fi diff --git a/xCAT/postscripts/setbootfromnet b/xCAT/postscripts/setbootfromnet index 5de3fae93..32e879439 100755 --- a/xCAT/postscripts/setbootfromnet +++ b/xCAT/postscripts/setbootfromnet @@ -15,12 +15,16 @@ #----------------------------------------------------------------------------- NODE_NAME=$NODE GATE_WAY=$GATEWAY - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi OS=`uname` if [ -z $MASTER ]; then msg="$0: The environment variable MASTER is null, pls check.\n" echo $msg - logger -t xcat -p local4.err "$msg" + logger -t $log_label -p local4.err "$msg" exit 1 fi @@ -38,7 +42,7 @@ else if [ $SRET -ne 0 ]; then msg="$0: The returned value is not correct, server_ip=$SERVER_IP\n" echo $msg - logger -t xcat -p local4.err "$msg" + logger -t $log_label -p local4.err "$msg" exit 1 fi fi @@ -58,13 +62,13 @@ if [ ! -z $NODE_NAME ]; then else msg="$0: The environment variable NODE is null, pls check.\n" echo $msg - logger -t xcat -p local4.err "$msg" + logger -t $log_label -p local4.err "$msg" exit 1 fi if [[ $RET -ne 0 ]] || [[ $NRET -ne 0 ]]; then msg="$0: The returned value is not correct, client_ip=$client_ip, nic=$nic\n" - logger -t xcat -p local4.info "$msg" + logger -t $log_label -p local4.info "$msg" exit 1 fi @@ -77,7 +81,7 @@ if [ ! -z $NIC ]; then else msg="$0: The network interface NIC on the host $CLIENT_IP is not retrieved, pls check.\n" echo $msg - logger -t xcat -p local4.info "$msg" + logger -t $log_label -p local4.info "$msg" exit 1 fi diff --git a/xCAT/postscripts/setiscsiparms.awk b/xCAT/postscripts/setiscsiparms.awk index b9eb5c6a8..22cd0f385 100755 --- a/xCAT/postscripts/setiscsiparms.awk +++ b/xCAT/postscripts/setiscsiparms.awk @@ -6,13 +6,16 @@ BEGIN { initrd = ARGV[4] kcmd = ARGV[5] ns = "/inet/tcp/0/" ARGV[1] "/" xcatdport - + log_label=ENVIRON["LOGLABEL"] + if(!log_label){ + log_label="xcat" + } while(1) { if((ns |& getline) > 0) - print $0 | "logger -t xcat -p local4.info" + print $0 | "logger -t "log_label" -p local4.info" else { print "Retrying iSCSI paramater config script" - print "Retrying iSCSI paramater config script" | "logger -t xcat -p local4.info" + print "Retrying iSCSI paramater config script" | "logger -t "log_label" -p local4.info" close(ns) system("sleep 1") } diff --git a/xCAT/postscripts/setupLDAP b/xCAT/postscripts/setupLDAP index 6728c482a..f843de7e1 100755 --- a/xCAT/postscripts/setupLDAP +++ b/xCAT/postscripts/setupLDAP @@ -5,11 +5,15 @@ # setup LDAP client configuration on the compute nodes # #--------------------------------------------------------------------------- - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi if [ -r /etc/ldap.conf -a -r /etc/resolv.conf ] then echo -n " LDAP: " - logger -t xcat -p local4.info " LDAP: " + logger -t $log_label -p local4.info " LDAP: " DC=$( cat /etc/resolv.conf | \ egrep '(domain|search)' | \ diff --git a/xCAT/postscripts/setupesx b/xCAT/postscripts/setupesx index 3efdd00d1..81b94f4d0 100755 --- a/xCAT/postscripts/setupesx +++ b/xCAT/postscripts/setupesx @@ -2,13 +2,17 @@ # example on how to set up ESX. We setup ssh and also add a basic # VLAN configuration - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then str_dir_name=`dirname $0` . $str_dir_name/xcatlib.sh fi -logger -t xcat -p local4.info setupesx +logger -t $log_label -p local4.info setupesx # Enable SSH access to root and exchange keys sed -e 's/PermitRootLogin no/PermitRootLogin yes/' /etc/ssh/sshd_config > /etc/ssh/sshd_config.new @@ -18,7 +22,7 @@ restartservice ssh if [ -r /etc/ssh/sshd_config ] then - logger -t xcat -p local4.info "Install: setup /etc/ssh/sshd_config" + logger -t $log_label -p local4.info "Install: setup /etc/ssh/sshd_config" cp /etc/ssh/sshd_config /etc/ssh/sshd_config.ORIG sed -i 's/^X11Forwarding .*$/X11Forwarding yes/' /etc/ssh/sshd_config sed -i 's/^KeyRegenerationInterval .*$/KeyRegenerationInterval 0/' /etc/ssh/sshd_config @@ -34,7 +38,7 @@ fi if [ -d /xcatpost/_ssh ] then - logger -t xcat -p local4.info "Install: setup root .ssh" + logger -t $log_label -p local4.info "Install: setup root .ssh" cd /xcatpost/_ssh mkdir -p /root/.ssh cp -f * /root/.ssh @@ -66,7 +70,7 @@ esxcfg-firewall -e ntpClient esxcfg-firewall -o 123,udp,out,ntpServer esxcfg-firewall -o 514,udp,out,syslog esxcfg-firewall -l -logger -t xcat -p local4.info "Install: restart syslog" +logger -t $log_label -p local4.info "Install: restart syslog" #service syslog restart restartservice syslog diff --git a/xCAT/postscripts/setupnfsv4replication b/xCAT/postscripts/setupnfsv4replication index 40c1e631c..7aea3c07c 100755 --- a/xCAT/postscripts/setupnfsv4replication +++ b/xCAT/postscripts/setupnfsv4replication @@ -7,7 +7,10 @@ # It only works on AIX for now # ##################################################### - +my $log_label=$ENV{'LOGLABEL'}; +if (!$log_label) { + $log_label="xcat" +} # Change these two parameters according to your requirements $::NFSRETRIES = 3; $::NFSTIMEO = 50; @@ -57,13 +60,13 @@ sub runcmd $rc = $? >> 8; if ($rc > 0) { -`logger -t xcat -p local4.err "runcmd $cmd failed, error message is:"`; +`logger -t $log_label -p local4.err "runcmd $cmd failed, error message is:"`; my $errmsg; foreach my $err (@::outref) { $errmsg .= $err; } - `logger -t xcat -p local4.err "$errmsg"`; + `logger -t $log_label -p local4.err "$errmsg"`; exit; } diff --git a/xCAT/postscripts/setupntp b/xCAT/postscripts/setupntp index 22dbca662..75809581a 100755 --- a/xCAT/postscripts/setupntp +++ b/xCAT/postscripts/setupntp @@ -14,7 +14,11 @@ PATH="/usr/sbin:/usr/bin:/sbin:/bin" export PATH - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi # # warn_if_bad Put out warning message(s) if $1 has bad RC. # @@ -33,7 +37,7 @@ function warn_if_bad() # Broken shift - logger -t xcat -p local4.info "${script}: $@" >/dev/null 2>&1 + logger -t $log_label -p local4.info "${script}: $@" >/dev/null 2>&1 echo "${script}: $@" >&2 return "${rc}" } @@ -130,7 +134,7 @@ check_executes chronyd >/dev/null 2>&1 || USE_NTPD="yes" if [ -n "${USE_NTPD}" ] then # Call setupntp.traditional, and pass the parsed ntp servers - logger -t xcat -p local4.info "Will call setupntp.traditional" + logger -t $log_label -p local4.info "Will call setupntp.traditional" export NTPSERVERS="$(IFS=','; echo "${NTP_SERVERS[*]:-pool.ntp.org}")" exec "${0%/*}/setupntp.traditional" exit 255 @@ -161,7 +165,7 @@ timedatectl set-local-rtc 0 warn_if_bad "$?" "Failed to configure the system to maintain the RTC in universal time" # Synchronize and set the system clock once -logger -t xcat -p local4.info "Syncing the clock ..." +logger -t $log_label -p local4.info "Syncing the clock ..." chronyd -f /dev/null -q "$( if [ "${#NTP_SERVERS[@]}" -gt "0" ] then @@ -235,7 +239,7 @@ DRIFT_FILE="$( LOG_DIR="/var/log/chrony" -logger -t xcat -p local4.info "Install: Setup NTP - chrony" +logger -t $log_label -p local4.info "Install: Setup NTP - chrony" cp "${CHRONY_CONF}" "${CHRONY_CONF}.xcatsave" cat >"${CHRONY_CONF}" </dev/null || systemctl reload-or-restart chronyd.service 2>/dev/null exit_if_bad "$?" "Failed to start chrony service" -logger -t xcat -p local4.info "NTP setup accomplished!" +logger -t $log_label -p local4.info "NTP setup accomplished!" exit 0 diff --git a/xCAT/postscripts/setupntp.traditional b/xCAT/postscripts/setupntp.traditional index 959ab905f..788f4d191 100755 --- a/xCAT/postscripts/setupntp.traditional +++ b/xCAT/postscripts/setupntp.traditional @@ -10,10 +10,14 @@ if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then str_dir_name=`dirname $0` . $str_dir_name/xcatlib.sh fi - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi # if on the Management Node if [ -e /etc/xCATMN ]; then - logger -t xcat -p local4.info "setupntp: This postscript does not support running on the management node. Please run makentp command. exiting" + logger -t $log_label -p local4.info "setupntp: This postscript does not support running on the management node. Please run makentp command. exiting" exit 0 fi @@ -43,7 +47,7 @@ is_lsb_cumulus () return $? } -logger -t xcat "Install: Setup NTP" +logger -t $log_label "Install: Setup NTP" # Use the ntpservers defined in the site table, if they exist. # If the value of ntpservers is use the service node or # the management node as the ntp server. @@ -117,12 +121,12 @@ if [ $OS_TYPE = Linux ]; then fi msg='syncing the clock ...' - logger -t xcat $msg + logger -t $log_label $msg echo $msg if ! timeout 120 ntpd -gq > /dev/null 2>&1 ; then if ! ntpdate -t5 $master > /dev/null 2>&1; then msg='WARNING: NTP Sync Failed before timeout. ntp server will try to sync...' - logger -t xcat $msg + logger -t $log_label $msg echo $msg fi fi @@ -193,12 +197,12 @@ broadcastclient restrict 127.0.0.1" >>$conf_file stopsrc -s xntpd - logger -t xcat "ntpdate -t5 $master " + logger -t $log_label "ntpdate -t5 $master " ntpdate -t5 $master if [ "$?" != "0" ] then echo " ntpdate -t5 $master failed " - logger -t xcat "ntpdate -t5 $master failed" + logger -t $log_label "ntpdate -t5 $master failed" fi /usr/sbin/chrctcp -S -a xntpd fi diff --git a/xCAT/postscripts/setuppostbootscripts b/xCAT/postscripts/setuppostbootscripts index 582781dbc..4e7846d8c 100755 --- a/xCAT/postscripts/setuppostbootscripts +++ b/xCAT/postscripts/setuppostbootscripts @@ -10,13 +10,17 @@ # postscripts.postbootscripts will be run when the node reboots. #=cut #------------------------------------------------------------------------------- - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi #only works for diskful nodes if [ "$NODESETSTATE" = "netboot" -o \ "$NODESETSTATE" = "statelite" -o \ "$NODESETSTATE" = "diskless" -o \ "$NODESETSTATE" = "dataless" ]; then - logger -t xcat -p local4.info "setuppostbootscripts: Nothing to do for stateless and statelite nodes." + logger -t $log_label -p local4.info "setuppostbootscripts: Nothing to do for stateless and statelite nodes." exit 0 fi @@ -34,7 +38,7 @@ fi if [ -f $infofile ]; then value=`grep "RUNBOOTSCRIPTS=$RUNBOOTSCRIPTS" $infofile` if [[ -n $value ]]; then # match - logger -t xcat -p local4.info "setuppostbootscripts: xcatinfo uptodate, nothing to do." + logger -t $log_label -p local4.info "setuppostbootscripts: xcatinfo uptodate, nothing to do." exit 0 fi fi diff --git a/xCAT/postscripts/setupscratch b/xCAT/postscripts/setupscratch index 49c3bed3f..244e65847 100755 --- a/xCAT/postscripts/setupscratch +++ b/xCAT/postscripts/setupscratch @@ -8,7 +8,11 @@ # #==================================================================== ME="setupscratch" - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi mydir="/scratch" umount $mydir @@ -17,13 +21,13 @@ then if grep sda1 /proc/partitions >/dev/null 2>&1 then echo Autodetected existing /dev/sda1 - logger -t xcat -p local4.info $ME Autodetected existing /dev/sda1 + logger -t $log_label -p local4.info $ME Autodetected existing /dev/sda1 echo Checking filesystem /dev/sda1 - logger -t xcat -p local4.info $ME Checking filesystem /dev/sda1 + logger -t $log_label -p local4.info $ME Checking filesystem /dev/sda1 fsck -y /dev/sda1 mkdir -p $mydir echo mounting existing /dev/sda1 to $mydir - logger -t xcat -p local4.info $ME mounting existing /dev/sda1 to $mydir + logger -t $log_label -p local4.info $ME mounting existing /dev/sda1 to $mydir if mount /dev/sda1 $mydir then echo @@ -32,14 +36,14 @@ then exit 0 else echo mounting /dev/sda1 to $mydir failed - logger -t xcat -p local4.warning $ME mounting /dev/sda1 to $mydir failed + logger -t $log_label -p local4.warning $ME mounting /dev/sda1 to $mydir failed fi fi fi echo Creating Partition -logger -t xcat -p local4.info $ME Creating Partition +logger -t $log_label -p local4.info $ME Creating Partition parted -s /dev/sda mklabel gpt parted -s -- /dev/sda mkpart primary ext3 0 -0 if grep sda1 /proc/partitions >/dev/null 2>&1 @@ -47,7 +51,7 @@ then sleep 5 else echo failed to create partition, exiting $ME - logger -t xcat -p local4.err $ME failed to create partition, exiting $ME + logger -t $log_label -p local4.err $ME failed to create partition, exiting $ME echo echo Failed! echo @@ -55,11 +59,11 @@ else fi echo Creating new ext3 filesystem: /dev/sda1 -logger -t xcat -p local4.info $ME Creating new ext3 filesystem: /dev/sda1 +logger -t $log_label -p local4.info $ME Creating new ext3 filesystem: /dev/sda1 mke2fs -j /dev/sda1 mkdir -p $mydir echo mounting new /dev/sda1 to $mydir -logger -t xcat -p local4.info $ME mounting new /dev/sda1 to $mydir +logger -t $log_label -p local4.info $ME mounting new /dev/sda1 to $mydir mount /dev/sda1 $mydir echo echo Done! diff --git a/xCAT/postscripts/sudoer b/xCAT/postscripts/sudoer index 03c873965..45f90b1bb 100755 --- a/xCAT/postscripts/sudoer +++ b/xCAT/postscripts/sudoer @@ -7,7 +7,11 @@ # #------------------------------------------------------------------------------ - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then str_dir_name=`dirname $0` @@ -59,7 +63,7 @@ chown $SUDOER:users $HOME/.ssh/authorized_keys # Restart the SSHD for syncfiles postscript to do the sync work -logger -t xcat -p local4.info "Restarting SSHD" +logger -t $log_label -p local4.info "Restarting SSHD" #if [ -f "/etc/debian_version" ];then # service ssh restart #else diff --git a/xCAT/postscripts/umountpost b/xCAT/postscripts/umountpost index e7eb58671..e23e926b8 100755 --- a/xCAT/postscripts/umountpost +++ b/xCAT/postscripts/umountpost @@ -2,9 +2,13 @@ # IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html #(C)IBM Corp # - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi result=`umount /post 2>&1` returncode=$? -logger -t xcat -p local4.info $result +logger -t $log_label -p local4.info $result exit $returncode diff --git a/xCAT/postscripts/unlocktftpdir.awk b/xCAT/postscripts/unlocktftpdir.awk index f5371d165..2057092b9 100755 --- a/xCAT/postscripts/unlocktftpdir.awk +++ b/xCAT/postscripts/unlocktftpdir.awk @@ -4,13 +4,16 @@ BEGIN { xcatdport = ARGV[2] ns = "/inet/tcp/0/" ARGV[1] "/" xcatdport - + log_label=ENVIRON["LOGLABEL"] + if(!log_label){ + log_label="xcat" + } while(1) { if((ns |& getline) > 0) - print $0 | "logger -t xcat -p local4.info " + print $0 | "logger -t "log_label" -p local4.info " else { print "Retrying unlock of tftp directory" - print "$0: Retrying unlock of tftp directory" | "logger -t xcat -p local4.info " + print "$0: Retrying unlock of tftp directory" | "logger -t "log_label" -p local4.info " close(ns) system("sleep 5") } diff --git a/xCAT/postscripts/xcatclient b/xCAT/postscripts/xcatclient index af699f7ff..7571f3777 100755 --- a/xCAT/postscripts/xcatclient +++ b/xCAT/postscripts/xcatclient @@ -8,18 +8,23 @@ # The -d flag was implemented when the call to the routine was moved # from the postscript table into the servicenode postscript. # +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi if [ ! $1 ]; then - logger -t xcat -p local4.err "xcatclient call without -d, doing nothing." + logger -t $log_label -p local4.err "xcatclient call without -d, doing nothing." exit 0 fi if [ $1 != "-d" ]; then - logger -t xcat -p local4.err "xcatclient call without -d, doing nothing." + logger -t $log_label -p local4.err "xcatclient call without -d, doing nothing." exit 0 fi -logger -t xcat -p local4.info "xcatclient call with -d. getting credentials and cfgloc " +logger -t $log_label -p local4.info "xcatclient call with -d. getting credentials and cfgloc " if [ ! -x /usr/bin/openssl ]; then #Unless we have openssl stup - logger -t xcat -p local4.err "$0: /usr/bin/openssl is not executable" + logger -t $log_label -p local4.err "$0: /usr/bin/openssl is not executable" exit -1 fi USEOPENSSLFORXCAT=1 #Declare 2.3 style SSL @@ -44,7 +49,7 @@ export USEOPENSSLFORXCAT done else ERR_MSG=`sed -n 's%.*\(.*\).*%\1%p' /tmp/xcat_client_cred` - logger -t xcat -p local4.err xcat_client_cred Error: $ERR_MSG + logger -t $log_label -p local4.err xcat_client_cred Error: $ERR_MSG RETURNVAL=-1 fi rm /tmp/xcat_client_cred diff --git a/xCAT/postscripts/xcatpostinit b/xCAT/postscripts/xcatpostinit index 2085cd5ef..c5018bafe 100755 --- a/xCAT/postscripts/xcatpostinit +++ b/xCAT/postscripts/xcatpostinit @@ -14,13 +14,17 @@ # Short-Description: xCATpost # Description: xCAT post boot script ### END INIT INFO - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi # Source function library. if [ -x /etc/rc.d/init.d/functions ]; then . /etc/rc.d/init.d/functions fi -logger -t xcat -p local4.info "$0: action is $1" +logger -t $log_label -p local4.info "$0: action is $1" case $1 in restart) $0 stop @@ -28,11 +32,11 @@ restart) ;; status) echo -n "xcatpostinit runs only at boot, runs additional post scripts" - logger -t xcat -p local4.info "xcatpostinit runs only at boot, runs additional post scripts" + logger -t $log_label -p local4.info "xcatpostinit runs only at boot, runs additional post scripts" ;; stop) echo -n "nothing to stop " - logger -t xcat -p local4.info "nothing to stop" + logger -t $log_label -p local4.info "nothing to stop" ;; start) # Node is stateless by default @@ -59,10 +63,10 @@ start) # Run $SCRIPT according to node type if [ $STATELITE -ne 0 ]; then - logger -t xcat -p local4.info "Call $SCRIPT for statelite mode" + logger -t $log_label -p local4.info "Call $SCRIPT for statelite mode" "$SCRIPT" 4 else - logger -t xcat -p local4.info "Call $SCRIPT for stateless mode" + logger -t $log_label -p local4.info "Call $SCRIPT for stateless mode" "$SCRIPT" fi ;; diff --git a/xCAT/postscripts/xcatserver b/xCAT/postscripts/xcatserver index 636007cbd..a277fbd2e 100755 --- a/xCAT/postscripts/xcatserver +++ b/xCAT/postscripts/xcatserver @@ -7,24 +7,29 @@ # The -d flag was implemented when the call to the routine was moved # from the postscript table into the servicenode postscript. # +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi if [ ! $1 ]; then - logger -t xcat -p local4.err "xcatserver call without -d, doing nothing." + logger -t $log_label -p local4.err "xcatserver call without -d, doing nothing." #echo "xcatserver call without -d, doing nothing." #echo $1 exit 0 fi if [ $1 != "-d" ]; then - logger -t xcat -p local4.err "xcatserver call without -d, doing nothing." + logger -t $log_label -p local4.err "xcatserver call without -d, doing nothing." #echo "xcatserver call without -d, doing nothing." #echo $1 exit 0 fi -logger -t xcat -p local4.info "xcatserver call with -d. getting credentials and cfgloc " +logger -t $log_label -p local4.info "xcatserver call with -d. getting credentials and cfgloc " #echo "xcatserver call with -d, getting credentials and cfgloc." #echo $1 if [ ! -x /usr/bin/openssl ]; then - logger -t xcat -p local4.err "$0: /usr/bin/openssl is not executable" + logger -t $log_label -p local4.err "$0: /usr/bin/openssl is not executable" exit -1 fi USEOPENSSLFORXCAT=1 @@ -47,12 +52,12 @@ sleep 1 mkdir -p /etc/xcat/cert if [ $useflowcontrol = "1" ]; then #first contact daemon xcatflowrequest 3001 - logger -t xcat -p local4.info "xcatserver: sending xcatflowrequest $master 3001" + logger -t $log_label -p local4.info "xcatserver: sending xcatflowrequest $master 3001" /$xcatpost/xcatflowrequest $master 3001 rc=$? - logger -t xcat -p local4.info "xcatserver:xcatflowrequest received response return=$rc" + logger -t $log_label -p local4.info "xcatserver:xcatflowrequest received response return=$rc" if [ $rc -ne 0 ]; then - logger -t xcat -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control" + logger -t $log_label -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control" useflowcontrol=0 fi @@ -64,7 +69,7 @@ getcredentials.awk xcat_server_cred | grep -v '<'|sed -e 's/</' /etc/xcat/cert/server-cred.pem if [ $? -ne 0 ]; then #the message received is the data - logger -t xcat -p local4.info "xcatserver: getting server-cred.pem" + logger -t $log_label -p local4.info "xcatserver: getting server-cred.pem" MAX_RETRIES=10 RETRY=0 MYCONT=`cat /etc/xcat/cert/server-cred.pem` @@ -84,12 +89,12 @@ if [ $? -ne 0 ]; then fi if [ $useflowcontrol = "1" ]; then #first contact daemon xcatflowrequest 3001 - logger -t xcat -p local4.info "xcatserver: sending xcatflowrequest $master 3001" + logger -t $log_label -p local4.info "xcatserver: sending xcatflowrequest $master 3001" /$xcatpost/xcatflowrequest $master 3001 rc=$? - logger -t xcat -p local4.info "xcatserver:xcatflowrequest return=$rc" + logger -t $log_label -p local4.info "xcatserver:xcatflowrequest return=$rc" if [ $rc -ne 0 ]; then - logger -t xcat -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control" + logger -t $log_label -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control" useflowcontrol=0 fi fi @@ -103,7 +108,7 @@ if [ $? -ne 0 ]; then else # error from first getcredential call #the message received is an error from credentials.pm, so parse it ERR_MSG=`sed -n 's%.*\(.*\).*%\1%p' /etc/xcat/cert/server-cred.pem` - logger -t xcat -p local4.err xcatserver: $ERR_MSG + logger -t $log_label -p local4.err xcatserver: $ERR_MSG rm /etc/xcat/cert/server-cred.pem fi @@ -111,12 +116,12 @@ fi if [ $useflowcontrol = "1" ]; then #first contact daemon xcatflowrequest 3001 - logger -t xcat -p local4.info "xcatserver: sending xcatflowrequest $master 3001" + logger -t $log_label -p local4.info "xcatserver: sending xcatflowrequest $master 3001" /$xcatpost/xcatflowrequest $master 3001 rc=$? - logger -t xcat -p local4.info "xcatserver:xcatflowrequest received response return=$rc" + logger -t $log_label -p local4.info "xcatserver:xcatflowrequest received response return=$rc" if [ $rc -ne 0 ]; then - logger -t xcat -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control" + logger -t $log_label -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control" useflowcontrol=0 fi @@ -127,7 +132,7 @@ getcredentials.awk xcat_cfgloc | grep -v '<'|sed -e 's/<//' - grep -E '' /etc/xcat/cfgloc if [ $? -ne 0 ]; then #the message received is the data - logger -t xcat -p local4.info "xcatserver: getting cfgloc" + logger -t $log_label -p local4.info "xcatserver: getting cfgloc" MAX_RETRIES=10 RETRY=0 MYCONT=`cat /etc/xcat/cfgloc` @@ -147,12 +152,12 @@ if [ $? -ne 0 ]; then fi if [ $useflowcontrol = "1" ]; then #first contact daemon xcatflowrequest 3001 - logger -t xcat -p local4.info "xcatserver: sending xcatflowrequest $master 3001" + logger -t $log_label -p local4.info "xcatserver: sending xcatflowrequest $master 3001" /$xcatpost/xcatflowrequest $master 3001 rc=$? - logger -t xcat -p local4.info "xcatserver:xcatflowrequest return=$rc" + logger -t $log_label -p local4.info "xcatserver:xcatflowrequest return=$rc" if [ $rc -ne 0 ]; then - logger -t xcat -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control" + logger -t $log_label -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control" useflowcontrol=0 fi fi @@ -178,7 +183,7 @@ if [ $? -ne 0 ]; then else # error from first getcredentials call #the message received is an error from credentials.pm, so parse it ERR_MSG=`sed -n 's%.*\(.*\).*%\1%p' /etc/xcat/cfgloc` - logger -t xcat -p local4.err xcatserver: $ERR_MSG + logger -t $log_label -p local4.err xcatserver: $ERR_MSG rm /etc/xcat/cfgloc fi From b3490bf8a4bc6677a42738279c7ffbc8b13c84c9 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Thu, 15 Nov 2018 10:02:58 -0500 Subject: [PATCH 076/121] Add a test for rpm-sign, which is required to successfullly build the deps package --- builddep.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/builddep.sh b/builddep.sh index 2d7b221c1..4a3212917 100755 --- a/builddep.sh +++ b/builddep.sh @@ -49,6 +49,12 @@ if [ ! -d $GSA ]; then exit 1 fi +REQPKG="rpm-sign" +if [ `rpm -q $REQPKG >> /dev/null; echo $?` != 0 ]; then + echo "ERROR: $REQPKG is required to successfully create the xcat-deps package. Install and rerun." + exit 1 +fi + # set grep to quiet by default GREP="grep -q" if [ "$VERBOSE" = "1" -o "$VERBOSE" = "yes" ]; then From 59fd3da57339e16d319130ff697a1b78fdb80244 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Thu, 15 Nov 2018 10:04:25 -0500 Subject: [PATCH 077/121] Clean up code that was commented out 3 years back --- builddep.sh | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/builddep.sh b/builddep.sh index 4a3212917..08036c887 100755 --- a/builddep.sh +++ b/builddep.sh @@ -64,14 +64,10 @@ if [ "$VERBOSE" = "1" -o "$VERBOSE" = "yes" ]; then fi # this is needed only when we are transitioning the yum over to frs -# YUMREPOURL1="http://xcat.org/yum" -# YUMREPOURL2="http://xcat.org/files/yum" if [ "$FRSYUM" != 0 ]; then YUMDIR="$FRS/repos" - # YUMREPOURL="$YUMREPOURL2" else YUMDIR=htdocs - # YUMREPOURL="$YUMREPOURL1" fi cd `dirname $0` @@ -133,18 +129,6 @@ if [ "$OSNAME" != "AIX" ]; then # Modify xcat-dep.repo files to point to the correct place echo "===> Modifying the xcat-dep.repo files to point to the correct location..." - # 10/01/2015 - vkhu - # The URLs have been updated in GSA, this section is not needed at the moment - # - #if [ "$FRSYUM" != 0 ]; then - # newurl="$YUMREPOURL2" - # oldurl="$YUMREPOURL1" - #else - # newurl="$YUMREPOURL1" - # oldurl="$YUMREPOURL2" - #fi - # - #sed -i -e "s|=$oldurl|=$newurl|g" `find . -name "xcat-dep.repo" ` fi if [ "$OSNAME" == "AIX" ]; then From 540ee9f2629970159be074043bba8292348a6b0a Mon Sep 17 00:00:00 2001 From: bxuxa Date: Fri, 16 Nov 2018 12:39:50 +0800 Subject: [PATCH 078/121] when no ipmitool-xcat tool, report error before go ahead the real discovery --- xCAT-server/lib/xcat/plugins/bmcdiscover.pm | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm index 5d9798132..a16765531 100644 --- a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm +++ b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm @@ -322,22 +322,29 @@ sub bmcdiscovery_processargs { ###################################### # check if there is nmap or not ###################################### - if (-x '/usr/bin/nmap') - { + if (-x '/usr/bin/nmap') { $nmap_path = "/usr/bin/nmap"; } - elsif (-x '/usr/local/bin/nmap') - { + elsif (-x '/usr/local/bin/nmap') { $nmap_path = "/usr/local/bin/nmap"; } - else - { + else { my $rsp; push @{ $rsp->{data} }, "\tThere is no nmap in /usr/bin/ or /usr/local/bin/. \n "; xCAT::MsgUtils->message("E", $rsp, $::CALLBACK); return 1; } + ###################################### + # check if there is ipmitool-xcat or not + ###################################### + unless (-x '/opt/xcat/bin/ipmitool-xcat') { + my $rsp; + push @{ $rsp->{data} }, "\tThere is no ipmitool-xcat in /opt/xcat/bin/, make sure that package ipmitool-xcat is installed successfully.\n "; + xCAT::MsgUtils->message("E", $rsp, $::CALLBACK); + return 1; + } + if ($::opt_T) { my $msg = "The -t option is deprecated and will be ignored"; my $rsp = {}; From c64a539b5ab2ea505d0e8e7797fc96ca8985a9f2 Mon Sep 17 00:00:00 2001 From: Yuan Bai Date: Fri, 16 Nov 2018 13:21:06 +0800 Subject: [PATCH 079/121] confignics find wrong network for nic when mask is empty (#5809) * confignics find wrong network for nic when mask is empty --- xCAT/postscripts/confignics | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xCAT/postscripts/confignics b/xCAT/postscripts/confignics index 039bd4cad..4718fbee9 100755 --- a/xCAT/postscripts/confignics +++ b/xCAT/postscripts/confignics @@ -81,6 +81,10 @@ function findnetwork(){ eval str_temp=\$NETWORKS_LINE$num_i str_net=`echo $str_temp | awk -F'net=' '{print $2}' | awk -F'|' '{print $1}'` str_mask=`echo $str_temp | awk -F'mask=' '{print $2}' | awk -F'|' '{print $1}' | sed 's:^/::'` + if [ ! $str_mask ]; then + num_i=$((num_i+1)) + continue + fi echo $str_net | grep ':' > /dev/null if [ $? -ne 0 ];then if [ $flag_v6 -eq 0 ];then @@ -107,8 +111,7 @@ function findnetwork(){ fi num_i=$((num_i+1)) done - - echo "Error: Can not find the corresponding network defination for ip address: $str_ip ." + echo "Error: Can not find a valid network defination for ip address: $str_ip , make sure netname,net and mask are correct in networks table." error_code=1 } @@ -339,7 +342,6 @@ do error_code=1 continue fi - str_network=$(checknetwork ${array_temp[0]}) echo "$str_network" | grep -i 'error' > /dev/null if [ $? -eq 0 ];then @@ -347,7 +349,6 @@ do echo "confignics on $NODE: $str_network" continue fi - if [ "$str_nic_type" = "ethernet" ];then logger -t $log_label -p local4.info "confignics: call 'configeth $key ${array_temp[0]} $str_network'" echo "confignics on $NODE: call 'configeth $key ${array_temp[0]} $str_network'" From 6d9a912cf7fafc094aa4bcd646287c9e4ae21a33 Mon Sep 17 00:00:00 2001 From: xuweibj Date: Fri, 16 Nov 2018 17:33:37 +0800 Subject: [PATCH 080/121] Use postscript file efibootmgr to check http service instead of syslog (#5758) --- xCAT-probe/lib/perl/probe_utils.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/xCAT-probe/lib/perl/probe_utils.pm b/xCAT-probe/lib/perl/probe_utils.pm index 9cfe1c319..e7749f492 100644 --- a/xCAT-probe/lib/perl/probe_utils.pm +++ b/xCAT-probe/lib/perl/probe_utils.pm @@ -298,8 +298,9 @@ sub is_http_ready { $$errormsg_ref = "The port defined in 'site' table HTTP is not listening"; return 0; } + my $test_file = "efibootmgr"; - my $http = "http://$mnip:$httpport/$installdir/postscripts/syslog"; + my $http = "http://$mnip:$httpport/$installdir/postscripts/$test_file"; my %httperror = ( "400" => "The request $http could not be understood by the server due to malformed syntax", "401" => "The request requires user authentication.", @@ -330,12 +331,12 @@ sub is_http_ready { $$errormsg_ref = "Prepare test environment error: $!"; return 0; } - my @outputtmp = `wget -O $tmpdir/syslog $http 2>&1`; + my @outputtmp = `wget -O $tmpdir/$test_file $http 2>&1`; my $rst = $?; $rst = $rst >> 8; - if ((!$rst) && (-e "$tmpdir/syslog")) { - unlink("$tmpdir/syslog"); + if ((!$rst) && (-e "$tmpdir/$test_file")) { + unlink("$tmpdir/$test_file"); rmdir ("$tmpdir"); return 1; } elsif ($rst == 4) { @@ -355,7 +356,7 @@ sub is_http_ready { $$errormsg_ref = "Unknown return code of wget <$returncode>."; } } - unlink("$tmpdir/syslog"); + unlink("$tmpdir/$test_file"); if(! rmdir ("$tmpdir")){ $$errormsg_ref .= " Clean test environment error(rmdir $tmpdir): $!"; } From fc01224da04e169844b12dcc2aeebe63f86241bc Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Fri, 16 Nov 2018 11:31:54 -0500 Subject: [PATCH 081/121] Add a test to make sure we are not running this on debian based operating systems --- builddep.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/builddep.sh b/builddep.sh index 08036c887..ca4206c42 100755 --- a/builddep.sh +++ b/builddep.sh @@ -19,6 +19,14 @@ # of the FRS area. # VERBOSE=1 - Set to 1 to see more VERBOSE output +# This script should only be run on RPM based machines +# This test is not foolproof, but at least tries to detect +if [ `/bin/rpm -q -f /bin/rpm >/dev/null 2>&1; echo $?` != 0 ]; then + echo "ERROR: This script should only be executed on a RPM based Operation System." + exit 1 +fi + +exit 0 # you can change this if you need to USER=xcat TARGET_MACHINE=xcat.org From 33fa03880aaa88eec04eaa5d565f4b503a2a25a4 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Fri, 16 Nov 2018 11:39:56 -0500 Subject: [PATCH 082/121] Add more packages to check for when running the builddep.sh scripts --- builddep.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/builddep.sh b/builddep.sh index ca4206c42..8f66989c4 100755 --- a/builddep.sh +++ b/builddep.sh @@ -26,7 +26,6 @@ if [ `/bin/rpm -q -f /bin/rpm >/dev/null 2>&1; echo $?` != 0 ]; then exit 1 fi -exit 0 # you can change this if you need to USER=xcat TARGET_MACHINE=xcat.org @@ -57,11 +56,15 @@ if [ ! -d $GSA ]; then exit 1 fi -REQPKG="rpm-sign" -if [ `rpm -q $REQPKG >> /dev/null; echo $?` != 0 ]; then - echo "ERROR: $REQPKG is required to successfully create the xcat-deps package. Install and rerun." - exit 1 -fi +REQPKG=("rpm-sign" "createrepo") +for pkg in ${REQPKG[*]}; do + if [ `rpm -q $pkg >> /dev/null; echo $?` != 0 ]; then + echo "ERROR: $pkg is required to successfully create the xcat-deps package. Install and rerun." + exit 1 + else + echo "Checking for package=$pkg ..." + fi +done # set grep to quiet by default GREP="grep -q" From 68ffc340dddc01e138799531b1d5fb4c84e81263 Mon Sep 17 00:00:00 2001 From: litingt Date: Sun, 18 Nov 2018 21:12:36 -0500 Subject: [PATCH 083/121] add http port change case, do task 339 --- xCAT-test/autotest/testcase/httpport/cases0 | 29 +++++++++++++++++++ .../testcase/httpport/change_http_port.sh | 24 +++++++++++++++ .../testcase/httpport/check_wget_files.sh | 25 ++++++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 xCAT-test/autotest/testcase/httpport/cases0 create mode 100755 xCAT-test/autotest/testcase/httpport/change_http_port.sh create mode 100755 xCAT-test/autotest/testcase/httpport/check_wget_files.sh diff --git a/xCAT-test/autotest/testcase/httpport/cases0 b/xCAT-test/autotest/testcase/httpport/cases0 new file mode 100644 index 000000000..8030ed03c --- /dev/null +++ b/xCAT-test/autotest/testcase/httpport/cases0 @@ -0,0 +1,29 @@ +start:http_port_change +description:Add test cases for bug fix 2629, change http port and then generate genesis (mknb). +label:others +cmd:netstat -nlp|grep -E "apache2|httpd" +check:output =~ 80 +cmd:lsdef -t site -i httpport -c |awk -F"=" '{print $2}' +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/httpport/change_http_port.sh 80 8898 +cmd:netstat -nlp|grep -E "apache2|httpd" +check:output =~ 8898 +check:rc==0 +cmd:chdef -t site httpport=8898 +check:rc==0 +cmd:lsdef -t site -i httpport -c +check:output =~ 8898 +check:rc==0 +cmd:if [[ "__GETNODEATTR($$CN,arch)__" = "ppc64le" ]]; then arch=ppc64; else arch=__GETNODEATTR($$CN,arch)__;fi; mknb $arch +check:rc==0 +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/httpport/check_wget_files.sh /tftpboot/pxelinux.cfg/p/ +check:rc==0 +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/httpport/change_http_port.sh 8898 80 +cmd:netstat -nlp|grep -E "apache2|httpd" +check:output =~ 80 +check:rc==0 +cmd:chdef -t site httpport=80 +check:rc==0 +cmd:lsdef -t site -i httpport -c +check:output =~ 80 +check:rc==0 +end diff --git a/xCAT-test/autotest/testcase/httpport/change_http_port.sh b/xCAT-test/autotest/testcase/httpport/change_http_port.sh new file mode 100755 index 000000000..f3b665d6e --- /dev/null +++ b/xCAT-test/autotest/testcase/httpport/change_http_port.sh @@ -0,0 +1,24 @@ +#!/bin/bash +if [ -f "/etc/httpd/conf/httpd.conf" ]; then + config="/etc/httpd/conf/httpd.conf" +elif [ -f "/etc/apache2/ports.conf" ]; then + config="/etc/apache2/ports.conf" +elif [ -f "/etc/apache2/listen.conf" ]; then + config="/etc/apache2/listen.conf" +fi +port=`awk -F' ' '/^[Ll]isten / {print $2}' $config` +echo "The original httpd port is $port in $config" + +echo "start to change httpd listen port to 8898" +sed -i "s/^Listen $1/Listen $2/g" $config +if [ -f "/etc/apache2/sites-enabled/000-default.conf" ]; then + sed -i "s/VirtualHost \*:$1/VirtualHost \*:$2/g" /etc/apache2/sites-enabled/000-default.conf + service apache2 stop + sleep 1 + service apache2 start +else + service httpd stop + sleep 1 + service httpd start +fi +exit diff --git a/xCAT-test/autotest/testcase/httpport/check_wget_files.sh b/xCAT-test/autotest/testcase/httpport/check_wget_files.sh new file mode 100755 index 000000000..d80489a42 --- /dev/null +++ b/xCAT-test/autotest/testcase/httpport/check_wget_files.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# get all filename in specified path +path=$1 +files=$(ls $path) +for filename in $files +do + echo "The file is $filename" + grep 8898 $path$filename + if [ $? != 0 ];then + echo "port 8898 does not exist" + exit 1; + fi + links=$(grep 8898 $path$filename|awk -F " " '{print $2}') + for link in $links + do + wget $link + if [ $? != 0 ];then + echo "wget failed" + exit 1; + else + echo "wget $link succeed" + fi + done +done From b4c6425ee374a1991e8c1ade5b1a266278f45e57 Mon Sep 17 00:00:00 2001 From: litingt Date: Sun, 18 Nov 2018 22:02:42 -0500 Subject: [PATCH 084/121] update according to comments --- xCAT-test/autotest/testcase/httpport/cases0 | 2 +- .../autotest/testcase/httpport/check_wget_files.sh | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/xCAT-test/autotest/testcase/httpport/cases0 b/xCAT-test/autotest/testcase/httpport/cases0 index 8030ed03c..cc6b768d4 100644 --- a/xCAT-test/autotest/testcase/httpport/cases0 +++ b/xCAT-test/autotest/testcase/httpport/cases0 @@ -15,7 +15,7 @@ check:output =~ 8898 check:rc==0 cmd:if [[ "__GETNODEATTR($$CN,arch)__" = "ppc64le" ]]; then arch=ppc64; else arch=__GETNODEATTR($$CN,arch)__;fi; mknb $arch check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/httpport/check_wget_files.sh /tftpboot/pxelinux.cfg/p/ +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/httpport/check_wget_files.sh /tftpboot/pxelinux.cfg/p/ 8898 check:rc==0 cmd:/opt/xcat/share/xcat/tools/autotest/testcase/httpport/change_http_port.sh 8898 80 cmd:netstat -nlp|grep -E "apache2|httpd" diff --git a/xCAT-test/autotest/testcase/httpport/check_wget_files.sh b/xCAT-test/autotest/testcase/httpport/check_wget_files.sh index d80489a42..6ffd76af7 100755 --- a/xCAT-test/autotest/testcase/httpport/check_wget_files.sh +++ b/xCAT-test/autotest/testcase/httpport/check_wget_files.sh @@ -6,20 +6,20 @@ files=$(ls $path) for filename in $files do echo "The file is $filename" - grep 8898 $path$filename + grep $2 $path$filename if [ $? != 0 ];then - echo "port 8898 does not exist" + echo "port $2 does not exist" exit 1; fi - links=$(grep 8898 $path$filename|awk -F " " '{print $2}') + links=$(grep $2 $path$filename|awk -F " " '{print $2}') for link in $links do wget $link if [ $? != 0 ];then - echo "wget failed" + echo "wget file $link failed" exit 1; else - echo "wget $link succeed" + echo "wget file $link succeed" fi done done From 5311d7c01f49ad6781e8e8f0566d4d9a82846690 Mon Sep 17 00:00:00 2001 From: litingt Date: Sun, 18 Nov 2018 22:06:55 -0500 Subject: [PATCH 085/121] update --- xCAT-test/autotest/testcase/httpport/change_http_port.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-test/autotest/testcase/httpport/change_http_port.sh b/xCAT-test/autotest/testcase/httpport/change_http_port.sh index f3b665d6e..527bd290d 100755 --- a/xCAT-test/autotest/testcase/httpport/change_http_port.sh +++ b/xCAT-test/autotest/testcase/httpport/change_http_port.sh @@ -9,7 +9,7 @@ fi port=`awk -F' ' '/^[Ll]isten / {print $2}' $config` echo "The original httpd port is $port in $config" -echo "start to change httpd listen port to 8898" +echo "start to change httpd listen port to $2" sed -i "s/^Listen $1/Listen $2/g" $config if [ -f "/etc/apache2/sites-enabled/000-default.conf" ]; then sed -i "s/VirtualHost \*:$1/VirtualHost \*:$2/g" /etc/apache2/sites-enabled/000-default.conf From dff87327261fbdda397a7ef9a1dc4727779c45b9 Mon Sep 17 00:00:00 2001 From: litingt Date: Mon, 19 Nov 2018 02:56:48 -0500 Subject: [PATCH 086/121] do task 397,fix xcat-inventory cases for ubuntu command not found --- .../testcase/xcat-inventory/cases.node | 332 +++++++++--------- .../testcase/xcat-inventory/cases.osimage | 56 +-- .../testcase/xcat-inventory/cases.site | 48 +-- 3 files changed, 218 insertions(+), 218 deletions(-) diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.node b/xCAT-test/autotest/testcase/xcat-inventory/cases.node index f4c66a182..9be85e214 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.node +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.node @@ -4,15 +4,15 @@ Attribute: $$DSTMN - the ip of MN which is used to run import operation. label:others,xcat_inventory cmd:mkdir -p /tmp/export_import_single_ppc_by_json check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_ppc_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_ppc_by_json_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_ppc_by_json/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_ppc_by_json/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_ppc_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_ppc_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=hmc nodetype=ppc,osi addkcmdline=addkcmdline arch=ppc64 authdomain=authdomain cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping cons=cons conserver=conserver consoleondemand=consoleondemand cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac hcp=HMC height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype id=5 installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou parent=parent password=password pdu=pdu postbootscripts=postbootscripts postscripts=postscripts power=power pprofile=pprofile prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment username=username vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmmanager=vmmanager vmmaster=vmmaster vmnicnicmodel=vmnicnicmodel vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -24,9 +24,9 @@ cmd:scp /tmp/export_import_single_ppc_by_json/bogusnode_json.inv $$DSTMN:/tmp/ex check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_ppc_by_json_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_ppc_by_json_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_ppc_by_json_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_ppc_by_json/dstbogusnode.stanza check:rc==0 @@ -34,17 +34,17 @@ cmd: cat /tmp/export_import_single_ppc_by_json/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_ppc_by_json/srcbogusnode.stanza /tmp/export_import_single_ppc_by_json/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_ppc_by_json/bogusnode.stanza ]]; then cat /tmp/export_import_single_ppc_by_json/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_ppc_by_json/bogusgroup.stanza ]]; then cat /tmp/export_import_single_ppc_by_json/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_ppc_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_ppc_by_json_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_ppc_by_json check:rc==0 @@ -57,15 +57,15 @@ Attribute: $$DSTMN - the ip of MN which is used to run import operation. label:others,xcat_inventory cmd:mkdir -p /tmp/export_import_single_ppc_by_yaml check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_ppc_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_ppc_by_yaml_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_ppc_by_yaml/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_ppc_by_yaml/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=hmc nodetype=ppc,osi addkcmdline=addkcmdline arch=ppc64 authdomain=authdomain cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping cons=cons conserver=conserver consoleondemand=consoleondemand cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac hcp=HMC height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype id=5 installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou parent=parent password=password pdu=pdu postbootscripts=postbootscripts postscripts=postscripts power=power pprofile=pprofile prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment username=username vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmmanager=vmmanager vmmaster=vmmaster vmnicnicmodel=vmnicnicmodel vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -77,9 +77,9 @@ cmd:scp /tmp/export_import_single_ppc_by_yaml/bogusnode_yaml.inv $$DSTMN:/tmp/ex check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_ppc_by_yaml_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_ppc_by_yaml_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_ppc_by_yaml_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_ppc_by_yaml/dstbogusnode.stanza check:rc==0 @@ -87,17 +87,17 @@ cmd: cat /tmp/export_import_single_ppc_by_yaml/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_ppc_by_yaml/srcbogusnode.stanza /tmp/export_import_single_ppc_by_yaml/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_ppc_by_yaml/bogusnode.stanza ]]; then cat /tmp/export_import_single_ppc_by_yaml/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_ppc_by_yaml/bogusgroup.stanza ]]; then cat /tmp/export_import_single_ppc_by_yaml/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_ppc_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_ppc_by_yaml_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_ppc_by_yaml check:rc==0 @@ -110,15 +110,15 @@ Attribute: $$DSTMN - the ip of MN which is used to run import operation. label:others,xcat_inventory cmd:mkdir -p /tmp/export_import_single_kvm_by_json check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_kvm_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_kvm_by_json_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_kvm_by_json/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_kvm_by_json/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_kvm_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_kvm_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=kvm addkcmdline=addkcmdline arch=ppc64le authdomain=authdomain cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping cons=cons conserver=conserver consoleondemand=consoleondemand cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype id=5 installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou pdu=pdu postbootscripts=postbootscripts postscripts=postscripts power=power prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmcpus=vmcpus vmhost=vmhost vmmanager=vmmanager vmmaster=vmmaster vmmemory=vmmemory vmnicnicmodel=vmnicnicmodel vmnics=vmnics vmothersetting=vmothersetting vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -130,9 +130,9 @@ cmd:scp /tmp/export_import_single_kvm_by_json/bogusnode_json.inv $$DSTMN:/tmp/ex check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_kvm_by_json_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_kvm_by_json_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_kvm_by_json_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_kvm_by_json/dstbogusnode.stanza check:rc==0 @@ -140,17 +140,17 @@ cmd: cat /tmp/export_import_single_kvm_by_json/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_kvm_by_json/srcbogusnode.stanza /tmp/export_import_single_kvm_by_json/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_kvm_by_json/bogusnode.stanza ]]; then cat /tmp/export_import_single_kvm_by_json/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_kvm_by_json/bogusgroup.stanza ]]; then cat /tmp/export_import_single_kvm_by_json/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_kvm_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_kvm_by_json_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_kvm_by_json check:rc==0 @@ -164,15 +164,15 @@ Attribute: $$DSTMN - the ip of MN which is used to run import operation. label:others,xcat_inventory cmd:mkdir -p /tmp/export_import_single_kvm_by_yaml check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_kvm_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_kvm_by_yaml_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_kvm_by_yaml/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_kvm_by_yaml/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=kvm addkcmdline=addkcmdline arch=ppc64le authdomain=authdomain cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping cons=cons conserver=conserver consoleondemand=consoleondemand cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype id=5 installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou pdu=pdu postbootscripts=postbootscripts postscripts=postscripts power=power prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmcpus=vmcpus vmhost=vmhost vmmanager=vmmanager vmmaster=vmmaster vmmemory=vmmemory vmnicnicmodel=vmnicnicmodel vmnics=vmnics vmothersetting=vmothersetting vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -184,9 +184,9 @@ cmd:scp /tmp/export_import_single_kvm_by_yaml/bogusnode_yaml.inv $$DSTMN:/tmp/ex check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_kvm_by_yaml_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_kvm_by_yaml_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_kvm_by_yaml_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_kvm_by_yaml/dstbogusnode.stanza check:rc==0 @@ -194,17 +194,17 @@ cmd: cat /tmp/export_import_single_kvm_by_yaml/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_kvm_by_yaml/srcbogusnode.stanza /tmp/export_import_single_kvm_by_yaml/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_kvm_by_yaml/bogusnode.stanza ]]; then cat /tmp/export_import_single_kvm_by_yaml/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_kvm_by_yaml/bogusgroup.stanza ]]; then cat /tmp/export_import_single_kvm_by_yaml/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_kvm_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_kvm_by_yaml_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_kvm_by_yaml check:rc==0 @@ -218,15 +218,15 @@ Attribute: $$DSTMN - the ip of MN which is used to run import operation. label:others,xcat_inventory cmd:mkdir -p /tmp/export_import_single_pdu_by_json check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_pdu_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_pdu_by_json_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_pdu_by_json/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_pdu_by_json/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_pdu_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_pdu_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=pdu nodetype=pdu addkcmdline=addkcmdline arch=ppc64 authdomain=authdomain authkey=authkey authtype=MD5 cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping community=community cons=cons conserver=conserver consoleondemand=consoleondemand cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou outlet=outlet password=password pdu=pdu pdutype=pdutype postbootscripts=postbootscripts postscripts=postscripts power=power prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn privkey=privkey privtype=AES productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames seclevel=noAuthNoPriv serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot snmpuser=snmpuser snmpversion=SNMPv1 storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment username=username vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmmanager=vmmanager vmmaster=vmmaster vmnicnicmodel=vmnicnicmodel vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -238,9 +238,9 @@ cmd:scp /tmp/export_import_single_pdu_by_json/bogusnode_json.inv $$DSTMN:/tmp/ex check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_pdu_by_json_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_pdu_by_json_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_pdu_by_json_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_pdu_by_json/dstbogusnode.stanza check:rc==0 @@ -248,17 +248,17 @@ cmd: cat /tmp/export_import_single_pdu_by_json/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_pdu_by_json/srcbogusnode.stanza /tmp/export_import_single_pdu_by_json/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_pdu_by_json/bogusnode.stanza ]]; then cat /tmp/export_import_single_pdu_by_json/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_pdu_by_json/bogusgroup.stanza ]]; then cat /tmp/export_import_single_pdu_by_json/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_pdu_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_pdu_by_json_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_pdu_by_json check:rc==0 @@ -271,15 +271,15 @@ Attribute: $$DSTMN - the ip of MN which is used to run import operation. label:others,xcat_inventory cmd:mkdir -p /tmp/export_import_single_pdu_by_yaml check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_pdu_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_pdu_by_yaml_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_pdu_by_yaml/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_pdu_by_yaml/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=pdu nodetype=pdu addkcmdline=addkcmdline arch=ppc64 authdomain=authdomain authkey=authkey authtype=MD5 cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping community=community cons=cons conserver=conserver consoleondemand=consoleondemand cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou outlet=outlet password=password pdu=pdu pdutype=pdutype postbootscripts=postbootscripts postscripts=postscripts power=power prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn privkey=privkey privtype=AES productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames seclevel=noAuthNoPriv serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot snmpuser=snmpuser snmpversion=SNMPv1 storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment username=username vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmmanager=vmmanager vmmaster=vmmaster vmnicnicmodel=vmnicnicmodel vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -291,9 +291,9 @@ cmd:scp /tmp/export_import_single_pdu_by_yaml/bogusnode_yaml.inv $$DSTMN:/tmp/ex check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_pdu_by_yaml_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_pdu_by_yaml_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_pdu_by_yaml_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_pdu_by_yaml/dstbogusnode.stanza check:rc==0 @@ -301,17 +301,17 @@ cmd: cat /tmp/export_import_single_pdu_by_yaml/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_pdu_by_yaml/srcbogusnode.stanza /tmp/export_import_single_pdu_by_yaml/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_pdu_by_yaml/bogusnode.stanza ]]; then cat /tmp/export_import_single_pdu_by_yaml/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_pdu_by_yaml/bogusgroup.stanza ]]; then cat /tmp/export_import_single_pdu_by_yaml/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_pdu_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_pdu_by_yaml_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_pdu_by_yaml check:rc==0 @@ -324,15 +324,15 @@ Attribute: $$DSTMN - the ip of MN which is used to run import operation. label:others,xcat_inventory cmd:mkdir -p /tmp/export_import_single_boston_by_yaml check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_boston_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_boston_by_yaml_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_boston_by_yaml/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_boston_by_yaml/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=ipmi addkcmdline=addkcmdline arch=ppc64le authdomain=authdomain bmc=bmc bmcpassword=bmcpassword bmcport=bmcport bmcusername=bmcusername bmcvlantag=bmcvlantag cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping cons=cons conserver=conserver consoleondemand=consoleondemand cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou pdu=pdu postbootscripts=postbootscripts postscripts=postscripts power=power prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot slotid=slotid storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmmanager=vmmanager vmmaster=vmmaster vmnicnicmodel=vmnicnicmodel vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -344,9 +344,9 @@ cmd:scp /tmp/export_import_single_boston_by_yaml/bogusnode_yaml.inv $$DSTMN:/tmp check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_boston_by_yaml_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_boston_by_yaml_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_boston_by_yaml_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_boston_by_yaml/dstbogusnode.stanza check:rc==0 @@ -354,17 +354,17 @@ cmd: cat /tmp/export_import_single_boston_by_yaml/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_boston_by_yaml/srcbogusnode.stanza /tmp/export_import_single_boston_by_yaml/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_boston_by_yaml/bogusnode.stanza ]]; then cat /tmp/export_import_single_boston_by_yaml/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_boston_by_yaml/bogusgroup.stanza ]]; then cat /tmp/export_import_single_boston_by_yaml/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_boston_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_boston_by_yaml_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_boston_by_yaml check:rc==0 @@ -376,15 +376,15 @@ Attribute: $$DSTMN - the ip of MN which is used to run import operation. label:others,xcat_inventory cmd:mkdir -p /tmp/export_import_single_boston_by_json check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_boston_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_boston_by_json_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_boston_by_json/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_boston_by_json/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_boston_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_boston_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_boston_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_boston_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=ipmi addkcmdline=addkcmdline arch=ppc64le authdomain=authdomain bmc=bmc bmcpassword=bmcpassword bmcport=bmcport bmcusername=bmcusername bmcvlantag=bmcvlantag cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping cons=cons conserver=conserver consoleondemand=consoleondemand cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou pdu=pdu postbootscripts=postbootscripts postscripts=postscripts power=power prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot slotid=slotid storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmmanager=vmmanager vmmaster=vmmaster vmnicnicmodel=vmnicnicmodel vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -396,9 +396,9 @@ cmd:scp /tmp/export_import_single_boston_by_json/bogusnode_json.inv $$DSTMN:/tmp check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_boston_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_boston_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_boston_by_json_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_boston_by_json_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_boston_by_json_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_boston_by_json/dstbogusnode.stanza check:rc==0 @@ -406,17 +406,17 @@ cmd: cat /tmp/export_import_single_boston_by_json/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_boston_by_json/srcbogusnode.stanza /tmp/export_import_single_boston_by_json/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_boston_by_json/bogusnode.stanza ]]; then cat /tmp/export_import_single_boston_by_json/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_boston_by_json/bogusgroup.stanza ]]; then cat /tmp/export_import_single_boston_by_json/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_boston_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_boston_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_boston_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_boston_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_boston_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_boston_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_boston_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_boston_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_boston_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_boston_by_json_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_boston_by_json check:rc==0 @@ -428,15 +428,15 @@ Attribute: $$DSTMN - the ip of MN which is used to run import operation. label:others,xcat_inventory cmd:mkdir -p /tmp/export_import_single_witherspoon_by_yaml check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_witherspoon_by_yaml/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_witherspoon_by_yaml/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=openbmc nodetype=mp addkcmdline=addkcmdline arch=ppc64le authdomain=authdomain bmc=bmc bmcpassword=bmcpassword bmcusername=bmcusername bmcvlantag=bmcvlantag cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping cons=cons conserver=conserver consoleondemand=consoleondemand consport=consport cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou pdu=pdu postbootscripts=postbootscripts postscripts=postscripts power=power prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmmanager=vmmanager vmmaster=vmmaster vmnicnicmodel=vmnicnicmodel vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -448,9 +448,9 @@ cmd:scp /tmp/export_import_single_witherspoon_by_yaml/bogusnode_yaml.inv $$DSTMN check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_witherspoon_by_yaml/dstbogusnode.stanza check:rc==0 @@ -458,17 +458,17 @@ cmd: cat /tmp/export_import_single_witherspoon_by_yaml/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_witherspoon_by_yaml/srcbogusnode.stanza /tmp/export_import_single_witherspoon_by_yaml/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_witherspoon_by_yaml/bogusnode.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_yaml/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_witherspoon_by_yaml/bogusgroup.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_yaml/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_witherspoon_by_yaml check:rc==0 @@ -480,15 +480,15 @@ Attribute: $$DSTMN - the ip of MN which is used to run import operation. label:others,xcat_inventory cmd:mkdir -p /tmp/export_import_single_witherspoon_by_json check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_witherspoon_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_witherspoon_by_json_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_witherspoon_by_json/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_witherspoon_by_json/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=openbmc nodetype=mp addkcmdline=addkcmdline arch=ppc64le authdomain=authdomain bmc=bmc bmcpassword=bmcpassword bmcusername=bmcusername bmcvlantag=bmcvlantag cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping cons=cons conserver=conserver consoleondemand=consoleondemand consport=consport cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou pdu=pdu postbootscripts=postbootscripts postscripts=postscripts power=power prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmmanager=vmmanager vmmaster=vmmaster vmnicnicmodel=vmnicnicmodel vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -500,9 +500,9 @@ cmd:scp /tmp/export_import_single_witherspoon_by_json/bogusnode_json.inv $$DSTMN check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_witherspoon_by_json_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_witherspoon_by_json_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_witherspoon_by_json_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_witherspoon_by_json/dstbogusnode.stanza check:rc==0 @@ -510,17 +510,17 @@ cmd: cat /tmp/export_import_single_witherspoon_by_json/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_witherspoon_by_json/srcbogusnode.stanza /tmp/export_import_single_witherspoon_by_json/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_witherspoon_by_json/bogusnode.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_json/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_witherspoon_by_json/bogusgroup.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_json/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_witherspoon_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_witherspoon_by_json_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_witherspoon_by_json check:rc==0 @@ -533,15 +533,15 @@ Attribute: $$DSTMN - the ip of MN which is used to run import operation. label:others,xcat_inventory cmd:mkdir -p /tmp/export_import_single_switch_by_json check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_switch_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_switch_by_json_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_switch_by_json/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_switch_by_json/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_switch_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_switch_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_switch_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_switch_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=switch nodetype=switch addkcmdline=addkcmdline arch=ppc64 authdomain=authdomain cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping cons=cons conserver=conserver consoleondemand=consoleondemand cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid linkports=linkports mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou password=password pdu=pdu postbootscripts=postbootscripts postscripts=postscripts power=power prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn productkey=productkey protocol=ssh provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot snmpauth=SHA snmppassword=snmppassword snmpprivacy=DES snmpusername=snmpusername snmpversion=SNMPv1 storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchtype=switchtype switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment username=username vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmmanager=vmmanager vmmaster=vmmaster vmnicnicmodel=vmnicnicmodel vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -553,9 +553,9 @@ cmd:scp /tmp/export_import_single_switch_by_json/bogusnode_json.inv $$DSTMN:/tmp check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_switch_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_switch_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_switch_by_json_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_switch_by_json_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_switch_by_json_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_switch_by_json/dstbogusnode.stanza check:rc==0 @@ -563,17 +563,17 @@ cmd: cat /tmp/export_import_single_switch_by_json/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_switch_by_json/srcbogusnode.stanza /tmp/export_import_single_switch_by_json/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_switch_by_json/bogusnode.stanza ]]; then cat /tmp/export_import_single_switch_by_json/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_switch_by_json/bogusgroup.stanza ]]; then cat /tmp/export_import_single_switch_by_json/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_switch_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_switch_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_switch_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_switch_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_switch_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_switch_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_switch_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_switch_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_switch_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_switch_by_json_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_switch_by_json check:rc==0 @@ -585,15 +585,15 @@ Attribute: $$DSTMN - the ip of MN which is used to run import operation. label:others,xcat_inventory cmd:mkdir -p /tmp/export_import_single_switch_by_yaml check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_switch_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_switch_by_yaml_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_switch_by_yaml/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_switch_by_yaml/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=switch nodetype=switch addkcmdline=addkcmdline arch=ppc64 authdomain=authdomain cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping cons=cons conserver=conserver consoleondemand=consoleondemand cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid linkports=linkports mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou password=password pdu=pdu postbootscripts=postbootscripts postscripts=postscripts power=power prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn productkey=productkey protocol=ssh provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot snmpauth=SHA snmppassword=snmppassword snmpprivacy=DES snmpusername=snmpusername snmpversion=SNMPv1 storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchtype=switchtype switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment username=username vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmmanager=vmmanager vmmaster=vmmaster vmnicnicmodel=vmnicnicmodel vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -605,9 +605,9 @@ cmd:scp /tmp/export_import_single_switch_by_yaml/bogusnode_yaml.inv $$DSTMN:/tmp check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_switch_by_yaml_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_switch_by_yaml_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_switch_by_yaml_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_switch_by_yaml/dstbogusnode.stanza check:rc==0 @@ -615,17 +615,17 @@ cmd: cat /tmp/export_import_single_switch_by_yaml/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_switch_by_yaml/srcbogusnode.stanza /tmp/export_import_single_switch_by_yaml/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_switch_by_yaml/bogusnode.stanza ]]; then cat /tmp/export_import_single_switch_by_yaml/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_switch_by_yaml/bogusgroup.stanza ]]; then cat /tmp/export_import_single_switch_by_yaml/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_switch_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_switch_by_yaml_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_switch_by_yaml check:rc==0 @@ -638,15 +638,15 @@ Attribute: $$DSTMN - the ip of MN which is used to run import operation. label:others,xcat_inventory cmd:mkdir -p /tmp/export_import_nodes_delimited_with_comma_by_yaml check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/' check:rc==0 cmd:for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_nodes_delimited_with_comma_by_yaml/bogusnode.stanza ;rmdef bogusnode$i;fi; done check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_nodes_delimited_with_comma_by_yaml/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode$i;fi; done' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode$i;fi; done' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef bogusnode[1-3] groups=bogusgroup mgt=openbmc cons=openbmc netboot=petitboot check:rc==0 @@ -658,9 +658,9 @@ cmd:scp /tmp/export_import_nodes_delimited_with_comma_by_yaml/bogusnode_yaml.inv check:rc==0 cmd:rmdef bogusnode[1-3] check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode1,bogusnode2,bogusnode3' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode1,bogusnode2,bogusnode3' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode[1-3] -z|sort -t'=' -k1 |tee /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode[1-3] -z|sort -t'=' -k1 |tee /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/dstbogusnode.stanza /tmp/export_import_nodes_delimited_with_comma_by_yaml/dstbogusnode.stanza check:rc==0 @@ -668,17 +668,17 @@ cmd: cat /tmp/export_import_nodes_delimited_with_comma_by_yaml/dstbogusnode.stan check:rc==0 cmd:diff -y /tmp/export_import_nodes_delimited_with_comma_by_yaml/srcbogusnode.stanza /tmp/export_import_nodes_delimited_with_comma_by_yaml/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode[1-3]' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode[1-3]' check:rc==0 cmd:if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_yaml/bogusnode.stanza ]]; then cat /tmp/export_import_nodes_delimited_with_comma_by_yaml/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_yaml/bogusgroup.stanza ]];then cat /tmp/export_import_nodes_delimited_with_comma_by_yaml/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusgroup.stanza ]];then cat /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusgroup.stanza ]];then cat /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_nodes_delimited_with_comma_by_yaml check:rc==0 @@ -690,15 +690,15 @@ Attribute: $$DSTMN - the ip of MN which is used to run import operation. label:others,xcat_inventory cmd:mkdir -p /tmp/export_import_nodes_delimited_with_comma_by_json check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/' check:rc==0 cmd:for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_nodes_delimited_with_comma_by_json/bogusnode.stanza ;rmdef bogusnode$i;fi; done check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_nodes_delimited_with_comma_by_json/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode$i;fi; done' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode$i;fi; done' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef bogusnode[1-3] groups=bogusgroup mgt=openbmc cons=openbmc netboot=petitboot check:rc==0 @@ -710,9 +710,9 @@ cmd:scp /tmp/export_import_nodes_delimited_with_comma_by_json/bogusnode_json.inv check:rc==0 cmd:rmdef bogusnode[1-3] check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode1,bogusnode2,bogusnode3' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode1,bogusnode2,bogusnode3' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode[1-3] -z|sort -t'=' -k1 |tee /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode[1-3] -z|sort -t'=' -k1 |tee /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/dstbogusnode.stanza /tmp/export_import_nodes_delimited_with_comma_by_json/dstbogusnode.stanza check:rc==0 @@ -720,17 +720,17 @@ cmd: cat /tmp/export_import_nodes_delimited_with_comma_by_json/dstbogusnode.stan check:rc==0 cmd:diff -y /tmp/export_import_nodes_delimited_with_comma_by_json/srcbogusnode.stanza /tmp/export_import_nodes_delimited_with_comma_by_json/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode[1-3]' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode[1-3]' check:rc==0 cmd:if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_json/bogusnode.stanza ]]; then cat /tmp/export_import_nodes_delimited_with_comma_by_json/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_json/bogusgroup.stanza ]];then cat /tmp/export_import_nodes_delimited_with_comma_by_json/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusgroup.stanza ]];then cat /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusgroup.stanza ]];then cat /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_nodes_delimited_with_comma_by_json check:rc==0 @@ -1730,15 +1730,15 @@ description:This case is used to test xcat-inventory import a node , then modify Attribute: $$DSTMN - the ip of MN which is used to run import operation. cmd:mkdir -p /tmp/export_single_node_then_modify_yaml_then_import check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_single_node_then_modify_yaml_then_import/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_single_node_then_modify_yaml_then_import/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=openbmc nodetype=mp addkcmdline=1111 arch=ppc64 authdomain=1111 bmc=1111 bmcpassword=1111 bmcusername=1111 bmcvlantag=1111 cfgmgr=1111 cfgmgtroles=1111 cfgserver=1111 chain=1111 chassis=1111 cmdmapping=1111 cons=1111 conserver=1111 consoleondemand=1111 consport=1111 cpucount=1111 cputype=1111 dhcpinterfaces=1111 disksize=1111 domainadminpassword=1111 domainadminuser=1111 domaintype=1111 getmac=1111 height=1111 hidden=1111 hostcluster=1111 hostinterface=1111 hostmanager=1111 hostnames=1111 hosttype=1111 hwtype=1111 installnic=1111 interface=1111 ip=10.10.10.10 iscsipassword=1111 iscsiserver=1111 iscsitarget=1111 iscsiuserid=1111 mac=42:d6:0a:03:05:08 memory=1111 migrationdest=1111 monserver=1111 mpa=1111 mtm=1111 nameservers=1111 netboot=grub2 nfsdir=1111 nfsserver=1111 nimserver=1111 node=1111 ondiscover=1111 osvolume=1111 otherinterfaces=1111 ou=1111 pdu=1111 postbootscripts=1111 postscripts=1111 power=1111 prescripts-begin=1111 prescripts-end=1111 primarynic=1111 primarysn=1111 productkey=1111 provmethod=1111 rack=1111 room=1111 routenames=1111 serial=1111 serialflow=1111 serialport=1111 serialspeed=1111 servicenode=1111 setupconserver=1 setupdhcp=1 setupftp=1111 setupipforward=1 setupldap=1 setupnameserver=1 setupnfs=1 setupnim=1111 setupntp=1 setupproxydhcp=1 setuptftp=1 sfp=1111 side=1111 slot=1111 storagcontroller=1111 storagetype=1111 supernode=1111 supportedarchs=1111 supportproxydhcp=1111 switch=1111 switchinterface=1111 switchport=1111 switchvlan=1111 syslog=1111 termport=1111 termserver=1111 tftpdir=1111 tftpserver=1111 unit=1111 usercomment=1111 vmbeacon=1111 vmbootorder=1111 vmcfgstore=1111 vmcluster=1111 vmmanager=1111 vmmaster=1111 vmnicnicmodel=1111 vmphyslots=1111 vmstorage=1111 vmstoragecache=1111 vmstorageformat=1111 vmstoragemodel=1111 vmtextconsole=1111 vmvirtflags=1111 vmvncport=1111 xcatmaster=1111 zonename=1111 nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused cmd:lsdef bogusnode -z|sed 's/1111/2222/g'|sed 's/unused/used/g'|sed 's/10.10.100.9/20.10.200.9/g'|sort -t'=' -k1 |tee /tmp/export_single_node_then_modify_yaml_then_import/srcbogusnode.stanza @@ -1777,9 +1777,9 @@ cmd:scp /tmp/export_single_node_then_modify_yaml_then_import/bogusnode_yaml.inv check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/dstbogusnode.stanza /tmp/export_single_node_then_modify_yaml_then_import/dstbogusnode.stanza check:rc==0 @@ -1787,17 +1787,17 @@ cmd: cat /tmp/export_single_node_then_modify_yaml_then_import/dstbogusnode.stanz check:rc==0 cmd:diff -y /tmp/export_single_node_then_modify_yaml_then_import/srcbogusnode.stanza /tmp/export_single_node_then_modify_yaml_then_import/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_single_node_then_modify_yaml_then_import/bogusnode.stanza ]]; then cat /tmp/export_single_node_then_modify_yaml_then_import/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_single_node_then_modify_yaml_then_import/bogusgroup.stanza ]]; then cat /tmp/export_single_node_then_modify_yaml_then_import/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_single_node_then_modify_yaml_then_import check:rc==0 @@ -1809,15 +1809,15 @@ Attribute: $$DSTMN - the ip of MN which is used to run import operation. label:others,xcat_inventory cmd:mkdir -p /tmp/export_single_node_then_modify_json_then_import check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_single_node_then_modify_json_then_import/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_single_node_then_modify_json_then_import/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=openbmc nodetype=mp addkcmdline=1111 arch=ppc64 authdomain=1111 bmc=1111 bmcpassword=1111 bmcusername=1111 bmcvlantag=1111 cfgmgr=1111 cfgmgtroles=1111 cfgserver=1111 chain=1111 chassis=1111 cmdmapping=1111 cons=1111 conserver=1111 consoleondemand=1111 consport=1111 cpucount=1111 cputype=1111 dhcpinterfaces=1111 disksize=1111 domainadminpassword=1111 domainadminuser=1111 domaintype=1111 getmac=1111 height=1111 hidden=1111 hostcluster=1111 hostinterface=1111 hostmanager=1111 hostnames=1111 hosttype=1111 hwtype=1111 installnic=1111 interface=1111 ip=10.10.10.10 iscsipassword=1111 iscsiserver=1111 iscsitarget=1111 iscsiuserid=1111 mac=42:d6:0a:03:05:08 memory=1111 migrationdest=1111 monserver=1111 mpa=1111 mtm=1111 nameservers=1111 netboot=grub2 nfsdir=1111 nfsserver=1111 nimserver=1111 node=1111 ondiscover=1111 osvolume=1111 otherinterfaces=1111 ou=1111 pdu=1111 postbootscripts=1111 postscripts=1111 power=1111 prescripts-begin=1111 prescripts-end=1111 primarynic=1111 primarysn=1111 productkey=1111 provmethod=1111 rack=1111 room=1111 routenames=1111 serial=1111 serialflow=1111 serialport=1111 serialspeed=1111 servicenode=1111 setupconserver=1 setupdhcp=1 setupftp=1111 setupipforward=1 setupldap=1 setupnameserver=1 setupnfs=1 setupnim=1111 setupntp=1 setupproxydhcp=1 setuptftp=1 sfp=1111 side=1111 slot=1111 storagcontroller=1111 storagetype=1111 supernode=1111 supportedarchs=1111 supportproxydhcp=1111 switch=1111 switchinterface=1111 switchport=1111 switchvlan=1111 syslog=1111 termport=1111 termserver=1111 tftpdir=1111 tftpserver=1111 unit=1111 usercomment=1111 vmbeacon=1111 vmbootorder=1111 vmcfgstore=1111 vmcluster=1111 vmmanager=1111 vmmaster=1111 vmnicnicmodel=1111 vmphyslots=1111 vmstorage=1111 vmstoragecache=1111 vmstorageformat=1111 vmstoragemodel=1111 vmtextconsole=1111 vmvirtflags=1111 vmvncport=1111 xcatmaster=1111 zonename=1111 nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused cmd:lsdef bogusnode -z|sed 's/1111/2222/g'|sed 's/unused/used/g'|sed 's/10.10.100.9/20.10.200.9/g'|sort -t'=' -k1 |tee /tmp/export_single_node_then_modify_json_then_import/srcbogusnode.stanza @@ -1854,9 +1854,9 @@ cmd:scp /tmp/export_single_node_then_modify_json_then_import/bogusnode_json.inv check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_single_node_then_modify_json_then_import_$$DSTMN/dstbogusnode.stanza /tmp/export_single_node_then_modify_json_then_import/dstbogusnode.stanza check:rc==0 @@ -1864,17 +1864,17 @@ cmd: cat /tmp/export_single_node_then_modify_json_then_import/dstbogusnode.stanz check:rc==0 cmd:diff -y /tmp/export_single_node_then_modify_json_then_import/srcbogusnode.stanza /tmp/export_single_node_then_modify_json_then_import/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_single_node_then_modify_json_then_import/bogusnode.stanza ]]; then cat /tmp/export_single_node_then_modify_json_then_import/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_single_node_then_modify_json_then_import/bogusgroup.stanza ]]; then cat /tmp/export_single_node_then_modify_json_then_import/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_single_node_then_modify_json_then_import check:rc==0 @@ -1885,15 +1885,15 @@ label:others,xcat_inventory description:This case is used to test xcat-inventory export and import the definition of group cmd:mkdir -p /tmp/export_import_single_group_json check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_group_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_group_json_$$DSTMN/' check:rc==0 cmd:for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_single_group_json/bogusnode.stanza ;rmdef bogusnode$i;fi; done check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_group_json/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_single_group_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode$i;fi; done' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_single_group_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode$i;fi; done' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_group_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_group_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t group -o bogusgroup mgt=openbmc cons=openbmc netboot=petitboot ip='|\D+(\d+)|10.100.100.($1)|' bmcusername=root bmcpassword=0penBmc check:rc==0 @@ -1913,17 +1913,17 @@ cmd:rmdef -t node -o bogusnode[1-3] check:rc==0 cmd:rmdef -t group -o bogusgroup check:rc==0 -cmd:ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_group_json_$$DSTMN/export.file -t node -o bogusnode1,bogusnode2,bogusnode3,bogusgroup' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_group_json_$$DSTMN/export.file -t node -o bogusnode1,bogusnode2,bogusnode3,bogusgroup' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t node -o bogusnode[1-3] > /tmp/export_import_single_group_json_$$DSTMN/import_nodes_group' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t node -o bogusnode[1-3] > /tmp/export_import_single_group_json_$$DSTMN/import_nodes_group' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group -o bogusgroup >> /tmp/export_import_single_group_json_$$DSTMN/import_nodes_group' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group -o bogusgroup >> /tmp/export_import_single_group_json_$$DSTMN/import_nodes_group' check:rc==0 cmd:scp $$DSTMN:/tmp/export_import_single_group_json_$$DSTMN/import_nodes_group /tmp/export_import_single_group_json/import_nodes_group check:rc==0 -cmd:ssh $$DSTMN 'rmdef -t node -o bogusnode[1-3]' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef -t node -o bogusnode[1-3]' check:rc==0 -cmd: ssh $$DSTMN 'rmdef -t group -o bogusgroup' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef -t group -o bogusgroup' check:rc==0 cmd:sed -e 's/members=.*$/members='"$(awk -F = '/members=/ { print $2 }' < /tmp/export_import_single_group_json/import_nodes_group | tr , ' ' | xargs -n 1 | sort -g | xargs -n 999 | tr ' ' ,)"'/' < /tmp/export_import_single_group_json/import_nodes_group > /tmp/export_import_single_group_json/import_nodes_group.1; cp -rf /tmp/export_import_single_group_json/import_nodes_group.1 /tmp/export_import_single_group_json/import_nodes_group check:rc==0 @@ -1933,11 +1933,11 @@ cmd:if [[ -e /tmp/export_import_single_group_json/bogusnode.stanza ]]; then cat check:rc==0 cmd:if [[ -e /tmp/export_import_single_group_json/bogusgroup.stanza ]];then cat /tmp/export_import_single_group_json/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_group_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_group_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_group_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_group_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_group_json_$$DSTMN/bogusgroup.stanza ]];then cat /tmp/export_import_single_group_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_group_json_$$DSTMN/bogusgroup.stanza ]];then cat /tmp/export_import_single_group_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_group_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_group_json_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_group_json check:rc==0 @@ -1948,15 +1948,15 @@ label:others,xcat_inventory description:This case is used to test xcat-inventory export and import the definition of group cmd:mkdir -p /tmp/export_import_single_group_yaml check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_group_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_group_yaml_$$DSTMN/' check:rc==0 cmd:for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_single_group_yaml/bogusnode.stanza ;rmdef bogusnode$i;fi; done check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_group_yaml/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_single_group_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode$i;fi; done' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_single_group_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode$i;fi; done' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_group_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_group_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t group -o bogusgroup mgt=openbmc cons=openbmc netboot=petitboot ip='|\D+(\d+)|10.100.100.($1)|' bmcusername=root bmcpassword=0penBmc check:rc==0 @@ -1976,17 +1976,17 @@ cmd:rmdef -t node -o bogusnode[1-3] check:rc==0 cmd:rmdef -t group -o bogusgroup check:rc==0 -cmd:ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_group_yaml_$$DSTMN/export.file -t node -o bogusnode1,bogusnode2,bogusnode3,bogusgroup' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_group_yaml_$$DSTMN/export.file -t node -o bogusnode1,bogusnode2,bogusnode3,bogusgroup' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t node -o bogusnode[1-3] > /tmp/export_import_single_group_yaml_$$DSTMN/import_nodes_group' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t node -o bogusnode[1-3] > /tmp/export_import_single_group_yaml_$$DSTMN/import_nodes_group' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group -o bogusgroup >> /tmp/export_import_single_group_yaml_$$DSTMN/import_nodes_group' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group -o bogusgroup >> /tmp/export_import_single_group_yaml_$$DSTMN/import_nodes_group' check:rc==0 cmd:scp $$DSTMN:/tmp/export_import_single_group_yaml_$$DSTMN/import_nodes_group /tmp/export_import_single_group_yaml/import_nodes_group check:rc==0 -cmd:ssh $$DSTMN 'rmdef -t node -o bogusnode[1-3]' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef -t node -o bogusnode[1-3]' check:rc==0 -cmd: ssh $$DSTMN 'rmdef -t group -o bogusgroup' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef -t group -o bogusgroup' check:rc==0 cmd:sed -e 's/members=.*$/members='"$(awk -F = '/members=/ { print $2 }' < /tmp/export_import_single_group_yaml/import_nodes_group | tr , ' ' | xargs -n 1 | sort -g | xargs -n 999 | tr ' ' ,)"'/' < /tmp/export_import_single_group_yaml/import_nodes_group > /tmp/export_import_single_group_yaml/import_nodes_group.1; cp -rf /tmp/export_import_single_group_yaml/import_nodes_group.1 /tmp/export_import_single_group_yaml/import_nodes_group check:rc==0 @@ -1996,11 +1996,11 @@ cmd:if [[ -e /tmp/export_import_single_group_yaml/bogusnode.stanza ]]; then cat check:rc==0 cmd:if [[ -e /tmp/export_import_single_group_yaml/bogusgroup.stanza ]];then cat /tmp/export_import_single_group_yaml/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_group_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_group_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_group_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_group_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_group_yaml_$$DSTMN/bogusgroup.stanza ]];then cat /tmp/export_import_single_group_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_group_yaml_$$DSTMN/bogusgroup.stanza ]];then cat /tmp/export_import_single_group_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_group_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_group_yaml_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_group_yaml check:rc==0 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage b/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage index cce5a594b..678c134f1 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage @@ -4,11 +4,11 @@ Attribute: $$DSTMN - the ip of MN which is used to run import operation. label:others,xcat_inventory cmd:mkdir -p /tmp/export_import_single_osimage_by_yaml check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_osimage_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_osimage_by_yaml_$$DSTMN/' check:rc==0 cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_import_single_osimage_by_yaml/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_import_single_osimage_by_yaml_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_import_single_osimage_by_yaml_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' check:rc==0 cmd:chdef -t osimage -o bogus_image addkcmdline=addkcmdline boottarget=boottarget cfmdir=cfmdir crashkernelsize=crashkernelsize description=description driverupdatesrc=driverupdatesrc dump=dump exlist=exlist groups=groups imagename=imagename imagetype=linux isdeletable=isdeletable kerneldir=kerneldir kernelver=kernelver kitcomponents=kitcomponents krpmver=krpmver netdrivers=netdrivers nodebootif=nodebootif osarch=osarch osdistroname=osdistroname osname=osname osupdatename=osupdatename osvers=osvers otherifce=otherifce otherpkgdir=otherpkgdir otherpkglist=otherpkglist partitionfile=partitionfile permission=permission pkgdir=pkgdir pkglist=pkglist postbootscripts=postbootscripts postinstall=postinstall postscripts=postscripts profile=compute provmethod=netboot rootfstype=nfs rootimgdir=rootimgdir serverrole=serverrole synclists=synclists template=template usercomment=usercomment check:rc==0 @@ -20,9 +20,9 @@ cmd:scp /tmp/export_import_single_osimage_by_yaml/bogus_image.yaml $$DSTMN:/tmp/ check:rc==0 cmd: rmdef -t osimage -o bogus_image check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_osimage_by_yaml_$$DSTMN/bogus_image.yaml -t osimage -o bogus_image' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_osimage_by_yaml_$$DSTMN/bogus_image.yaml -t osimage -o bogus_image' check:rc==0 -cmd: ssh $$DSTMN 'lsdef -t osimage -o bogus_image -z |sort -t'=' -k1|tee /tmp/export_import_single_osimage_by_yaml_$$DSTMN/dst_bogus_image.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t osimage -o bogus_image -z |sort -t'=' -k1|tee /tmp/export_import_single_osimage_by_yaml_$$DSTMN/dst_bogus_image.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_osimage_by_yaml_$$DSTMN/dst_bogus_image.stanza /tmp/export_import_single_osimage_by_yaml/dst_bogus_image.stanza check:rc==0 @@ -30,13 +30,13 @@ cmd: cat /tmp/export_import_single_osimage_by_yaml/dst_bogus_image.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_osimage_by_yaml/src_bogus_osimage.stanza /tmp/export_import_single_osimage_by_yaml/dst_bogus_image.stanza -I "environvar" check:rc==0 -cmd:ssh $$DSTMN 'rmdef -t osimage -o bogus_image' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef -t osimage -o bogus_image' check:rc==0 cmd:if [[ -e /tmp/export_import_single_osimage_by_yaml/bogus_image.stanza ]]; then cat /tmp/export_import_single_osimage_by_yaml/bogus_image.stanza | mkdef -z;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_osimage_by_yaml_$$DSTMN/bogus_image.stanza ]]; then cat /tmp/export_import_single_osimage_by_yaml_$$DSTMN/bogus_image.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_osimage_by_yaml_$$DSTMN/bogus_image.stanza ]]; then cat /tmp/export_import_single_osimage_by_yaml_$$DSTMN/bogus_image.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_osimage_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_osimage_by_yaml_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_osimage_by_yaml check:rc==0 @@ -48,11 +48,11 @@ Attribute: $$DSTMN - the ip of MN which is used to run import operation. label:others,xcat_inventory cmd:mkdir -p /tmp/export_import_single_osimage_by_json check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_osimage_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_osimage_by_json_$$DSTMN/' check:rc==0 cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_import_single_osimage_by_json/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_import_single_osimage_by_json_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_import_single_osimage_by_json_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' check:rc==0 cmd:chdef -t osimage -o bogus_image addkcmdline=addkcmdline boottarget=boottarget cfmdir=cfmdir crashkernelsize=crashkernelsize description=description driverupdatesrc=driverupdatesrc dump=dump exlist=exlist groups=groups imagename=imagename imagetype=linux isdeletable=isdeletable kerneldir=kerneldir kernelver=kernelver kitcomponents=kitcomponents krpmver=krpmver netdrivers=netdrivers nodebootif=nodebootif osarch=osarch osdistroname=osdistroname osname=osname osupdatename=osupdatename osvers=osvers otherifce=otherifce otherpkgdir=otherpkgdir otherpkglist=otherpkglist partitionfile=partitionfile permission=permission pkgdir=pkgdir pkglist=pkglist postbootscripts=postbootscripts postinstall=postinstall postscripts=postscripts profile=compute provmethod=netboot rootfstype=nfs rootimgdir=rootimgdir serverrole=serverrole synclists=synclists template=template usercomment=usercomment check:rc==0 @@ -64,9 +64,9 @@ cmd:scp /tmp/export_import_single_osimage_by_json/bogus_image.json $$DSTMN:/tmp/ check:rc==0 cmd: rmdef -t osimage -o bogus_image check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_osimage_by_json_$$DSTMN/bogus_image.json -t osimage -o bogus_image' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_osimage_by_json_$$DSTMN/bogus_image.json -t osimage -o bogus_image' check:rc==0 -cmd: ssh $$DSTMN 'lsdef -t osimage -o bogus_image -z |sort -t'=' -k1|tee /tmp/export_import_single_osimage_by_json_$$DSTMN/dst_bogus_image.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t osimage -o bogus_image -z |sort -t'=' -k1|tee /tmp/export_import_single_osimage_by_json_$$DSTMN/dst_bogus_image.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_osimage_by_json_$$DSTMN/dst_bogus_image.stanza /tmp/export_import_single_osimage_by_json/dst_bogus_image.stanza check:rc==0 @@ -74,13 +74,13 @@ cmd: cat /tmp/export_import_single_osimage_by_json/dst_bogus_image.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_osimage_by_json/src_bogus_osimage.stanza /tmp/export_import_single_osimage_by_json/dst_bogus_image.stanza -I "environvar" check:rc==0 -cmd:ssh $$DSTMN 'rmdef -t osimage -o bogus_image' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef -t osimage -o bogus_image' check:rc==0 cmd:if [[ -e /tmp/export_import_single_osimage_by_json/bogus_image.stanza ]]; then cat /tmp/export_import_single_osimage_by_json/bogus_image.stanza | mkdef -z;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_osimage_by_json_$$DSTMN/bogus_image.stanza ]]; then cat /tmp/export_import_single_osimage_by_json_$$DSTMN/bogus_image.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_osimage_by_json_$$DSTMN/bogus_image.stanza ]]; then cat /tmp/export_import_single_osimage_by_json_$$DSTMN/bogus_image.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_osimage_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_osimage_by_json_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_osimage_by_json check:rc==0 @@ -813,11 +813,11 @@ label:others,xcat_inventory description:This case is used to test xcat-inventory import a osimage , then modify the export json file, then import the json file cmd:mkdir -p /tmp/export_single_osimage_then_modify_json_then_import check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/' check:rc==0 cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_single_osimage_then_modify_json_then_import/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' check:rc==0 cmd:chdef -t osimage -o bogus_image addkcmdline=1111 boottarget=1111 cfmdir=1111 crashkernelsize=1111 description=1111 driverupdatesrc=1111 dump=1111 exlist=1111 groups=1111 imagename=1111 imagetype=linux isdeletable=1111 kerneldir=1111 kernelver=1111 kitcomponents=1111 krpmver=1111 netdrivers=1111 nodebootif=1111 osarch=1111 osdistroname=1111 osname=1111 osupdatename=1111 osvers=1111 otherifce=1111 otherpkgdir=1111 otherpkglist=1111 partitionfile=1111 permission=1111 pkgdir=1111 pkglist=1111 postbootscripts=1111 postinstall=1111 postscripts=1111 profile=compute provmethod=statelite rootfstype=nfs rootimgdir=1111 serverrole=1111 synclists=1111 template=1111 usercomment=1111 check:rc==0 @@ -843,9 +843,9 @@ cmd:scp /tmp/export_single_osimage_then_modify_json_then_import/bogus_image.json check:rc==0 cmd: rmdef -t osimage -o bogus_image check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/bogus_image.json -t osimage -o bogus_image' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/bogus_image.json -t osimage -o bogus_image' check:rc==0 -cmd: ssh $$DSTMN 'lsdef -t osimage -o bogus_image -z |sort -t'=' -k1|tee /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/dst_bogus_image.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t osimage -o bogus_image -z |sort -t'=' -k1|tee /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/dst_bogus_image.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/dst_bogus_image.stanza /tmp/export_single_osimage_then_modify_json_then_import/dst_bogus_image.stanza check:rc==0 @@ -853,13 +853,13 @@ cmd: cat /tmp/export_single_osimage_then_modify_json_then_import/dst_bogus_image check:rc==0 cmd:diff -y /tmp/export_single_osimage_then_modify_json_then_import/src_bogus_osimage.stanza /tmp/export_single_osimage_then_modify_json_then_import/dst_bogus_image.stanza -I "environvar=OBJNAME=bogus_image" check:rc==0 -cmd:ssh $$DSTMN 'rmdef -t osimage -o bogus_image' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef -t osimage -o bogus_image' check:rc==0 cmd:if [[ -e /tmp/export_single_osimage_then_modify_json_then_import/bogus_image.stanza ]]; then cat /tmp/export_single_osimage_then_modify_json_then_import/bogus_image.stanza | mkdef -z;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/bogus_image.stanza ]]; then cat /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/bogus_image.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/bogus_image.stanza ]]; then cat /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/bogus_image.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_single_osimage_then_modify_json_then_import check:rc==0 @@ -870,11 +870,11 @@ label:others,xcat_inventory description:This case is used to test xcat-inventory import a osimage , then modify the export yaml file, then import the yaml file cmd:mkdir -p /tmp/export_single_osimage_then_modify_yaml_then_import check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/' check:rc==0 cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_single_osimage_then_modify_yaml_then_import/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' check:rc==0 cmd:chdef -t osimage -o bogus_image addkcmdline=1111 boottarget=1111 cfmdir=1111 crashkernelsize=1111 description=1111 driverupdatesrc=1111 dump=1111 exlist=1111 groups=1111 imagename=1111 imagetype=linux isdeletable=1111 kerneldir=1111 kernelver=1111 kitcomponents=1111 krpmver=1111 netdrivers=1111 nodebootif=1111 osarch=1111 osdistroname=1111 osname=1111 osupdatename=1111 osvers=1111 otherifce=1111 otherpkgdir=1111 otherpkglist=1111 partitionfile=1111 permission=1111 pkgdir=1111 pkglist=1111 postbootscripts=1111 postinstall=1111 postscripts=1111 profile=compute provmethod=statelite rootfstype=nfs rootimgdir=1111 serverrole=1111 synclists=1111 template=1111 usercomment=1111 check:rc==0 @@ -900,9 +900,9 @@ cmd:scp /tmp/export_single_osimage_then_modify_yaml_then_import/bogus_image.yaml check:rc==0 cmd: rmdef -t osimage -o bogus_image check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/bogus_image.yaml -t osimage -o bogus_image' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/bogus_image.yaml -t osimage -o bogus_image' check:rc==0 -cmd: ssh $$DSTMN 'lsdef -t osimage -o bogus_image -z |sort -t'=' -k1|tee /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/dst_bogus_image.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t osimage -o bogus_image -z |sort -t'=' -k1|tee /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/dst_bogus_image.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/dst_bogus_image.stanza /tmp/export_single_osimage_then_modify_yaml_then_import/dst_bogus_image.stanza check:rc==0 @@ -910,13 +910,13 @@ cmd: cat /tmp/export_single_osimage_then_modify_yaml_then_import/dst_bogus_image check:rc==0 cmd:diff -y /tmp/export_single_osimage_then_modify_yaml_then_import/src_bogus_osimage.stanza /tmp/export_single_osimage_then_modify_yaml_then_import/dst_bogus_image.stanza -I "environvar=OBJNAME=bogus_image" check:rc==0 -cmd:ssh $$DSTMN 'rmdef -t osimage -o bogus_image' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef -t osimage -o bogus_image' check:rc==0 cmd:if [[ -e /tmp/export_single_osimage_then_modify_yaml_then_import/bogus_image.stanza ]]; then cat /tmp/export_single_osimage_then_modify_yaml_then_import/bogus_image.stanza | mkdef -z;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/bogus_image.stanza ]]; then cat /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/bogus_image.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/bogus_image.stanza ]]; then cat /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/bogus_image.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_single_osimage_then_modify_yaml_then_import check:rc==0 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.site b/xCAT-test/autotest/testcase/xcat-inventory/cases.site index 9d1dc6d35..fb59a5238 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.site +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.site @@ -4,11 +4,11 @@ Attribute: $$DSTMN - the ip of MN which is used to run import operation. label:others,xcat_inventory cmd:mkdir -p /tmp/export_import_site_by_yaml check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_site_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_site_by_yaml_$$DSTMN/' check:rc==0 cmd: lsdef -t site -o clustersite -z >/tmp/export_import_site_by_yaml/site.stanza check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t site -o clustersite -z >/tmp/export_import_site_by_yaml_$$DSTMN/site.stanza ' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t site -o clustersite -z >/tmp/export_import_site_by_yaml_$$DSTMN/site.stanza ' check:rc==0 cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');chdef -t site -o clustersite useSSHonAIX=0 useNFSv4onAIX=0 FQDNfirst=1 SNsyncfiledir='/var/xcat/syncfiles' auditnosyslog=0 auditskipcmds=ALL blademaxp=64 cleanupxcatpost=no consoleondemand=no databaseloc='/var/lib' db2installloc='/mntdb2' dbtracelevel=0 defserialflow=0 defserialport=0 defserialspeed=9600 dhcpinterfaces=eth0 dhcplease=43200 dhcpsetup=n disjointdhcps=1 dnshandler=ddns dnsinterfaces='xcatmn|eth1,eth2;service|bond0' dnsupdaters=dnsupdaters domain='pok.stglabs.ibm.com' enableASMI=no excludenodes=excludenodes externaldns=externaldns extntpservers=extntpservers forwarders=$mnip fsptimeout=0 genmacprefix='00:11:aa' genpasswords=genpasswords hierarchicalattrs=hierarchicalattrs httpport=80 hwctrldispatch=y installdir='/install/' installloc='hostname:/path' ipmidispatch=y ipmimaxp=64 ipmiretries=3 ipmisdrcache=no ipmitimeout=2 iscsidir='/iscsidir' managedaddressmode=dhcp master=$mnip maxssh=8 mnroutenames=mnroutenames nameservers=$mnip nmapoptions='--min-rtt-timeout' nodestatus=n nodesyncfiledir='/var/xcat/node/syncfiles' ntpservers=$mnip persistkvmguests=y powerinterval=0 ppcmaxp=64 ppcretry=3 ppctimeout=0 precreatemypostscripts=1 pruneservices=1 runbootscripts=yes setinstallnic=1 sharedinstall=no sharedtftp=1 skiptables=nics skipvalidatelog=1 snmpc=snmpc sshbetweennodes=ALLGROUPS svloglocal=1 syspowerinterval=10 syspowermaxnodes=10 tftpdir='/tftprot/' tftpflags='-v' timezone='America/New_York' useNmapfromMN=no useflowcontrol=no usexhrm=no vcenterautojoin=no vmwarereconfigonpower=no vsftp=n xcatconfdir='/etc/xcat' xcatdebugmode=1 xcatdport=3001 xcatiport=3002 xcatlport=3003 xcatmaxbatchconnections=64 xcatmaxconnections=60 xcatsslciphers='3DES' xcatsslversion=TLSv1 check:rc==0 @@ -22,9 +22,9 @@ cmd:cat /tmp/export_import_site_by_yaml/export_site_yaml.inv check:rc==0 cmd:scp /tmp/export_import_site_by_yaml/export_site_yaml.inv $$DSTMN:/tmp/export_import_site_by_yaml_$$DSTMN/ check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_site_by_yaml_$$DSTMN/export_site_yaml.inv -t site -o clustersite' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_site_by_yaml_$$DSTMN/export_site_yaml.inv -t site -o clustersite' check:rc==0 -cmd: ssh $$DSTMN 'lsdef -t site -o clustersite -z |sort -t'=' -k1|tee /tmp/export_import_site_by_yaml_$$DSTMN/dstsite.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t site -o clustersite -z |sort -t'=' -k1|tee /tmp/export_import_site_by_yaml_$$DSTMN/dstsite.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_site_by_yaml_$$DSTMN/dstsite.stanza /tmp/export_import_site_by_yaml/dstsite.stanza check:rc==0 @@ -36,9 +36,9 @@ cmd:diff -y --ignore-blank-lines /tmp/export_import_site_by_yaml/srcsite.stanza check:rc==0 cmd:cat /tmp/export_import_site_by_yaml/site.stanza | mkdef -z -f check:rc==0 -cmd:ssh $$DSTMN 'cat /tmp/export_import_site_by_yaml_$$DSTMN/site.stanza | mkdef -z -f' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;cat /tmp/export_import_site_by_yaml_$$DSTMN/site.stanza | mkdef -z -f' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_site_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_site_by_yaml_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_site_by_yaml check:rc==0 @@ -51,11 +51,11 @@ Attribute: $$DSTMN - the ip of MN which is used to run import operation. label:others,xcat_inventory cmd:mkdir -p /tmp/export_import_site_by_json check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_site_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_site_by_json_$$DSTMN/' check:rc==0 cmd: lsdef -t site -o clustersite -z >/tmp/export_import_site_by_json/site.stanza check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t site -o clustersite -z >/tmp/export_import_site_by_json_$$DSTMN/site.stanza ' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t site -o clustersite -z >/tmp/export_import_site_by_json_$$DSTMN/site.stanza ' check:rc==0 cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');chdef -t site -o clustersite useSSHonAIX=0 useNFSv4onAIX=0 FQDNfirst=1 SNsyncfiledir='/var/xcat/syncfiles' auditnosyslog=0 auditskipcmds=ALL blademaxp=64 cleanupxcatpost=no consoleondemand=no databaseloc='/var/lib' db2installloc='/mntdb2' dbtracelevel=0 defserialflow=0 defserialport=0 defserialspeed=9600 dhcpinterfaces=eth0 dhcplease=43200 dhcpsetup=n disjointdhcps=1 dnshandler=ddns dnsinterfaces='xcatmn|eth1,eth2;service|bond0' dnsupdaters=dnsupdaters domain='pok.stglabs.ibm.com' enableASMI=no excludenodes=excludenodes externaldns=externaldns extntpservers=extntpservers forwarders=$mnip fsptimeout=0 genmacprefix='00:11:aa' genpasswords=genpasswords hierarchicalattrs=hierarchicalattrs httpport=80 hwctrldispatch=y installdir='/install/' installloc='hostname:/path' ipmidispatch=y ipmimaxp=64 ipmiretries=3 ipmisdrcache=no ipmitimeout=2 iscsidir='/iscsidir' managedaddressmode=dhcp master=$mnip maxssh=8 mnroutenames=mnroutenames nameservers=$mnip nmapoptions='--min-rtt-timeout' nodestatus=n nodesyncfiledir='/var/xcat/node/syncfiles' ntpservers=$mnip persistkvmguests=y powerinterval=0 ppcmaxp=64 ppcretry=3 ppctimeout=0 precreatemypostscripts=1 pruneservices=1 runbootscripts=yes setinstallnic=1 sharedinstall=no sharedtftp=1 skiptables=nics skipvalidatelog=1 snmpc=snmpc sshbetweennodes=ALLGROUPS svloglocal=1 syspowerinterval=10 syspowermaxnodes=10 tftpdir='/tftprot/' tftpflags='-v' timezone='America/New_York' useNmapfromMN=no useflowcontrol=no usexhrm=no vcenterautojoin=no vmwarereconfigonpower=no vsftp=n xcatconfdir='/etc/xcat' xcatdebugmode=1 xcatdport=3001 xcatiport=3002 xcatlport=3003 xcatmaxbatchconnections=64 xcatmaxconnections=60 xcatsslciphers='3DES' xcatsslversion=TLSv1 check:rc==0 @@ -69,9 +69,9 @@ cmd:cat /tmp/export_import_site_by_json/export_site_json.inv check:rc==0 cmd:scp /tmp/export_import_site_by_json/export_site_json.inv $$DSTMN:/tmp/export_import_site_by_json_$$DSTMN/ check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_site_by_json_$$DSTMN/export_site_json.inv -t site -o clustersite' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_site_by_json_$$DSTMN/export_site_json.inv -t site -o clustersite' check:rc==0 -cmd: ssh $$DSTMN 'lsdef -t site -o clustersite -z |sort -t'=' -k1|tee /tmp/export_import_site_by_json_$$DSTMN/dstsite.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t site -o clustersite -z |sort -t'=' -k1|tee /tmp/export_import_site_by_json_$$DSTMN/dstsite.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_site_by_json_$$DSTMN/dstsite.stanza /tmp/export_import_site_by_json/dstsite.stanza check:rc==0 @@ -83,9 +83,9 @@ cmd:diff -y --ignore-blank-lines /tmp/export_import_site_by_json/srcsite.stanza check:rc==0 cmd:cat /tmp/export_import_site_by_json/site.stanza | mkdef -z -f check:rc==0 -cmd:ssh $$DSTMN 'cat /tmp/export_import_site_by_json_$$DSTMN/site.stanza | mkdef -z -f' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;cat /tmp/export_import_site_by_json_$$DSTMN/site.stanza | mkdef -z -f' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_site_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_site_by_json_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_site_by_json check:rc==0 @@ -1245,11 +1245,11 @@ Attribute: $$DSTMN - the ip of MN which is used to run import operation. label:others,xcat_inventory cmd:mkdir -p /tmp/export_site_table_then_modify_yaml_then_import check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/' check:rc==0 cmd: lsdef -t site -o clustersite -z >/tmp/export_site_table_then_modify_yaml_then_import/site.stanza check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t site -o clustersite -z >/tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/site.stanza ' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t site -o clustersite -z >/tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/site.stanza ' check:rc==0 cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');chdef -t site -o clustersite useSSHonAIX=1111 useNFSv4onAIX=1111 FQDNfirst=1111 SNsyncfiledir='/var/xcat/1111' auditnosyslog=1111 auditskipcmds=ALL blademaxp=641111 cleanupxcatpost=1111 consoleondemand=1111 databaseloc='/var/lib1111' db2installloc='/mntdb1111' dbtracelevel=0 defserialflow=1111 defserialport=1111 defserialspeed=9611111111 dhcpinterfaces=eth1111 dhcplease=43211111111 dhcpsetup=1111 disjointdhcps=0 dnshandler=ddns1111 dnsinterfaces='xcatmn|eth1,eth2;service|bond1111' dnsupdaters=dnsupdaters1111 domain='pok1111.stglabs.ibm.com' enableASMI=1111 excludenodes=1111 externaldns=1111 extntpservers=1111 forwarders=$mnip fsptimeout=1111 genmacprefix='11111111:11:aa' genpasswords=1111 hierarchicalattrs=1111 httpport=81111 hwctrldispatch=1111 installdir='/install1111/' installloc='hostname:/path1111' ipmidispatch=1111 ipmimaxp=641111 ipmiretries=31111 ipmisdrcache=1111 ipmitimeout=21111 iscsidir='/iscsidir1111' managedaddressmode=dhcp master=$mnip maxssh=81111 mnroutenames=1111 nameservers=$mnip nmapoptions='--min-rtt-timeout 1111' nodestatus=n nodesyncfiledir='/var/xcat/node/syncfiles1111' ntpservers=$mnip persistkvmguests=1111 powerinterval=1111 ppcmaxp=641111 ppcretry=31111 ppctimeout=1111 precreatemypostchdef -t site -o clustersite useSSHonAIX=1111 useNFSv4onAIX=1111 FQDNfirst=1111 SNsyncfiledir='/var/xcat/1111' auditnosyslog=1111 auditskipcmds=ALL blademaxp=641111 pruneservices=1111 runbootscripts=1111 setinstallnic=1111 sharedinstall=no sharedtftp=1111 skiptables=nics1111 skipvalidatelog=1111 snmpc=xc1111 sshbetweennodes=ALLGROUPS svloglocal=1111 syspowerinterval=11111 syspowermaxnodes=11111 tftpdir='/tftprot1111/' tftpflags='-v1111' timezone='America/New_York1111' useNmapfromMN=1111 useflowcontrol=1111 usexhrm=1111 vcenterautojoin=1111 vmwarereconfigonpower=1111 vsftp=1111 xcatconfdir='/etc/xcat1111' xcatdebugmode=0 xcatdport=3001 xcatiport=3002 xcatlport=3003 xcatmaxbatchconnections=641111 xcatmaxconnections=61111 xcatsslciphers='3DES' xcatsslversion=TLSv1 check:rc==0 @@ -1281,9 +1281,9 @@ cmd:cat /tmp/export_site_table_then_modify_yaml_then_import/export_site_yaml.inv check:rc==0 cmd:scp /tmp/export_site_table_then_modify_yaml_then_import/export_site_yaml.inv $$DSTMN:/tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/ check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/export_site_yaml.inv -t site -o clustersite' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/export_site_yaml.inv -t site -o clustersite' check:rc==0 -cmd: ssh $$DSTMN 'lsdef -t site -o clustersite -z |sort -t'=' -k1|tee /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/dstsite.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t site -o clustersite -z |sort -t'=' -k1|tee /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/dstsite.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/dstsite.stanza /tmp/export_site_table_then_modify_yaml_then_import/dstsite.stanza check:rc==0 @@ -1295,9 +1295,9 @@ cmd:diff -y --ignore-blank-lines /tmp/export_site_table_then_modify_yaml_then_i check:rc==0 cmd:cat /tmp/export_site_table_then_modify_yaml_then_import/site.stanza | mkdef -z -f check:rc==0 -cmd:ssh $$DSTMN 'cat /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/site.stanza | mkdef -z -f' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;cat /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/site.stanza | mkdef -z -f' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_site_table_then_modify_yaml_then_import check:rc==0 @@ -1309,11 +1309,11 @@ Attribute: $$DSTMN - the ip of MN which is used to run import operation. label:others,xcat_inventory cmd:mkdir -p /tmp/export_site_table_then_modify_json_then_import check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/' check:rc==0 cmd: lsdef -t site -o clustersite -z >/tmp/export_site_table_then_modify_json_then_import/site.stanza check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t site -o clustersite -z >/tmp/export_site_table_then_modify_json_then_import_$$DSTMN/site.stanza ' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t site -o clustersite -z >/tmp/export_site_table_then_modify_json_then_import_$$DSTMN/site.stanza ' check:rc==0 cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');chdef -t site -o clustersite useSSHonAIX=1111 useNFSv4onAIX=1111 FQDNfirst=1111 SNsyncfiledir='/var/xcat/1111' auditnosyslog=1111 auditskipcmds=ALL blademaxp=641111 cleanupxcatpost=1111 consoleondemand=1111 databaseloc='/var/lib1111' db2installloc='/mntdb1111' dbtracelevel=0 defserialflow=1111 defserialport=1111 defserialspeed=9611111111 dhcpinterfaces=eth1111 dhcplease=43211111111 dhcpsetup=1111 disjointdhcps=0 dnshandler=ddns1111 dnsinterfaces='xcatmn|eth1,eth2;service|bond1111' dnsupdaters=dnsupdaters1111 domain='pok1111.stglabs.ibm.com' enableASMI=1111 excludenodes=1111 externaldns=1111 extntpservers=1111 forwarders=$mnip fsptimeout=1111 genmacprefix='11111111:11:aa' genpasswords=1111 hierarchicalattrs=1111 httpport=81111 hwctrldispatch=1111 installdir='/install1111/' installloc='hostname:/path1111' ipmidispatch=1111 ipmimaxp=641111 ipmiretries=31111 ipmisdrcache=1111 ipmitimeout=21111 iscsidir='/iscsidir1111' managedaddressmode=dhcp master=$mnip maxssh=81111 mnroutenames=1111 nameservers=$mnip nmapoptions='--min-rtt-timeout 1111' nodestatus=n nodesyncfiledir='/var/xcat/node/syncfiles1111' ntpservers=$mnip persistkvmguests=1111 powerinterval=1111 ppcmaxp=641111 ppcretry=31111 ppctimeout=1111 precreatemypostchdef -t site -o clustersite useSSHonAIX=1111 useNFSv4onAIX=1111 FQDNfirst=1111 SNsyncfiledir='/var/xcat/1111' auditnosyslog=1111 auditskipcmds=ALL blademaxp=641111 pruneservices=1111 runbootscripts=1111 setinstallnic=1111 sharedinstall=no sharedtftp=1111 skiptables=nics1111 skipvalidatelog=1111 snmpc=xc1111 sshbetweennodes=ALLGROUPS svloglocal=1111 syspowerinterval=11111 syspowermaxnodes=11111 tftpdir='/tftprot1111/' tftpflags='-v1111' timezone='America/New_York1111' useNmapfromMN=1111 useflowcontrol=1111 usexhrm=1111 vcenterautojoin=1111 vmwarereconfigonpower=1111 vsftp=1111 xcatconfdir='/etc/xcat1111' xcatdebugmode=0 xcatdport=3001 xcatiport=3002 xcatlport=3003 xcatmaxbatchconnections=641111 xcatmaxconnections=61111 xcatsslciphers='3DES' xcatsslversion=TLSv1 check:rc==0 @@ -1345,9 +1345,9 @@ cmd:cat /tmp/export_site_table_then_modify_json_then_import/export_site_json.inv check:rc==0 cmd:scp /tmp/export_site_table_then_modify_json_then_import/export_site_json.inv $$DSTMN:/tmp/export_site_table_then_modify_json_then_import_$$DSTMN/ check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/export_site_json.inv -t site -o clustersite' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/export_site_json.inv -t site -o clustersite' check:rc==0 -cmd: ssh $$DSTMN 'lsdef -t site -o clustersite -z |sort -t'=' -k1|tee /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/dstsite.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t site -o clustersite -z |sort -t'=' -k1|tee /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/dstsite.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_site_table_then_modify_json_then_import_$$DSTMN/dstsite.stanza /tmp/export_site_table_then_modify_json_then_import/dstsite.stanza check:rc==0 @@ -1359,9 +1359,9 @@ cmd:diff -y --ignore-blank-lines /tmp/export_site_table_then_modify_json_then_i check:rc==0 cmd:cat /tmp/export_site_table_then_modify_json_then_import/site.stanza | mkdef -z -f check:rc==0 -cmd:ssh $$DSTMN 'cat /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/site.stanza | mkdef -z -f' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;cat /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/site.stanza | mkdef -z -f' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_site_table_then_modify_json_then_import check:rc==0 From 317bb1f499c57482725c8c6b0854adf1c5afc1fd Mon Sep 17 00:00:00 2001 From: Yuan Bai Date: Tue, 20 Nov 2018 15:21:51 +0800 Subject: [PATCH 087/121] fix CI issue (#5821) --force-yes is deprecated --- travis.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/travis.pl b/travis.pl index 988fb958d..61b11e433 100644 --- a/travis.pl +++ b/travis.pl @@ -339,7 +339,7 @@ sub install_xcat{ } } - my $cmd = "sudo apt-get install xcat --force-yes"; + my $cmd = "sudo apt-get install xcat --allow-remove-essential --allow-unauthenticated"; @output = runcmd("$cmd"); #print ">>>>>Dumper the output of '$cmd'\n"; #print Dumper \@output; @@ -448,7 +448,7 @@ sub check_syntax{ # Return code: #-------------------------------------------------------- sub run_fast_regression_test{ - my $cmd = "sudo apt-get install xcat-test --force-yes"; + my $cmd = "sudo apt-get install xcat-test --allow-remove-essential --allow-unauthenticated"; my @output = runcmd("$cmd"); if($::RUNCMD_RC){ print RED "[run_fast_regression_test] $cmd ....[Failed]\n"; From adab82de4b1750bfbfa5303e6a844474b7ba1bec Mon Sep 17 00:00:00 2001 From: bxuxa Date: Tue, 20 Nov 2018 17:52:10 +0800 Subject: [PATCH 088/121] upgrade to travis xenial env --- .travis.yml | 6 ++--- travis.pl | 28 +++++++++++----------- xCAT-server/lib/xcat/monitoring/snmpmon.pm | 4 ++-- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index 507fd0a77..d8f18824b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,10 @@ os: linux -dist: trusty +dist: xenial sudo: required before_install: -- sudo apt-get install -y git reprepro devscripts debhelper libsoap-lite-perl libdbi-perl quilt openssh-server dpkg looptools genometools software-properties-common +- sudo apt-get install -y git fakeroot reprepro devscripts debhelper libcapture-tiny-perl libjson-perl libsoap-lite-perl libdbi-perl quilt openssh-server dpkg looptools genometools software-properties-common - perl -v -- echo "yes" | sudo cpan -f -i Capture::Tiny +#- echo "yes" | sudo cpan -f -i Capture::Tiny script: - echo $TRAVIS_BUILD_ID diff --git a/travis.pl b/travis.pl index 61b11e433..801265de6 100644 --- a/travis.pl +++ b/travis.pl @@ -271,19 +271,19 @@ sub send_back_comment{ #-------------------------------------------------------- sub build_xcat_core{ my @output; - my @cmds = ("gpg --list-keys", - "sed -i '/SignWith: /d' $ENV{'PWD'}/build-ubunturepo"); - foreach my $cmd (@cmds){ - print "[build_xcat_core] running $cmd\n"; - @output = runcmd("$cmd"); - if($::RUNCMD_RC){ - print "[build_xcat_core] $cmd ....[Failed]\n"; - send_back_comment("> **BUILD ERROR** : $cmd failed. Please click ``Details`` label in ``Merge pull request`` box for detailed information"); - return 1; - } - } + #my @cmds = ("gpg --list-keys", + # "sed -i '/SignWith: /d' $ENV{'PWD'}/build-ubunturepo"); + #foreach my $cmd (@cmds){ + # print "[build_xcat_core] running $cmd\n"; + # @output = runcmd("$cmd"); + # if($::RUNCMD_RC){ + # print "[build_xcat_core] $cmd ....[Failed]\n"; + # send_back_comment("> **BUILD ERROR** : $cmd failed. Please click ``Details`` label in ``Merge pull request`` box for detailed information"); + # return 1; + # } + #} - my $cmd = "sudo ./build-ubunturepo -c UP=0 BUILDALL=1"; + my $cmd = "sudo ./build-ubunturepo -c UP=0 BUILDALL=1 GPGSIGN=0"; @output = runcmd("$cmd"); print ">>>>>Dumper the output of '$cmd'\n"; print Dumper \@output; @@ -321,8 +321,8 @@ sub install_xcat{ my @cmds = ("cd ./../../xcat-core && sudo ./mklocalrepo.sh", "sudo chmod 777 /etc/apt/sources.list", - "sudo echo \"deb [arch=amd64] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep trusty main\" >> /etc/apt/sources.list", - "sudo echo \"deb [arch=ppc64el] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep trusty main\" >> /etc/apt/sources.list", + "sudo echo \"deb [arch=amd64] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep xenial main\" >> /etc/apt/sources.list", + "sudo echo \"deb [arch=ppc64el] http://xcat.org/files/xcat/repos/apt/2.14/xcat-dep xenial main\" >> /etc/apt/sources.list", "sudo wget -q -O - \"http://xcat.org/files/xcat/repos/apt/apt.key\" | sudo apt-key add -", "sudo apt-get -qq update"); my @output; diff --git a/xCAT-server/lib/xcat/monitoring/snmpmon.pm b/xCAT-server/lib/xcat/monitoring/snmpmon.pm index 75a8f26bb..a8e35eab9 100644 --- a/xCAT-server/lib/xcat/monitoring/snmpmon.pm +++ b/xCAT-server/lib/xcat/monitoring/snmpmon.pm @@ -759,7 +759,7 @@ sub configSwitch { my $table = xCAT::Table->new('switches', -create => 0); if ($table) { my @tmp1 = $table->getAllAttribs(('switch')); - if (defined(@tmp1) && (@tmp1 > 0)) { + if (scalar @tmp1 > 0) { foreach (@tmp1) { my @switches_tmp = noderange($_->{switch}); if (@switches_tmp == 0) { push @switches_tmp, $_->{switch}; } @@ -1360,7 +1360,7 @@ sub getNodesMonServers my $table = xCAT::Table->new('switches', -create => 0); if ($table) { my @tmp1 = $table->getAllAttribs(('switch')); - if (defined(@tmp1) && (@tmp1 > 0)) { + if (scalar @tmp1 > 0) { foreach (@tmp1) { my @switches_tmp = noderange($_->{switch}); if (@switches_tmp == 0) { push @switches_tmp, $_->{switch}; } From efc209ca5c0556b990570c783c97d86fae63f0db Mon Sep 17 00:00:00 2001 From: bxuxa Date: Tue, 20 Nov 2018 19:07:35 +0800 Subject: [PATCH 089/121] allow insecure --- travis.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/travis.pl b/travis.pl index 801265de6..e02784c9c 100644 --- a/travis.pl +++ b/travis.pl @@ -321,8 +321,8 @@ sub install_xcat{ my @cmds = ("cd ./../../xcat-core && sudo ./mklocalrepo.sh", "sudo chmod 777 /etc/apt/sources.list", - "sudo echo \"deb [arch=amd64] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep xenial main\" >> /etc/apt/sources.list", - "sudo echo \"deb [arch=ppc64el] http://xcat.org/files/xcat/repos/apt/2.14/xcat-dep xenial main\" >> /etc/apt/sources.list", + "sudo echo \"deb [arch=amd64 allow-insecure=yes] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep xenial main\" >> /etc/apt/sources.list", + "sudo echo \"deb [arch=ppc64el allow-insecure=yes] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep xenial main\" >> /etc/apt/sources.list", "sudo wget -q -O - \"http://xcat.org/files/xcat/repos/apt/apt.key\" | sudo apt-key add -", "sudo apt-get -qq update"); my @output; From d52f6600bc3efddccbb5a7502653939914bbe32f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=E1=B4=8F=C9=B4=C9=A2=20Jie?= Date: Tue, 20 Nov 2018 20:16:15 +0800 Subject: [PATCH 090/121] Fix shabang for some old scripts (#5824) --- xCAT-server/share/xcat/scripts/setup-dockerhost-cert.sh | 1 + xCAT-server/share/xcat/scripts/setup-local-client.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/xCAT-server/share/xcat/scripts/setup-dockerhost-cert.sh b/xCAT-server/share/xcat/scripts/setup-dockerhost-cert.sh index f23632e0b..ffc22a465 100755 --- a/xCAT-server/share/xcat/scripts/setup-dockerhost-cert.sh +++ b/xCAT-server/share/xcat/scripts/setup-dockerhost-cert.sh @@ -1,3 +1,4 @@ +#!/bin/bash # IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html # To create certficate for docker host echo "$0 xcatdockerhost" diff --git a/xCAT-server/share/xcat/scripts/setup-local-client.sh b/xCAT-server/share/xcat/scripts/setup-local-client.sh index 11a3bc284..9407fee82 100755 --- a/xCAT-server/share/xcat/scripts/setup-local-client.sh +++ b/xCAT-server/share/xcat/scripts/setup-local-client.sh @@ -1,3 +1,4 @@ +#!/bin/bash # IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html # set up credentials for user to be able to run xCAT commands # Must be run by root From c2c515912858998d9123e7b069959dea304e9104 Mon Sep 17 00:00:00 2001 From: bxuxa Date: Tue, 20 Nov 2018 20:12:42 +0800 Subject: [PATCH 091/121] remove unsuitable test cases --- travis.pl | 8 +++++++- xCAT-test/autotest/bundle/MN_basic.bundle | 6 +++--- xCAT-test/autotest/testcase/makedhcp/cases0 | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/travis.pl b/travis.pl index e02784c9c..01d87e1b8 100644 --- a/travis.pl +++ b/travis.pl @@ -488,7 +488,6 @@ sub run_fast_regression_test{ @output = runcmd("cat $conf_file"); print Dumper \@output; - # $cmd = "sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -s \"mn_only-wait_fix\" -l'"; # my @caseslist = runcmd("$cmd"); # if($::RUNCMD_RC){ @@ -613,6 +612,13 @@ my @disk = runcmd("df -h"); print "Disk information:\n"; print Dumper \@disk; +runcmd("sudo ip link set docker0 up"); +my @ipinfo = runcmd("ip addr"); +print "Networking information:\n"; +print Dumper \@ipinfo; +my @hostinfo = runcmd("cat /etc/hosts"); +print Dumper \@hostinfo; + #Start to check the format of pull request $last_func_start = timelocal(localtime()); print GREEN "\n------ Checking Pull Request Format ------\n"; diff --git a/xCAT-test/autotest/bundle/MN_basic.bundle b/xCAT-test/autotest/bundle/MN_basic.bundle index b093ba584..de3e09758 100644 --- a/xCAT-test/autotest/bundle/MN_basic.bundle +++ b/xCAT-test/autotest/bundle/MN_basic.bundle @@ -58,9 +58,9 @@ lsxcatd_a lsxcatd_d lsxcatd_h lsxcatd_null -makeconservercf_d -makeconservercf_noderange -makeconservercf_null +#makeconservercf_d +#makeconservercf_noderange +#makeconservercf_null #makedhcp_a_d_linux #makedhcp_a_linux #makedhcp_d_linux diff --git a/xCAT-test/autotest/testcase/makedhcp/cases0 b/xCAT-test/autotest/testcase/makedhcp/cases0 index 359c5a97d..818ca9173 100644 --- a/xCAT-test/autotest/testcase/makedhcp/cases0 +++ b/xCAT-test/autotest/testcase/makedhcp/cases0 @@ -5,7 +5,7 @@ label:mn_only,ci_test,dhcp cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi cmd:makedhcp -n check:rc==0 -cmd:ls /etc/dhcp/dhcpd.conf || ls /etc/dhcpd.conf +cmd:cat $(ls /etc/dhcp/dhcpd.conf || ls /etc/dhcpd.conf) check:rc==0 cmd:sleep 20 cmd:ps -e | grep dhcpd From 22cb310e224da2235cffa831b5144c3a31695503 Mon Sep 17 00:00:00 2001 From: bxuxa Date: Wed, 21 Nov 2018 10:25:38 +0800 Subject: [PATCH 092/121] fix makedhcp_n failed due to netmask is 32 length --- travis.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/travis.pl b/travis.pl index 01d87e1b8..4891d4017 100644 --- a/travis.pl +++ b/travis.pl @@ -612,12 +612,16 @@ my @disk = runcmd("df -h"); print "Disk information:\n"; print Dumper \@disk; -runcmd("sudo ip link set docker0 up"); +# Hacking the netmask. Not sure if we need to recover it after finish xcattest +# Note: Here has an assumption from Travis VM: only 1 UP Ethernet interface available (CHANGEME if it not as is) +my @intfinfo = runcmd("ip -o link |grep 'link/ether'|grep 'state UP' |awk -F ':' '{print \$2}'|head -1"); +foreach my $nic (@intfinfo) { + print "Hacking the netmask length to 16 if it is 32: $nic\n"; + runcmd("ip -4 addr show $nic|grep 'inet'|grep -q '/32' && sudo ip addr add \$(hostname -I|awk '{print \$1}')/16 dev $nic"); +} my @ipinfo = runcmd("ip addr"); print "Networking information:\n"; print Dumper \@ipinfo; -my @hostinfo = runcmd("cat /etc/hosts"); -print Dumper \@hostinfo; #Start to check the format of pull request $last_func_start = timelocal(localtime()); From 470e739c80345f2de089fac87e5db1d50b7fcb14 Mon Sep 17 00:00:00 2001 From: xuweibj Date: Wed, 21 Nov 2018 13:09:31 +0800 Subject: [PATCH 093/121] enhance rspconfig ntpservers case (#5692) --- .../testcase/rspconfig/rspconfig_ntp.sh | 79 +++++++++++++++++-- 1 file changed, 74 insertions(+), 5 deletions(-) diff --git a/xCAT-test/autotest/testcase/rspconfig/rspconfig_ntp.sh b/xCAT-test/autotest/testcase/rspconfig/rspconfig_ntp.sh index 1525b0de4..03e44720e 100755 --- a/xCAT-test/autotest/testcase/rspconfig/rspconfig_ntp.sh +++ b/xCAT-test/autotest/testcase/rspconfig/rspconfig_ntp.sh @@ -3,7 +3,15 @@ cn=$1 mn=$2 -ntpservers=`rspconfig $cn ntpservers | awk -F":" '{print $3}' | sed 's/^ //;s/ $//'` +ipsrc=`rspconfig $cn ipsrc | grep "BMC IP Source" | awk -F":" '{print $3}' | sed 's/^ //;s/ $//'` +if [ $? -ne 0 ]; then + echo "rspconfig $cn ipsrc failed" + exit 1 +fi + +echo "BMC IP Source is $ipsrc" + +ntpservers=`rspconfig $cn ntpservers | grep "BMC NTP Servers" | awk -F":" '{print $3}' | sed 's/^ //;s/ $//'` if [ $? -ne 0 ]; then echo "rspconfig $cn ntpservers failed" exit 1 @@ -17,7 +25,23 @@ else new_ntpservers=$mn fi -output=`rspconfig $cn ntpservers=$new_ntpservers` +output=`rspconfig $cn ntpservers=$new_ntpservers 2>&1` +echo "$output" +if [ $ipsrc == "DHCP" ]; then + if [ $? -ne 1 ]; then + if [[ "$output" =~ "Error: BMC IP source is DHCP, could not set NTPServers" ]]; then + echo "Get correct output for BMC IP source is DHCP" + exit 0 + else + echo "Get output '$output' when want to set NTPServers for BMC IP source is DHCP" + exit 1 + fi + else + echo "Get wrong exit code $? when want to set NTPServers for BMC IP source is DHCP" + exit 1 + fi +fi + if [ $? -ne 0 ]; then echo "rspconfig $cn ntpservers=$new_ntpservers failed" exit 1 @@ -30,6 +54,30 @@ else exit 1 fi +output=`rspconfig $cn ntpservers 2>&1` +if [[ $output =~ "$cn: BMC NTP Servers" ]] && [[ $output =~ "$new_ntpservers" ]]; then + echo "Checked NTPServers as $new_ntpservers success" +else + echo "Checked NTPServers as $new_ntpservers failed, the output is $output" + exit 1 +fi + +echo "rpower $cn bmcreboot to check ntpservers setting..." +rpower $cn bmcreboot +if [ $? -ne 0 ]; then + echo "run rpower $cn bmcreboot failed" +else + sleep 300 +fi + +output=`rspconfig $cn ntpservers 2>&1` +if [[ $output =~ "$cn: BMC NTP Servers" ]] && [[ $output =~ "$new_ntpservers" ]]; then + echo "Verified NTPServers $new_ntpservers after BMC reboot" +else + echo "Verified NTPServers as $ntpservers failed after BMC reboot, output is $output" + exit 1 +fi + echo "To clear environment" if [ $ntpservers != "None" ]; then @@ -38,16 +86,37 @@ else original_ntpservers="" fi -output=`rspconfig $cn ntpservers=$original_ntpservers` +output=`rspconfig $cn ntpservers=$original_ntpservers 2>&1` if [ $? -ne 0 ]; then echo "rspconfig $cn ntpservers=$ntpservers failed when clearing environment" exit 1 fi - if [[ "$output" =~ "$cn: BMC NTP Servers" ]] && [[ $output =~ "$ntpservers" ]]; then echo "Setting NTPServers as $ntpservers success when clearing environment" +fi + +output=`rspconfig $cn ntpservers 2>&1` +if [[ "$output" =~ "$cn: BMC NTP Servers" ]] && [[ $output =~ "$ntpservers" ]]; then + echo "Checked NTPServers as $ntpservers success when clearing environment" +else + echo "Checked NTPServers as $ntpservers failed when clearing environment output is $output" + exit 1 +fi + +echo "rpower $cn bmcreboot to recover environment" +rpower $cn bmcreboot +if [ $? -ne 0 ]; then + echo "run rpower $cn bmcreboot failed when recover environment" + exit 1 +else + sleep 300 +fi + +output=`rspconfig $cn ntpservers 2>&1` +if [[ "$output" =~ "$cn: BMC NTP Servers" ]] && [[ $output =~ "$ntpservers" ]]; then + echo "Verified NTPServers as $ntpservers success when clearing environment after BMC reboot" exit 0 fi -echo "Setting NTPServers as $ntpservers failed when clearing environment" +echo "Verified NTPServers as $ntpservers failed when clearing environment after BMC reboot, output is $output" exit 1 From 2cc06ef0b70054c42906d5208b7c4999e929bb5d Mon Sep 17 00:00:00 2001 From: zet809 Date: Wed, 21 Nov 2018 13:49:17 +0800 Subject: [PATCH 094/121] Fix issue 5721: xCAT-client rpm seems to depend on xCAT-server (#5826) --- perl-xCAT/xCAT/FSPpower.pm | 3 ++- perl-xCAT/xCAT/PPCboot.pm | 1 + perl-xCAT/xCAT/PPCpower.pm | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/perl-xCAT/xCAT/FSPpower.pm b/perl-xCAT/xCAT/FSPpower.pm index 972c22791..9aad0c01e 100644 --- a/perl-xCAT/xCAT/FSPpower.pm +++ b/perl-xCAT/xCAT/FSPpower.pm @@ -8,7 +8,6 @@ use xCAT::PPCcli qw(SUCCESS EXPECT_ERROR RC_ERROR NR_ERROR); use xCAT::PPCpower; use xCAT::FSPUtils; use xCAT::GlobalDef; -use xCAT_monitoring::monitorctrl; #use Data::Dumper; @@ -183,6 +182,7 @@ sub powercmd_boot { } } if (%newnodestatus) { + require xCAT_monitoring::monitorctrl; xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%newnodestatus, 1); } return (\@output); @@ -364,6 +364,7 @@ sub powercmd { } if (%newnodestatus) { + require xCAT_monitoring::monitorctrl; xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%newnodestatus, 1); } return (\@output); diff --git a/perl-xCAT/xCAT/PPCboot.pm b/perl-xCAT/xCAT/PPCboot.pm index c29da6816..80d80f919 100644 --- a/perl-xCAT/xCAT/PPCboot.pm +++ b/perl-xCAT/xCAT/PPCboot.pm @@ -614,6 +614,7 @@ sub rnetboot { my $newstat = $::STATUS_POWERING_ON; my %newnodestatus = (); $newnodestatus{$newstat} = [$node]; + require xCAT_monitoring::monitorctrl; xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%newnodestatus, 1); return ([ [ $node, "Success", $Rc ] ]); } diff --git a/perl-xCAT/xCAT/PPCpower.pm b/perl-xCAT/xCAT/PPCpower.pm index e61dbbcbf..77e73704e 100644 --- a/perl-xCAT/xCAT/PPCpower.pm +++ b/perl-xCAT/xCAT/PPCpower.pm @@ -9,7 +9,6 @@ use xCAT::MsgUtils; use xCAT::FSPpower; use xCAT::GlobalDef; -use xCAT_monitoring::monitorctrl; ########################################################################## # Parse the command line for options and operands @@ -301,6 +300,7 @@ sub powercmd_boot { } } + require xCAT_monitoring::monitorctrl; xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%newnodestatus, 1); return (\@output); } @@ -423,6 +423,7 @@ sub powercmd { } } } + require xCAT_monitoring::monitorctrl; xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%newnodestatus, 1); return (\@result); } From 74066fc7f161ba70aac43c9a780a3bc98d7f30ec Mon Sep 17 00:00:00 2001 From: litingt Date: Wed, 21 Nov 2018 01:50:35 -0500 Subject: [PATCH 095/121] update code to test x86_64 arch --- xCAT-test/autotest/testcase/httpport/cases0 | 66 ++++++++++++++++++- .../testcase/httpport/check_wget_files.sh | 25 ------- 2 files changed, 64 insertions(+), 27 deletions(-) delete mode 100755 xCAT-test/autotest/testcase/httpport/check_wget_files.sh diff --git a/xCAT-test/autotest/testcase/httpport/cases0 b/xCAT-test/autotest/testcase/httpport/cases0 index cc6b768d4..dcca66bfb 100644 --- a/xCAT-test/autotest/testcase/httpport/cases0 +++ b/xCAT-test/autotest/testcase/httpport/cases0 @@ -13,9 +13,69 @@ check:rc==0 cmd:lsdef -t site -i httpport -c check:output =~ 8898 check:rc==0 -cmd:if [[ "__GETNODEATTR($$CN,arch)__" = "ppc64le" ]]; then arch=ppc64; else arch=__GETNODEATTR($$CN,arch)__;fi; mknb $arch +cmd:dir="/tftpboot/pxelinux.cfg/p";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi +cmd:mknb ppc64 check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/httpport/check_wget_files.sh /tftpboot/pxelinux.cfg/p/ 8898 +cmd: #!/bin/bash +# get all filename in specified path +path=/tftpboot/pxelinux.cfg/p/ +files=$(ls $path) +for filename in $files +do + echo "The file is $filename" + grep 8898 $path$filename + if [ $? != 0 ];then + echo "port 8898 does not exist" + exit 1; + fi + links=$(grep 8898 $path$filename|awk -F " " '{print $2}') + for link in $links + do + wget $link + if [ $? != 0 ];then + echo "wget file $link failed" + exit 1; + else + echo "wget file $link succeed" + fi + done +done +check:rc==0 +cmd:dir="/tftpboot/xcat/xnba/nets";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi +cmd:mknb x86_64 +check:rc==0 +cmd:#!/bin/bash +# get all filename in specified path +path=/tftpboot/xcat/xnba/nets/ +rm -rf $path*.uefi +rm -rf $path*.elilo +files=$(ls $path) +mnip=$(tabdump site |grep -w master |awk -F "," '{print $2}'|sed 's/\"//g') +echo "The mn ip is $mnip" +for filename in $files +do + echo "The file is $filename" + grep 8898 $path$filename + if [ $? != 0 ];then + echo "port 8898 does not exist" + exit 1; + fi + grep "next-server" $path$filename + if [ $? == 0 ];then + sed -i "s/\${next-server}/$mnip/g" $path$filename + fi + links=$(grep 8898 $path$filename|awk -F " " '{print $4}') + for link in $links + do + wget $link + if [ $? != 0 ];then + echo "wget file $link failed" + exit 1; + else + echo "wget file $link succeed" + fi + done +done check:rc==0 cmd:/opt/xcat/share/xcat/tools/autotest/testcase/httpport/change_http_port.sh 8898 80 cmd:netstat -nlp|grep -E "apache2|httpd" @@ -26,4 +86,6 @@ check:rc==0 cmd:lsdef -t site -i httpport -c check:output =~ 80 check:rc==0 +cmd:dir="/tftpboot/pxelinux.cfg/p"; rm -rf $dir; if [ -d ${dir}".bak" ];then mv ${dir}".bak" $dir; fi +cmd:dir="/tftpboot/xcat/xnba/nets"; rm -rf $dir; if [ -d ${dir}".bak" ];then mv ${dir}".bak" $dir; fi end diff --git a/xCAT-test/autotest/testcase/httpport/check_wget_files.sh b/xCAT-test/autotest/testcase/httpport/check_wget_files.sh deleted file mode 100755 index 6ffd76af7..000000000 --- a/xCAT-test/autotest/testcase/httpport/check_wget_files.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# get all filename in specified path -path=$1 -files=$(ls $path) -for filename in $files -do - echo "The file is $filename" - grep $2 $path$filename - if [ $? != 0 ];then - echo "port $2 does not exist" - exit 1; - fi - links=$(grep $2 $path$filename|awk -F " " '{print $2}') - for link in $links - do - wget $link - if [ $? != 0 ];then - echo "wget file $link failed" - exit 1; - else - echo "wget file $link succeed" - fi - done -done From 10a858cf61fd65b8a70f15d49550e3cd0dbf1378 Mon Sep 17 00:00:00 2001 From: xuweibj Date: Wed, 21 Nov 2018 19:59:04 -0500 Subject: [PATCH 096/121] fix issue 5719, make output of commands against openbmc same --- .../agent/hwctl/executor/openbmc_inventory.py | 4 +- xCAT-server/lib/xcat/plugins/openbmc.pm | 38 ++++++++++++++----- xCAT-server/lib/xcat/plugins/openbmc2.pm | 2 +- .../UT_openbmc/supported_commands_case0 | 6 +-- xCAT-test/autotest/testcase/rspconfig/cases1 | 6 +-- .../autotest/testcase/rspconfig/rspconfig.sh | 2 +- 6 files changed, 38 insertions(+), 20 deletions(-) diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_inventory.py b/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_inventory.py index 0b454d426..dd9d15c76 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_inventory.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_inventory.py @@ -60,7 +60,7 @@ class OpenBMCInventoryTask(ParallelNodesCommand): continue firm_info.append('%s Firmware Product: %s (%s)%s' % - (firm_obj_dict[key].purpose, + (firm_obj_dict[key].purpose.upper(), firm_obj_dict[key].version, firm_obj_dict[key].active, flag)) @@ -70,7 +70,7 @@ class OpenBMCInventoryTask(ParallelNodesCommand): for extended in extendeds: firm_info.append('%s Firmware Product: ' \ '-- additional info: %s' % \ - (firm_obj_dict[key].purpose, extended)) + (firm_obj_dict[key].purpose.upper(), extended)) return firm_info diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 97c826ab0..f8f74dc46 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -1230,7 +1230,7 @@ sub parse_args { my $option_s; GetOptions( 's' => \$option_s ); return ([ 1, "The -s option is not supported for OpenBMC." ]) if ($option_s); - if ( "resolved" ~~ @ARGV) { + if ( "resolved=" ~~ @ARGV) { return ([ 1, "$usage_errormsg $reventlog_no_id_resolved_errormsg" ]); } return ([ 1, "Only one option is supported at the same time for $command" ]); @@ -1243,7 +1243,7 @@ sub parse_args { if ($command eq "rbeacon") { unless ($subcommand =~ /^on$|^off$|^stat$/) { - return ([ 1, "Only 'on', 'off' or 'stat' are supported for OpenBMC managed nodes."]); + return ([ 1, "Only 'on', 'off' and 'stat' are supported for OpenBMC managed nodes."]); } } elsif ($command eq "rpower") { unless ($subcommand =~ /^on$|^off$|^softoff$|^reset$|^boot$|^bmcreboot$|^bmcstate$|^status$|^stat$|^state$/) { @@ -1291,6 +1291,22 @@ sub parse_args { if ($::RSPCONFIG_CONFIGURED_API_KEY ne -1) { return ([ 1, "Can not query $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{subcommand} information with other options at the same time" ]) if ($#ARGV > 1); # subcommand defined in the configured API hash, return from here, the RSPCONFIG_CONFIGURED_API_KEY is the key into the hash + if ($subcommand =~ /(\w+)=(.*)/) { + my $subcommand_key = $1; + my $subcommand_value = $2; + my $error_msg = "Invalid value '$subcommand_value' for '$subcommand_key'"; + my @valid_values = sort (keys %{ $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_value} }); + if (!@valid_values) { + if ($api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{type} eq "boolean") { + @valid_values = (0, 1); + } else { + return ([1, "$error_msg"]); + } + } + if (! grep { $_ eq $subcommand_value } @valid_values ) { + return ([1, "$error_msg, Valid values: " . join(",", @valid_values)]); + } + } return; } elsif ($subcommand =~ /^(\w+)=(.*)/) { @@ -1729,14 +1745,16 @@ sub parse_command_status { } else { # Everything else is invalid - xCAT::SvrUtils::sendmsg([1, "Invalid value '$subcommand_value' for '$subcommand_key'"], $callback); + my $error_msg = "Invalid value '$subcommand_value' for '$subcommand_key'"; my @valid_values = keys %{ $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_value} }; if (!@valid_values) { if ($api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{type} eq "boolean") { - xCAT::SvrUtils::sendmsg([1, "Valid values: 0,1"], $callback); + xCAT::SvrUtils::sendmsg([1, "$error_msg, Valid values: 0,1"], $callback); + } else { + xCAT::SvrUtils::sendmsg([1, "$error_msg"], $callback); } } else { - xCAT::SvrUtils::sendmsg([1, "Valid values: " . join(",", @valid_values)], $callback); + xCAT::SvrUtils::sendmsg([1, "$error_msg, Valid values: " . join(",", @valid_values)], $callback); } return 1; } @@ -1782,7 +1800,7 @@ sub parse_command_status { $next_status{RSPCONFIG_GET_REQUEST} = "RSPCONFIG_GET_RESPONSE"; $status_info{RSPCONFIG_SET_HOSTNAME_REQUEST}{data} = $1; - $status_info{RSPCONFIG_SET_RESPONSE}{argv} = "Hostname"; + $status_info{RSPCONFIG_SET_RESPONSE}{argv} = "BMC Hostname"; $status_info{RSPCONFIG_GET_RESPONSE}{argv} = "hostname"; return 0; } @@ -2530,7 +2548,7 @@ sub deal_with_response { $cur_url = $status_info{REVENTLOG_RESOLVED_REQUEST}{init_url}; } my $log_id = (split ('/', $cur_url))[5]; - $error = "Invalid ID=$log_id provided to be resolved. [$::RESPONSE_FORBIDDEN]"; + $error = "Invalid ID: $log_id provided to be resolved. [$::RESPONSE_FORBIDDEN]"; } else{ $error = "$::RESPONSE_FORBIDDEN - Requested endpoint does not exist or may indicate function is not yet supported by OpenBMC firmware."; } @@ -3320,7 +3338,7 @@ sub reventlog_response { } else { # Return if there are no entries with callout data - xCAT::SvrUtils::sendmsg("There are no event log entries contributing to LED fault", $callback, $node); + xCAT::SvrUtils::sendmsg([1, "No event log entries needed to be resolved"], $callback, $node); $wait_node_num--; return; } @@ -3878,7 +3896,7 @@ sub rspconfig_api_config_response { my $last_component = $attr_value[-1]; my @valid_values = values %{ $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_value} }; if ($value) { - xCAT::SvrUtils::sendmsg($api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{display_name} . " : $last_component", $callback, $node); + xCAT::SvrUtils::sendmsg($api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{display_name} . ": $last_component", $callback, $node); my $found = grep(/$value/, @valid_values); if ($found eq 0) { # Received data value not expected @@ -4113,7 +4131,7 @@ sub rspconfig_dump_response { if ($node_info{$node}{cur_status} eq "RSPCONFIG_DUMP_CLEAR_RESPONSE") { if ($response_info->{'message'} eq $::RESPONSE_OK) { my $dump_id = $status_info{RSPCONFIG_DUMP_CLEAR_RESPONSE}{argv}; - xCAT::MsgUtils->message("I", { data => ["[$dump_id] clear"] }, $callback) unless ($next_status{ $node_info{$node}{cur_status} }); + xCAT::MsgUtils->message("I", { data => ["$node: [$dump_id] clear"] }, $callback) unless ($next_status{ $node_info{$node}{cur_status} }); } else { my $error_msg = "Could not clear BMC diagnostics successfully (". $response_info->{'message'} . ")"; xCAT::MsgUtils->message("W", { data => ["$node: $error_msg"] }, $callback) if ($next_status{ $node_info{$node}{cur_status} }); diff --git a/xCAT-server/lib/xcat/plugins/openbmc2.pm b/xCAT-server/lib/xcat/plugins/openbmc2.pm index 9ccfac90a..c15bf7ad8 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc2.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc2.pm @@ -202,7 +202,7 @@ sub parse_args { if ($command eq "rbeacon") { unless ($subcommand =~ /^on$|^off$|^stat$/) { - return ([ 1, "Only 'on', 'off' or 'stat' is supported for OpenBMC managed nodes."]); + return ([ 1, "Only 'on', 'off' and 'stat' are supported for OpenBMC managed nodes."]); } } elsif ($command eq "rflash") { my ($activate, $check, $delete, $directory, $list, $upload) = (0) x 6; diff --git a/xCAT-test/autotest/testcase/UT_openbmc/supported_commands_case0 b/xCAT-test/autotest/testcase/UT_openbmc/supported_commands_case0 index 403511355..7458af4dd 100644 --- a/xCAT-test/autotest/testcase/UT_openbmc/supported_commands_case0 +++ b/xCAT-test/autotest/testcase/UT_openbmc/supported_commands_case0 @@ -27,7 +27,7 @@ check:rc==0 check:output=~$$CN: SYSTEM SerialNumber cmd: rinv $$CN firm check:rc==0 -check:output=~$$CN: Host Firmware +check:output=~$$CN: HOST Firmware check:output=~$$CN: BMC Firmware cmd: rinv $$CN cpu check:rc==0 @@ -53,13 +53,13 @@ check:rc==0 check:output=~$$CN: Ps0 Input Voltage: cmd: rvitals $$CN wattage check:rc==0 -check:output=~$$CN: Total Power: +check:output=~$$CN: Ps0 Input Power: cmd: rvitals $$CN fanspeed check:rc==0 check:output=~$$CN: Fan cmd: rvitals $$CN power check:rc==0 -check:output=~$$CN: Total Power: +check:output=~$$CN: Ps0 Input Power: cmd: rvitals $$CN leds check:rc==0 check:output=~$$CN: LEDs Front diff --git a/xCAT-test/autotest/testcase/rspconfig/cases1 b/xCAT-test/autotest/testcase/rspconfig/cases1 index e475bcad0..deff88bb1 100644 --- a/xCAT-test/autotest/testcase/rspconfig/cases1 +++ b/xCAT-test/autotest/testcase/rspconfig/cases1 @@ -197,7 +197,7 @@ cmd:rspconfig $$CN powerrestorepolicy=restore check:output =~$$CN:\s*BMC Setting BMC PowerRestorePolicy... check:rc == 0 cmd:rspconfig $$CN powerrestorepolicy=abc -check:output =~$$CN:\s*(\[.*?\]: )?Error: Invalid value '\S*' for 'powerrestorepolicy', Valid values: restore,always_on,always_off +check:output =~$$CN:\s*Error: Invalid value '\S*' for 'powerrestorepolicy', Valid values: always_off,always_on,restore check:rc != 0 cmd:rspconfig $$CN powerrestorepolicy check:rc == 0 @@ -256,7 +256,7 @@ cmd:rspconfig $$CN timesyncmethod check:rc == 0 check:output =~$$CN:\s*BMC TimeSyncMethod:\s*Manual cmd:rspconfig $$CN timesyncmethod=abc -check:output =~$$CN:\s*(\[.*?\]: )?Error: Invalid value \S* for 'timesyncmethod', Valid values: ntp,manual +check:output =~$$CN:\s*(\[.*?\]: )?Error: Invalid value \S* for 'timesyncmethod', Valid values: manual,ntp check:rc != 0 cmd:syncmethod=`cat /tmp/timesyncmethod | awk -F ":" '{print $3}'`;newsyncmethod=`echo $syncmethod |tr 'A-Z' 'a-z'`;rspconfig $$CN timesyncmethod=$newsyncmethod check:rc == 0 @@ -290,7 +290,7 @@ cmd:rspconfig $$CN bootmode check:rc == 0 check:output =~$$CN:\s*BMC BootMode:\s*Setup cmd:rspconfig $$CN bootmode=abc -check:output =~$$CN:\s*(\[.*?\]: )?Error: Invalid value \S* for 'bootmode', Valid values: regular,safe,setup +check:output =~$$CN:\s*Error: Invalid value \S* for 'bootmode', Valid values: regular,safe,setup check:rc != 0 cmd:mode=`cat /tmp/bootmode |awk -F ":" '{print $3}'`;newmode=`echo $mode |tr 'A-Z' 'a-z'`;rspconfig $$CN bootmode=$newmode check:rc == 0 diff --git a/xCAT-test/autotest/testcase/rspconfig/rspconfig.sh b/xCAT-test/autotest/testcase/rspconfig/rspconfig.sh index e7f988b3f..8764b7735 100755 --- a/xCAT-test/autotest/testcase/rspconfig/rspconfig.sh +++ b/xCAT-test/autotest/testcase/rspconfig/rspconfig.sh @@ -177,7 +177,7 @@ function change_all if [[ $? -eq 0 ]];then BMCIP=`rspconfig $1 ip |awk -F":" '{print $3}'|sed s/[[:space:]]//g`; BMCNETMASK=`rspconfig $1 netmask |awk -F":" '{print $3}'|sed s/[[:space:]]//g`; - BMCGGATEWAY=`rspconfig $1 gateway |awk -F":" '{print $3}'|sed s/[[:space:]]//g`; + BMCGGATEWAY=`rspconfig $1 gateway |awk -F":" '{print $3}'| awk -F" " '{print $1}' |sed s/[[:space:]]//g`; output=`rspconfig $1 vlan` if [[ $output =~ "BMC VLAN ID enabled" ]];then BMCVLAN=`rspconfig $1 vlan |awk -F":" '{print $3}'|sed s/[[:space:]]//g` From bdccd452b92978a0af419e58f900d589d42e2a58 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Thu, 22 Nov 2018 16:49:32 +0800 Subject: [PATCH 097/121] Fix the gpg key import problem on SLES --- .../autotest/testcase/migration/sles_migration | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/xCAT-test/autotest/testcase/migration/sles_migration b/xCAT-test/autotest/testcase/migration/sles_migration index 40475f946..5a1f2d991 100644 --- a/xCAT-test/autotest/testcase/migration/sles_migration +++ b/xCAT-test/autotest/testcase/migration/sles_migration @@ -61,6 +61,12 @@ cmd:xdsh $$CN "/oldxcat/xcat-core/mklocalrepo.sh" check:rc==0 cmd:xdsh $$CN "cd /oldxcat/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c14`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" check:rc==0 +# Workaround github issue #5503 +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-dep.repo )" +cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n --no-gpg-checks refresh" +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b" +cmd:xdsh $$CN "zypper refresh" +check:rc==0 cmd:xdsh $$CN "zypper sl -U;zypper --gpg-auto-import-keys search --match-exact -s screen" check:rc==0 cmd:xdsh $$CN "zypper -n install xCAT" @@ -93,7 +99,7 @@ cmd:xdsh $$CN "cd /root/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c check:rc==0 # Workaround github issue #5503 cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-dep.repo )" -cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n refresh" +cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n --no-gpg-checks refresh" cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b" cmd:xdsh $$CN "zypper refresh;zypper -n update --force-resolution '*xCAT*'" check:rc==0 @@ -176,6 +182,12 @@ cmd:xdsh $$CN "/oldxcat/xcat-core/mklocalrepo.sh" check:rc==0 cmd:xdsh $$CN "cd /oldxcat/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c14`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" check:rc==0 +# Workaround github issue #5503 +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-dep.repo )" +cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n --no-gpg-checks refresh" +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b" +cmd:xdsh $$CN "zypper refresh" +check:rc==0 cmd:xdsh $$CN "zypper sl -U;zypper --gpg-auto-import-keys search --match-exact -s screen" check:rc==0 cmd:xdsh $$CN "zypper -n install xCAT" @@ -208,7 +220,7 @@ cmd:xdsh $$CN "cd /root/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c check:rc==0 # Workaround github issue #5503 cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-dep.repo )" -cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n refresh" +cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n --no-gpg-checks refresh" cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b" cmd:xdsh $$CN "zypper refresh;zypper -n update --force-resolution '*xCAT*'" check:rc==0 From 702daf894c86c4ced8bdb4328f44fef8c936e0f2 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Thu, 22 Nov 2018 16:58:24 +0800 Subject: [PATCH 098/121] Replace all # character to @. Due to xCAT-test internal limitation --- xCAT-test/autotest/testcase/migration/sles_migration | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-test/autotest/testcase/migration/sles_migration b/xCAT-test/autotest/testcase/migration/sles_migration index 5a1f2d991..8bd4a37be 100644 --- a/xCAT-test/autotest/testcase/migration/sles_migration +++ b/xCAT-test/autotest/testcase/migration/sles_migration @@ -62,7 +62,7 @@ check:rc==0 cmd:xdsh $$CN "cd /oldxcat/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c14`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" check:rc==0 # Workaround github issue #5503 -cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-dep.repo )" +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-dep.repo )" cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n --no-gpg-checks refresh" cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b" cmd:xdsh $$CN "zypper refresh" @@ -98,7 +98,7 @@ check:rc==0 cmd:xdsh $$CN "cd /root/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c14`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" check:rc==0 # Workaround github issue #5503 -cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-dep.repo )" +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-dep.repo )" cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n --no-gpg-checks refresh" cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b" cmd:xdsh $$CN "zypper refresh;zypper -n update --force-resolution '*xCAT*'" @@ -183,7 +183,7 @@ check:rc==0 cmd:xdsh $$CN "cd /oldxcat/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c14`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" check:rc==0 # Workaround github issue #5503 -cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-dep.repo )" +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-dep.repo )" cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n --no-gpg-checks refresh" cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b" cmd:xdsh $$CN "zypper refresh" From 10a6dd3535b15cb4408fd70c70d6912c6b4fbd3e Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Thu, 22 Nov 2018 17:06:11 +0800 Subject: [PATCH 099/121] Replace all # character to @. Due to xCAT-test internal limitation --- xCAT-test/autotest/testcase/migration/sles_migration | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-test/autotest/testcase/migration/sles_migration b/xCAT-test/autotest/testcase/migration/sles_migration index 8bd4a37be..76acbd859 100644 --- a/xCAT-test/autotest/testcase/migration/sles_migration +++ b/xCAT-test/autotest/testcase/migration/sles_migration @@ -219,7 +219,7 @@ check:rc==0 cmd:xdsh $$CN "cd /root/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c14`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" check:rc==0 # Workaround github issue #5503 -cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-dep.repo )" +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-dep.repo )" cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n --no-gpg-checks refresh" cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b" cmd:xdsh $$CN "zypper refresh;zypper -n update --force-resolution '*xCAT*'" From 972a7d1c9e58b6fea3945042703dbb5a6383ccca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=E1=B4=8F=C9=B4=C9=A2=20Jie?= Date: Thu, 22 Nov 2018 18:43:23 +0800 Subject: [PATCH 100/121] Minor go-xcat updates (#5753) * [go-xcat] Revise the error handling of xCAT uninstallation * [go-xcat] Add xCAT-genesis-builder to the uninstallation package list * [go-xcat] allow-insecure=yes for unsigned Debian/Ubuntu repository * [go-xcat] Set gpgcheck=0 if file repomd.xml.asc is not found * [go-xcat] Run `apt-get purge` for completely xCAT uninstallation on Ubuntu * [go-xcat] Bump version number * [go-xcat] Better error message when smoke test failed * Remove empty line * [go-xcat] Fix error handling in extract_archive --- xCAT-server/share/xcat/tools/go-xcat | 102 +++++++++++++++++++++++---- 1 file changed, 88 insertions(+), 14 deletions(-) diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index b43e95bd4..91ce38c3f 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -2,7 +2,7 @@ # # go-xcat - Install xCAT automatically. # -# Version 1.0.32 +# Version 1.0.34 # # Copyright (C) 2016, 2017, 2018 International Business Machines # Eclipse Public License, Version 1.0 (EPL-1.0) @@ -171,8 +171,8 @@ GO_XCAT_INSTALL_LIST=(perl-xcat xcat xcat-buildkit xcat-client xcat-genesis-base-amd64 xcat-genesis-base-ppc64 xnba-undi) # The package list of all the packages should be installed GO_XCAT_UNINSTALL_LIST=("${GO_XCAT_INSTALL_LIST[@]}" - goconserver xCAT-SoftLayer xCAT-confluent xCAT-csm xCAT-openbmc-py - xCAT-probe xCAT-test xCAT-vlan xCATsn xCAT-UI-deps) + goconserver xCAT-SoftLayer xCAT-confluent xCAT-csm xCAT-genesis-builder + xCAT-openbmc-py xCAT-probe xCAT-test xCAT-vlan xCATsn xCAT-UI-deps) # For Debian/Ubuntu, it will need a sight different package list type dpkg >/dev/null 2>&1 && GO_XCAT_UNINSTALL_LIST=("${GO_XCAT_INSTALL_LIST[@]}" @@ -934,6 +934,31 @@ function add_repo_by_file_yum() cp "${tmp}" "/etc/yum.repos.d/${repo_id}.repo" } +# Dirty workaround on SLES11 SP4 +# For SLES11, set gpgcheck=0 +# +# $1 repo file +function github_issue_5503_workaround2() +{ + [[ "${GO_XCAT_LINUX_DISTRO}" = "sles" ]] || return 0 + [[ "${GO_XCAT_LINUX_VERSION}" =~ ^11(\.[0-4]){0,1}$ ]] || return 0 + local repo_file="$1" + local tmp="${TMP_DIR}/tmp_repo_file_${repo_id}.repo.$$" + cp "${repo_file}" "${tmp}" + exit_if_bad "$?" "Copy file failed \`${repo_file}' -> \`${tmp}'" + while read -r + do + case "${REPLY}" in + "gpgcheck=1") + echo "gpgcheck=0" + ;; + *) + echo "${REPLY}" + ;; + esac + done <"${tmp}" >"${repo_file}" +} + # $1 repo file # $2 repo id function add_repo_by_file_zypper() @@ -954,6 +979,8 @@ function add_repo_by_file_zypper() echo "[${repo_id}]" grep -v '^\[' "${repo_file}" } >"${tmp}" + # For SLES11, set gpgcheck=0 + github_issue_5503_workaround2 "${tmp}" remove_repo_zypper "${repo_id}" && zypper addrepo "${tmp}" >/dev/null 2>&1 } @@ -1017,7 +1044,7 @@ function extract_archive() gzip -d -c "${archive}" | tar -t -f - | grep -v "^${repo_id}/" [[ "${PIPESTATUS[0]}" -eq 0 && "${PIPESTATUS[1]}" -eq 0 && "${PIPESTATUS[2]}" -eq 1 ]] - exit_if_bad "$?" "${archive}: bad gzipped tarball" + exit_if_bad "$?" "${archive}: bad gzipped tarball" || return 1 rm -rf "${install_path}/${repo_id}" gzip -d -c "${archive}" | ( cd "${install_path}" && tar -x -f - ) ;; @@ -1085,7 +1112,7 @@ function add_repo_by_url_yum_or_zypper() name=${repo_id} baseurl=${url%/} enabled=1 - gpgcheck=0 + gpgcheck=1 gpgkey=${url%/}/repodata/repomd.xml.key EOF add_repo_by_file "${tmp}" "${repo_id}" @@ -1121,9 +1148,17 @@ function add_repo_by_url_yum_or_zypper() name=${repo_id} baseurl=file://${url%/} enabled=1 - gpgcheck=0 - gpgkey=file://${url%/}/repodata/repomd.xml.key EOF + if [ -f "${url%/}/repodata/repomd.xml.asc" ] + then + echo "gpgcheck=1" >>"${tmp}" + else + echo "gpgcheck=0" >>"${tmp}" + fi + if [ -f "${url%/}/repodata/repomd.xml.key" ] + then + echo "gpgkey=file://${url%/}/repodata/repomd.xml.key" >>"${tmp}" + fi add_repo_by_file "${tmp}" "${repo_id}" return "$?" fi @@ -1182,7 +1217,8 @@ function add_repo_by_url_apt() [[ "${url:0:1}" = "/" ]] || url="${PWD}/${url}" # directory tmp="${TMP_DIR}/tmp_repo.list" - echo "deb [arch=$(dpkg --print-architecture)] file://${url} ${codename} main" >"${tmp}" + echo "deb [$([ ! -f "${url}/dists/${codename}/Release.gpg" ] && + echo "allow-insecure=yes ")arch=$(dpkg --print-architecture)] file://${url} ${codename} main" >"${tmp}" add_repo_by_file_apt "${tmp}" "${repo_id}" return "$?" fi @@ -1522,6 +1558,26 @@ function remove_package() function_dispatch "${FUNCNAME}" "$@" } +# $1 -y +function purge_package_apt() +{ + type apt-get >/dev/null 2>&1 || return 255 + local -a yes=() + [[ "$1" = "-y" ]] && yes=("-y") && shift + apt-get --allow-unauthenticated purge "${yes[@]}" "$@" +} + +function purge_package_others() +{ + remove_package "$@" +} + +# $1 -y +function purge_package() +{ + function_dispatch "${FUNCNAME}" "$@" +} + # $1 -y function install_xcat() { @@ -1608,6 +1664,16 @@ function trash_xcat() return 0 } +function uninstall_xcat_completely() +{ + purge_package -y "${GO_XCAT_UNINSTALL_LIST[@]}" + + kill_xcat + trash_xcat + + return 0 +} + function list_xcat_packages() { GO_XCAT_CORE_PACKAGE_LIST=($(get_package_list xcat-core)) @@ -1715,7 +1781,13 @@ function test_case_000_version() local ver="" local -i ret=0 - list_xcat_packages >/dev/null || return 1 + # Call function list_xcat_packages to fill up global array + # GO_XCAT_CORE_PACKAGE_LIST + # And the output will be logged into the debug log. + # + # Missing command `repoquery' may cause list_xcat_packages fail, + # in that case, just skip this test. + list_xcat_packages while read -r do @@ -1725,6 +1797,7 @@ function test_case_000_version() (( ret += $? )) done < <(check_package_version "${GO_XCAT_CORE_PACKAGE_LIST[@]}") + [ "${ret}" -ne "0" ] && echo warn_if_bad "${ret}" "xCAT packages version mismatch" return "${ret}" @@ -1985,14 +2058,10 @@ case "${GO_XCAT_ACTION}" in "away"|"uninstall") # Remove xCAT ask_to_continue "${GO_XCAT_YES[0]}" "xCAT is going to be ${GO_XCAT_ACTION/away/trash}ed." - debug_trace uninstall_xcat -y - boo_boo_if_bad "$?" case "${GO_XCAT_ACTION}" in "away") - # Do extra cleanup - debug_trace kill_xcat - debug_trace trash_xcat + debug_trace uninstall_xcat_completely debug_logger <<-EOF @@ -2000,6 +2069,9 @@ case "${GO_XCAT_ACTION}" in EOF ;; "uninstall") + debug_trace uninstall_xcat -y + boo_boo_if_bad "$?" + debug_logger <<-EOF xCAT has been uninstalled! @@ -2069,6 +2141,8 @@ case "${GO_XCAT_ACTION}" in # xCAT has been installed and so far so good smoke_testing >/dev/null 2>&1 RET="$?" + [ "${RET}" -ne "0" ] && echo + warn_if_bad "${RET}" "xCAT smoke testing failed." fi boo_boo_if_bad "${RET}" From e1009c6f715164cc09d3e5518f7a6be6837a2e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=E1=B4=8F=C9=B4=C9=A2=20Jie?= Date: Thu, 22 Nov 2018 18:47:23 +0800 Subject: [PATCH 101/121] [go-xcat] Force use C locale when do rpm query (#5827) --- xCAT-server/share/xcat/tools/go-xcat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index 91ce38c3f..d2f8e00a2 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -538,7 +538,7 @@ function check_package_version_rpm() else echo "${ver}" fi - done < <(rpm -q --qf '%{version}-%{release}\n' "$@" 2>/dev/null) + done < <(LC_ALL="C" rpm -q --qf '%{version}-%{release}\n' "$@" 2>/dev/null) return 0 } From b117be552ad213d5dc800b497dad344b186c21a1 Mon Sep 17 00:00:00 2001 From: Yuan Bai Date: Fri, 23 Nov 2018 10:00:02 +0800 Subject: [PATCH 102/121] refine tag prefix xcat.deployment for sles/ubuntu provision (#5831) * refine tag prefix xcat.deployment for sles/ubuntu provision --- .../netboot/sles/dracut_033/install.statelite | 2 +- .../netboot/sles/dracut_033/xcat-premount.sh | 2 +- .../netboot/sles/dracut_033/xcat-prepivot.sh | 42 +++++++++---- .../xcat/netboot/sles/dracut_033/xcatroot | 59 ++++++++++--------- .../share/xcat/netboot/ubuntu/genimage | 50 ++++++++-------- xCAT/postscripts/xcatpostinit | 12 ++-- xCAT/postscripts/xcatpostinit1.service.yast2 | 1 + 7 files changed, 95 insertions(+), 73 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/sles/dracut_033/install.statelite b/xCAT-server/share/xcat/netboot/sles/dracut_033/install.statelite index 7c7646652..2c00d3ec8 100755 --- a/xCAT-server/share/xcat/netboot/sles/dracut_033/install.statelite +++ b/xCAT-server/share/xcat/netboot/sles/dracut_033/install.statelite @@ -1,7 +1,7 @@ #!/bin/sh echo $drivers dracut_install wget cpio gzip modprobe wc touch echo cut -dracut_install grep ifconfig hostname awk egrep grep dirname expr +dracut_install grep ifconfig hostname awk egrep grep dirname expr logger dracut_install parted mke2fs bc mkswap swapon chmod inst "$moddir/xcat-updateflag" "/tmp/updateflag" inst_hook pre-mount 5 "$moddir/xcat-premount.sh" diff --git a/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-premount.sh b/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-premount.sh index 9f320bb66..f9b7a5c94 100644 --- a/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-premount.sh +++ b/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-premount.sh @@ -1,6 +1,5 @@ #!/bin/sh #script to update nodelist.nodestatus during provision - XCAT="$(getarg XCAT=)" STATEMNT="$(getarg STATEMNT=)" MASTER=`echo $XCAT |awk -F: '{print $1}'` @@ -14,6 +13,7 @@ XCATIPORT="3002" fi log_label="xcat.deployment" +xcatdebugmode="$(getarg xcatdebugmode=)" [ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER" logger $SYSLOGHOST -t $log_label -p local4.info "=============deployment starting====================" logger $SYSLOGHOST -t $log_label -p local4.info "Starting xcat-premount..." diff --git a/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-prepivot.sh b/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-prepivot.sh index d8e12e290..9471787b7 100755 --- a/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-prepivot.sh +++ b/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-prepivot.sh @@ -1,8 +1,13 @@ #!/bin/sh +log_label="xcat.deployment" NEWROOT=/sysroot SERVER=${SERVER%%/*} SERVER=${SERVER%:} RWDIR=.statelite +XCAT="$(getarg XCAT=)" +xcatdebugmode="$(getarg xcatdebugmode=)" +XCATMASTER=$XCAT +MASTER=`echo $XCATMASTER |awk -F: '{print $1}'` if [ ! -z $STATEMNT ]; then #btw, uri style might have left future options other than nfs open, will u se // to detect uri in the future I guess SNAPSHOTSERVER=${STATEMNT%:*} SNAPSHOTROOT=${STATEMNT#*/} @@ -14,7 +19,8 @@ if [ ! -z $STATEMNT ]; then #btw, uri style might have left future options other SNAPSHOTSERVER= fi fi - +[ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER" +logger $SYSLOGHOST -t $log_label -p local4.info "Executing xcat-prepivot to set up statelite..." echo Setting up Statelite mkdir -p $NEWROOT @@ -25,15 +31,18 @@ MAXTRIES=7 ITER=0 if [ ! -e "$NEWROOT/$RWDIR" ]; then echo "" - echo "This NFS root directory doesn't have a /$RWDIR directory for me to mount a rw filesystem. You'd better create it... " + msg="This NFS root directory doesn't have a /$RWDIR directory for me to mount a rw filesystem. You'd better create it... " + echo "$msg" echo "" + logger $SYSLOGHOST -t $log_label -p local4.error "$msg" /bin/sh fi if [ ! -e "$NEWROOT/etc/init.d/statelite" ]; then echo "" - echo "$NEWROOT/etc/init.d/statelite doesn't exist. Perhaps you didn't create this image with th e -m statelite mode" + msg="$NEWROOT/etc/init.d/statelite doesn't exist. Perhaps you didn't create this image with th e -m statelite mode" echo "" + logger $SYSLOGHOST -t $log_label -p local4.error "$msg" /bin/sh fi @@ -57,15 +66,19 @@ if [ ! -z $SNAPSHOTSERVER ]; then while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do ITER=$(( ITER + 1 )) if [ "$ITER" == "$MAXTRIES" ]; then - echo "Your are dead, rpower $ME boot to play again." - echo "Possible problems: + msg="Your are dead, rpower $ME boot to play again. + Possible problems: 1. $SNAPSHOTSERVER is not exporting $SNAPSHOTROOT ? 2. Is DNS set up? Maybe that's why I can't mount $SNAPSHOTSERVER." + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.error "$msg" /bin/sh exit fi RS= $(( $RANDOM % 20 )) - echo "Trying again in $RS seconds..." + msg="Trying again in $RS seconds..." + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.info "$msg" sleep $RS done @@ -76,8 +89,10 @@ if [ ! -z $SNAPSHOTSERVER ]; then while ! umount -l $NEWROOT/$RWDIR/persistent; do ITER=$(( ITER + 1 )) if [ "$ITER" == "$MAXTRIES" ]; then - echo "Your are dead, rpower $ME boot to play again." - echo "Cannot umount $NEWROOT/$RWDIR/persistent." + msg="Your are dead, rpower $ME boot to play again. + Cannot umount $NEWROOT/$RWDIR/persistent." + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.error "$msg" /bin/sh exit fi @@ -91,8 +106,10 @@ if [ ! -z $SNAPSHOTSERVER ]; then while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do ITER=$(( ITER + 1 )) if [ "$ITER" == "$MAXTRIES" ]; then - echo "Your are dead, rpower $ME boot to play again." - echo "Possible problems: cannot mount to $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME." + msg="Your are dead, rpower $ME boot to play again. + Possible problems: cannot mount to $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME." + echo $msg + logger $SYSLOGHOST -t $log_label -p local4.info "$msg" /bin/sh exit fi @@ -103,8 +120,10 @@ if [ ! -z $SNAPSHOTSERVER ]; then fi # TODO: handle the dhclient/resolv.conf/ntp, etc -echo "Get to enable localdisk" +logger $SYSLOGHOST -t $log_label -p local4.info "Enabling localdisk ..." +echo "Enable localdisk ..." $NEWROOT/etc/init.d/localdisk +logger $SYSLOGHOST -t $log_label -p local4.info "Preparing mount points ..." $NEWROOT/etc/init.d/statelite READONLY=yes export READONLY @@ -175,3 +194,4 @@ fi echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm "$job"' > $hookdir/initqueue/xcat.sh # force udevsettle to break > $hookdir/initqueue/work +logger $SYSLOGHOST -t $log_label -p local4.info "Exit xcat-prepivot" diff --git a/xCAT-server/share/xcat/netboot/sles/dracut_033/xcatroot b/xCAT-server/share/xcat/netboot/sles/dracut_033/xcatroot index ceb6bbd8d..7414e5b7d 100755 --- a/xCAT-server/share/xcat/netboot/sles/dracut_033/xcatroot +++ b/xCAT-server/share/xcat/netboot/sles/dracut_033/xcatroot @@ -1,11 +1,12 @@ #!/bin/sh - +log_label="xcat.deployment" NEWROOT=$3 RWDIR=.statelite -XCATMASTER=$XCAT . /lib/dracut-lib.sh +XCAT="$(getarg XCAT=)" +XCATMASTER=$XCAT rootlimit="$(getarg rootlimit=)" @@ -19,25 +20,27 @@ XCATIPORT="3002" fi xcatdebugmode="$(getarg xcatdebugmode=)" +[ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER" +logger $SYSLOGHOST -t $log_label -p local4.info "=============deployment starting====================" +logger $SYSLOGHOST -t $log_label -p local4.info "Executing xcatroot to prepare for netbooting (dracut_033)..." -[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "running xcatroot...." - -[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "MASTER=$MASTER XCATIPORT=$XCATIPORT" +[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "MASTER=$MASTER XCATIPORT=$XCATIPORT" if [ $NODESTATUS -ne 0 ];then -[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "nodestatus: netbooting,reporting..." -/tmp/updateflag $MASTER $XCATIPORT "installstatus netbooting" + logger $SYSLOGHOST -t $log_label -p local4.info "Sending request to $MASTER:$XCATIPORT for changing status to netbooting..." + /tmp/updateflag $MASTER $XCATIPORT "installstatus netbooting" fi if [ ! -z "$imgurl" ]; then if [ xhttp = x${imgurl%%:*} ]; then + logger $SYSLOGHOST -t $log_label -p local4.info "Downloading rootfs image from $imgurl..." NFS=0 FILENAME=${imgurl##*/} while [ ! -r "$FILENAME" ]; do - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "downloading $imgurl...." + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "downloading $imgurl...." echo Getting $imgurl... if ! wget -nv $imgurl; then - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "downloading $imgurl failed,retrying...." + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "downloading $imgurl failed,retrying...." rm -f $FILENAME sleep 27 fi @@ -68,7 +71,7 @@ if [ -r /rootimg.sfs ]; then mount --move /ro $NEWROOT/ro mount --move /rw $NEWROOT/rw elif [ -r /rootimg.cpio.gz ] || [ -r /rootimg.cpio.xz ]; then - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "rootimg downloaded,setting up RAM-root tmpfs...." + logger $SYSLOGHOST -t $log_label -p local4.info "Setting up RAM-root tmpfs on downloaded rootimg.cpio.[gz/xz]..." echo Setting up RAM-root tmpfs. if [ -z $rootlimit ];then mount -t tmpfs -o mode=755 rootfs $NEWROOT @@ -77,7 +80,7 @@ elif [ -r /rootimg.cpio.gz ] || [ -r /rootimg.cpio.xz ]; then fi cd $NEWROOT - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "Extracting root filesystem:" + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "Extracting root filesystem:" echo -n "Extracting root filesystem:" if [ -r /rootimg.cpio.gz ]; then if [ -x /bin/cpio ]; then @@ -93,10 +96,10 @@ elif [ -r /rootimg.cpio.gz ] || [ -r /rootimg.cpio.xz ]; then fi fi $NEWROOT/etc/init.d/localdisk - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "Done...." + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "Done...." echo Done elif [ -r /rootimg.tar.gz ] || [ -r /rootimg.tar.xz ]; then - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "rootimg downloaded,setting up RAM-root tmpfs...." + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "rootimg downloaded,setting up RAM-root tmpfs...." echo Setting up RAM-root tmpfs. if [ -z $rootlimit ];then mount -t tmpfs -o mode=755 rootfs $NEWROOT @@ -105,7 +108,7 @@ elif [ -r /rootimg.tar.gz ] || [ -r /rootimg.tar.xz ]; then fi cd $NEWROOT - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "Extracting root filesystem:" + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "Extracting root filesystem:" echo -n "Extracting root filesystem:" if [ -r /rootimg.tar.gz ]; then tar --selinux --xattrs-include='*' -zxf /rootimg.tar.gz @@ -119,7 +122,7 @@ elif [ -r /rootimg.tar.gz ] || [ -r /rootimg.tar.xz ]; then fi fi $NEWROOT/etc/init.d/localdisk - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "Done...." + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "Done...." echo Done elif [ -r /rootimg-statelite.gz ]; then echo Setting up RAM-root tmpfs for statelite mode. @@ -244,18 +247,18 @@ elif [ -r /rootimg-statelite.gz ]; then mount -n --bind /sys $NEWROOT/sys else - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "Failed to download image, panicing in 5..." + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "Failed to download image, panicing in 5..." echo -n Failed to download image, panicing in 5... for i in 4 3 2 1 0; do /bin/sleep 1 - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "$i..." + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "$i..." echo -n $i... done - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "You're dead. rpower nodename reset to play again." - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "* Did you packimage with -m cpio, -m squashfs, or -m nfs?" - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "* If using -m squashfs did you include aufs.ko with geninitrd? e.g.: -n tg3,squashfs,aufs,loop" - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "If using -m nfs did you export NFS and sync rootimg? And did you include the aufs and nfs modules in the proper order: e.g.: -n tg3,aufs,loop,sunrpc,lockd,nfs_acl,nfs" + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "You're dead. rpower nodename reset to play again." + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "* Did you packimage with -m cpio, -m squashfs, or -m nfs?" + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "* If using -m squashfs did you include aufs.ko with geninitrd? e.g.: -n tg3,squashfs,aufs,loop" + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "If using -m nfs did you export NFS and sync rootimg? And did you include the aufs and nfs modules in the proper order: e.g.: -n tg3,aufs,loop,sunrpc,lockd,nfs_acl,nfs" echo echo "You're dead. rpower nodename reset to play again. @@ -296,7 +299,7 @@ if [ -z $STATEMNT ]; then netif=${lf#*.} netif=${netif%.*} cp $lf "$NEWROOT/var/lib/dhclient/dhclient-$netif.leases" - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "saving $NEWROOT/var/lib/dhclient/dhclient-$netif.leases" + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "saving $NEWROOT/var/lib/dhclient/dhclient-$netif.leases" done if [ ! -z "$ifname" ]; then @@ -312,10 +315,10 @@ if [ -z $STATEMNT ]; then if [ ! -z "$MACX" ] && [ ! -z "$ETHX" ]; then if [ ! -e $NEWROOT/etc/sysconfig/network/ifcfg-$ETHX ]; then - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "creating $NEWROOT/etc/sysconfig/network-scripts/ifcfg-$ETHX" + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "creating $NEWROOT/etc/sysconfig/network-scripts/ifcfg-$ETHX" touch $NEWROOT/etc/sysconfig/network/ifcfg-$ETHX fi - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "writing $NEWROOT/etc/sysconfig/network-scripts/ifcfg-$ETHX: DEVICE=$ETHX;BOOTPROTO=dhcp;HWADDR=$MACX;ONBOOT=yes" + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "writing $NEWROOT/etc/sysconfig/network-scripts/ifcfg-$ETHX: DEVICE=$ETHX;BOOTPROTO=dhcp;HWADDR=$MACX;ONBOOT=yes" echo "DEVICE=$ETHX" > $NEWROOT/etc/sysconfig/network/ifcfg-$ETHX echo "BOOTPROTO=dhcp" >> $NEWROOT/etc/sysconfig/network/ifcfg-$ETHX echo "HWADDR=$MACX" >> $NEWROOT/etc/sysconfig/network/ifcfg-$ETHX @@ -323,18 +326,18 @@ if [ -z $STATEMNT ]; then fi fi -[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "saving $NEWROOT/etc/resolv.conf" +[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "saving $NEWROOT/etc/resolv.conf" cp /etc/resolv.conf "$NEWROOT/etc/" if [ -d "$NEWROOT/etc/sysconfig" -a ! -e "$NEWROOT/etc/sysconfig/selinux" ]; then - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "disable selinux ..." + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "disable selinux ..." echo "SELINUX=disabled" >> "$NEWROOT/etc/sysconfig/selinux" fi -[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "setting hostname..." +[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "setting hostname..." echo `hostname` > $NEWROOT/etc/hostname -[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "exiting xcatroot..." +logger $SYSLOGHOST -t $log_label -p debug "Exiting xcatroot..." # inject new exit_if_exists echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm "$job"' > $hookdir/initqueue/xcat.sh diff --git a/xCAT-server/share/xcat/netboot/ubuntu/genimage b/xCAT-server/share/xcat/netboot/ubuntu/genimage index a14c874e6..c36006d41 100755 --- a/xCAT-server/share/xcat/netboot/ubuntu/genimage +++ b/xCAT-server/share/xcat/netboot/ubuntu/genimage @@ -1023,7 +1023,7 @@ sub mkinitrd { NEWROOT="/sysroot" SHELL="/bin/sh" RWDIR=".statelite" - +log_label="xcat.deployment" # Define some colors RESET="\033[0m" @@ -1229,17 +1229,16 @@ ifconfig lo up XCATMASTER=`echo \$XCATSERVER|awk -F: '{print \$1}'` -if [ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]; then - PORT="514" - syslogd -R \$XCATMASTER:\$PORT -fi - -([ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]) && logger -t xcat -p debug "running init script..." -([ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]) && logger -t xcat -p debug "MASTER=\$XCATMASTER XCATIPORT=\$XCATIPORT" +PORT="514" +syslogd -R \$XCATMASTER:\$PORT +MASTER=`echo \$XCATMASTER |awk -F: '{print \$1}'` +logger -t \$log_label -p info "=============deployment starting====================" +logger -t \$log_label -p info "Executing init to prepare for netbooting" +([ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]) && logger -t \$log_label -p debug "MASTER=\$XCATMASTER XCATIPORT=\$XCATIPORT" #update nodelist.nodestatus to "netbooting" if [ \$NODESTATUS != 'n' ]; then - ([ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]) && logger -t xcat -p debug "nodestatus: netbooting,reporting..." + logger -t \$log_label -p info "Sending request to \$XCATMASTER:\$XCATIPORT for changing status to netbooting..." /tmp/updateflag \$XCATMASTER \$XCATIPORT "installstatus netbooting" fi @@ -1256,10 +1255,10 @@ for i in `cat /proc/cmdline`; do MAXTRIES=5 ITER=0 while [ ! -r "\$FILENAME" ]; do - ([ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]) && logger -t xcat -p debug "downloading \$VALUE..." + logger -t \$log_label -p info "Downloading rootfs image from \$VALUE..." echo Getting \$VALUE... if ! /usr/bin/wget \$VALUE; then - ([ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]) && logger -t xcat -p debug "downloading \$VALUE failed,retrying..." + ([ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]) && logger -t \$log_label -p debug "downloading \$VALUE failed,retrying..." ST=`expr \$RANDOM % 5` sleep \$ST rm -f \$FILENAME @@ -1338,6 +1337,7 @@ if [ "\$STATELITE" = "1" ]; then # for statelite mode on top of the ramdisk EOMS print $inifile " if [ -r /rootimg-statelite.gz ]; then\n"; + print $inifile " logger -t \$log_label -p info \"Setting up RAM-root tmpfs on downloaded rootimg.cpio.[gz/xz]...\"\n"; print $inifile " echo Setting up RAM-root tmpfs.\n"; if ($rootlimit) { print $inifile " mount -o \"size=$rootlimit,mode=755\" -t tmpfs rootfs \$NEWROOT \n"; @@ -1463,7 +1463,7 @@ if [ -r /rootimg.sfs ]; then mount --move /rw \$NEWROOT/rw EOMS print $inifile "elif [ -r /rootimg.cpio.gz ] || [ -r /rootimg.cpio.xz ]; then\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"rootimg downloaded,setting up RAM-root tmpfs...\"\n"; + print $inifile " logger -t \$log_label -p info \"Setting up RAM-root tmpfs on downloaded rootimg.cpio.[gz/xz]...\"\n"; print $inifile " echo Setting up RAM-root tmpfs.\n"; if ($rootlimit) { print $inifile " mount -o \"size=$rootlimit,mode=755\" -t tmpfs rootfs \$NEWROOT\n"; @@ -1471,7 +1471,7 @@ EOMS print $inifile " mount -o mode=755 -t tmpfs rootfs \$NEWROOT\n"; } print $inifile " cd \$NEWROOT\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"Extracting root filesystem:\"\n"; + print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"Extracting root filesystem:\"\n"; print $inifile " echo -n \"Extracting root filesystem:\"\n"; print $inifile " if [ -r /rootimg.cpio.gz ]; then\n"; print $inifile " if [ -x /bin/cpio ]; then\n"; @@ -1486,10 +1486,9 @@ EOMS print $inifile " xz -cd /rootimg.cpio.xz |cpio -idum\n"; print $inifile " fi\n"; print $inifile " fi\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"Done...\"\n"; print $inifile " echo Done\n"; print $inifile "elif [ -r /rootimg.tar.gz ] || [ -r /rootimg.tar.xz ]; then\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"rootimg downloaded,setting up RAM-root tmpfs...\"\n"; + print $inifile " logger -t \$log_label -p info \"Setting up RAM-root tmpfs on downloaded rootimg.cpio.[gz/xz]...\"\n"; print $inifile " echo Setting up RAM-root tmpfs.\n"; if ($rootlimit) { @@ -1498,27 +1497,26 @@ EOMS print $inifile " mount -o mode=755 -t tmpfs rootfs \$NEWROOT\n"; } print $inifile " cd \$NEWROOT\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"Extracting root filesystem:\"\n"; + print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"Extracting root filesystem:\"\n"; print $inifile " echo -n \"Extracting root filesystem:\"\n"; print $inifile " if [ -r /rootimg.tar.gz ]; then\n"; print $inifile " /bin/tar --selinux --xattrs --xattrs-include='*' -zxf /rootimg.tar.gz\n"; print $inifile " elif [ -r /rootimg.tar.xz ]; then\n"; print $inifile " /bin/tar --selinux --xattrs --xattrs-include='*' -Jxf /rootimg.tar.xz\n"; print $inifile " fi\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"Done...\"\n"; print $inifile " echo Done\n"; print $inifile "else\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"Failed to download image, panicing in 5...\"\n"; + print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"Failed to download image, panicing in 5...\"\n"; print $inifile " echo -n Failed to download image, panicing in 5...\n"; print $inifile " for i in 4 3 2 1 0; do\n"; print $inifile " /bin/sleep 5\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"\$i...\"\n"; + print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"\$i...\"\n"; print $inifile " echo -n \$i...\n"; print $inifile " done\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"You're dead. rpower nodename reset to play again.\"\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"* Did you packimage with -m cpio, -m squashfs, or -m nfs?\"\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"* If using -m squashfs did you include aufs.ko with geninitrd? e.g.: -n tg3,squashfs,aufs,loop\"\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"If using -m nfs did you export NFS and sync rootimg? And did you include the aufs and nfs modules in the proper order: e.g.: -n tg3,aufs,loop,sunrpc,lockd,nfs_acl,nfs\"\n"; + print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"You're dead. rpower nodename reset to play again.\"\n"; + print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"* Did you packimage with -m cpio, -m squashfs, or -m nfs?\"\n"; + print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"* If using -m squashfs did you include aufs.ko with geninitrd? e.g.: -n tg3,squashfs,aufs,loop\"\n"; + print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"If using -m nfs did you export NFS and sync rootimg? And did you include the aufs and nfs modules in the proper order: e.g.: -n tg3,aufs,loop,sunrpc,lockd,nfs_acl,nfs\"\n"; print $inifile " echo\n"; print $inifile < Date: Fri, 23 Nov 2018 10:27:13 +0800 Subject: [PATCH 103/121] do task396, update xcat-inventory cases (#5830) --- .../testcase/xcat-inventory/cases.node | 16 +- .../cases.osimage.import_from_osimage_dir | 8 +- .../testcase/xcat-inventory/cases.site | 190 +++++++++--------- .../test.environments.osimage.update.json | 2 +- 4 files changed, 107 insertions(+), 109 deletions(-) diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.node b/xCAT-test/autotest/testcase/xcat-inventory/cases.node index 9be85e214..2f25cd706 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.node +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.node @@ -803,15 +803,15 @@ check:rc==0 #To test if "xcat-inventory export -t node" works correctly cmd:xcat-inventory export -t node |tee /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node check:rc==0 -cmd: grep " \"xcatdefaults\": " /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node > /dev/null 2>&1; if [[ $? -eq 0 ]]; then exit 0; else exit 1;fi +cmd: grep "xcatdefaults:" /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node > /dev/null 2>&1; if [[ $? -eq 0 ]]; then exit 0; else exit 1;fi check:rc==0 -cmd: grep " \"service\": " /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node > /dev/null 2>&1; if [[ $? -eq 0 ]]; then exit 0; else exit 1;fi +cmd: grep "service:" /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node > /dev/null 2>&1; if [[ $? -eq 0 ]]; then exit 0; else exit 1;fi check:rc==0 -cmd:dn=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/node_in_xcat_db|wc -l);dg=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/group_in_xcat_db |wc -l);((da=$dn+$dg+2));echo "dn=$dn dg=$dg da=$da";ia=$(grep " \"obj_type\": " /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node|wc -l);echo "ia=$ia"; if [[ $da -eq $ia ]];then exit 0; else exit 1;fi +cmd:dn=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/node_in_xcat_db|wc -l);dg=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/group_in_xcat_db |wc -l);((da=$dn+$dg+2));echo "dn=$dn dg=$dg da=$da";ia=$(grep "obj_type:" /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node|wc -l);echo "ia=$ia"; if [[ $da -eq $ia ]];then exit 0; else exit 1;fi check:rc==0 -cmd:a=0;for i in `awk -F':' '{print $1}' /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/group_in_xcat_db`; do grep -E " \"$i\": " /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node; if [[ $? -eq 0 ]]; then ((a++));fi;done;dg=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/group_in_xcat_db|wc -l);if [[ $a -eq $dg ]]; then exit 0; else exit 1;fi +cmd:a=0;for i in `awk -F':' '{print $1}' /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/group_in_xcat_db`; do grep -E " $i:" /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node; if [[ $? -eq 0 ]]; then ((a++));fi;done;dg=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/group_in_xcat_db|wc -l);if [[ $a -eq $dg ]]; then exit 0; else exit 1;fi check:rc==0 -cmd:a=0;for i in `awk -F' ' '{print $1}' /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/node_in_xcat_db`;do grep -E " \"$i\": " /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node; if [[ $? -eq 0 ]]; then ((a++));fi;done;dn=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/node_in_xcat_db |wc -l); if [[ $dn -eq $a ]]; then exit 0; else exit 1;fi +cmd:a=0;for i in `awk -F' ' '{print $1}' /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/node_in_xcat_db`;do grep -E ""$i:" /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node; if [[ $? -eq 0 ]]; then ((a++));fi;done;dn=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/node_in_xcat_db |wc -l); if [[ $dn -eq $a ]]; then exit 0; else exit 1;fi check:rc==0 cmd:rmdef bogusnode[1-3] check:rc==0 @@ -846,7 +846,7 @@ check:rc==0 #To test if "xcat-inventory export --format=yaml -t node |tee /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_format/export_all_node cmd:xcat-inventory export --format=yaml -t node |tee /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_format/export_all_node check:rc==0 -cmd: grep " xcatdefaults:" /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_format/export_all_node > /dev/null 2>&1; if [[ $? -eq 0 ]]; then exit 0; else exit 1;fi +cmd: grep "xcatdefaults:" /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_format/export_all_node > /dev/null 2>&1; if [[ $? -eq 0 ]]; then exit 0; else exit 1;fi check:rc==0 cmd: grep " service:" /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_format/export_all_node > /dev/null 2>&1; if [[ $? -eq 0 ]]; then exit 0; else exit 1;fi check:rc==0 @@ -888,9 +888,9 @@ cmd:lsdef -t group -i grouptype -c|grep "grouptype=static" |tee /tmp/xcat_inven check:rc==0 cmd:xcat-inventory export --format=json -t node |tee /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/export_all_node check:rc==0 -cmd: grep " \"xcatdefaults\": " /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/export_all_node > /dev/null 2>&1; if [[ $? -eq 0 ]]; then exit 0; else exit 1;fi +cmd: grep "xcatdefaults:" /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/export_all_node > /dev/null 2>&1; if [[ $? -eq 0 ]]; then exit 0; else exit 1;fi check:rc==0 -cmd: grep " \"service\": " /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/export_all_node > /dev/null 2>&1; if [[ $? -eq 0 ]]; then exit 0; else exit 1;fi +cmd: grep "service:" /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/export_all_node > /dev/null 2>&1; if [[ $? -eq 0 ]]; then exit 0; else exit 1;fi check:rc==0 cmd:dn=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/node_in_xcat_db|wc -l);dg=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/group_in_xcat_db |wc -l);((da=$dn+$dg+2));ia=$(grep " \"obj_type\": " /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/export_all_node|wc -l); if [[ $da -eq $ia ]];then exit 0; else exit 1;fi check:rc==0 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage.import_from_osimage_dir b/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage.import_from_osimage_dir index 07969ab3e..2e9e0ca5c 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage.import_from_osimage_dir +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage.import_from_osimage_dir @@ -19,7 +19,7 @@ check:rc==0 #check whether the osimage definition is created cmd: lsdef -t osimage -o test_myimage -z |tee /tmp/export_import_an_osimage_directory/test_myimage.stanza check:rc==0 -cmd: diff /tmp/export_import_an_osimage_directory/test_myimage.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/test_myimage.stanza +cmd: diff /tmp/export_import_an_osimage_directory/test_myimage.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/test_myimage.stanza -I "environvar" check: rc==0 #check whether the customized osimage files are imported cmd: diff -r /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/ /tmp/test_myimage/ @@ -64,9 +64,9 @@ cmd: lsdef -t osimage -o test_myimage -z | tee /tmp/export_import_multiple_osima check:rc==0 cmd: lsdef -t osimage -o test_myimage2 -z | tee /tmp/export_import_multiple_osimages_from_osimage_directory/test_myimage2.stanza check:rc==0 -cmd: diff /tmp/export_import_multiple_osimages_from_osimage_directory/test_myimage.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/test_myimage.stanza +cmd: diff /tmp/export_import_multiple_osimages_from_osimage_directory/test_myimage.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/test_myimage.stanza -I "environvar" check: rc==0 -cmd: diff /tmp/export_import_multiple_osimages_from_osimage_directory/test_myimage2.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/test_myimage2.stanza +cmd: diff /tmp/export_import_multiple_osimages_from_osimage_directory/test_myimage2.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/test_myimage2.stanza -I "environvar" check: rc==0 #check whether the customized osimage files are imported cmd: diff -r /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/ /tmp/test_myimage/ @@ -112,7 +112,7 @@ check:rc==0 #check whether the osimage definition is created cmd: lsdef -t osimage -o test_myimage -z |tee /tmp/export_import_specified_from_osimage_directory/test_myimage.stanza check:rc==0 -cmd: diff /tmp/export_import_specified_from_osimage_directory/test_myimage.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/test_myimage.stanza +cmd: diff /tmp/export_import_specified_from_osimage_directory/test_myimage.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/test_myimage.stanza -I "environvar" check: rc==0 #check whether the customized osimage files are imported cmd: diff -r /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/ /tmp/test_myimage/ diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.site b/xCAT-test/autotest/testcase/xcat-inventory/cases.site index fb59a5238..2fe499b1b 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.site +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.site @@ -102,100 +102,98 @@ check:rc==0 cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');chdef -t site -o clustersite useSSHonAIX=0 useNFSv4onAIX=0 FQDNfirst=1 SNsyncfiledir='/var/xcat/syncfiles' auditnosyslog=0 auditskipcmds=ALL blademaxp=64 cleanupxcatpost=no consoleondemand=no databaseloc='/var/lib' db2installloc='/mntdb2' dbtracelevel=0 defserialflow=0 defserialport=0 defserialspeed=9600 dhcpinterfaces=eth0 dhcplease=43200 dhcpsetup=n disjointdhcps=1 dnshandler=ddns dnsinterfaces='xcatmn|eth1,eth2;service|bond0' dnsupdaters=dnsupdaters domain='pok.stglabs.ibm.com' enableASMI=no excludenodes=excludenodes externaldns=externaldns extntpservers=extntpservers forwarders=$mnip fsptimeout=0 genmacprefix='00:11:aa' genpasswords=genpasswords hierarchicalattrs=hierarchicalattrs httpport=80 hwctrldispatch=y installdir='/install/' installloc='hostname:/path' ipmidispatch=y ipmimaxp=64 ipmiretries=3 ipmisdrcache=no ipmitimeout=2 iscsidir='/iscsidir' managedaddressmode=dhcp master=$mnip maxssh=8 mnroutenames=mnroutenames nameservers=$mnip nmapoptions='--min-rtt-timeout' nodestatus=n nodesyncfiledir='/var/xcat/node/syncfiles' ntpservers=$mnip persistkvmguests=y powerinterval=0 ppcmaxp=64 ppcretry=3 ppctimeout=0 precreatemypostscripts=1 pruneservices=1 runbootscripts=yes setinstallnic=1 sharedinstall=no sharedtftp=1 skiptables=nics skipvalidatelog=1 snmpc=snmpc sshbetweennodes=ALLGROUPS svloglocal=1 syspowerinterval=10 syspowermaxnodes=10 tftpdir='/tftprot/' tftpflags='-v' timezone='America/New_York' useNmapfromMN=no useflowcontrol=no usexhrm=no vcenterautojoin=no vmwarereconfigonpower=no vsftp=n xcatconfdir='/etc/xcat' xcatdebugmode=1 xcatdport=3001 xcatiport=3002 xcatlport=3003 xcatmaxbatchconnections=64 xcatmaxconnections=60 xcatsslciphers='3DES' xcatsslversion=TLSv1 check:rc==0 cmd:#!/bin/bash -echo '{ - "schema_version": "1.0", - "site": { - "clustersite": { - "FQDNfirst": "1", - "SNsyncfiledir": "/var/xcat/syncfiles", - "auditnosyslog": "0", - "auditskipcmds": "ALL", - "blademaxp": "64", - "cleanupxcatpost": "no", - "consoleondemand": "no", - "databaseloc": "/var/lib", - "db2installloc": "/mntdb2", - "dbtracelevel": "0", - "defserialflow": "0", - "defserialport": "0", - "defserialspeed": "9600", - "dhcpinterfaces": "eth0", - "dhcplease": "43200", - "dhcpsetup": "n", - "disjointdhcps": "1", - "dnshandler": "ddns", - "dnsinterfaces": "xcatmn|eth1,eth2;service|bond0", - "dnsupdaters": "dnsupdaters", - "domain": "pok.stglabs.ibm.com", - "enableASMI": "no", - "excludenodes": "excludenodes", - "externaldns": "externaldns", - "extntpservers": "extntpservers", - "forwarders": "10.3.5.8", - "fsptimeout": "0", - "genmacprefix": "00:11:aa", - "genpasswords": "genpasswords", - "hierarchicalattrs": "hierarchicalattrs", - "httpport": "80", - "hwctrldispatch": "y", - "installdir": "/install/", - "installloc": "hostname:/path", - "ipmidispatch": "y", - "ipmimaxp": "64", - "ipmiretries": "3", - "ipmisdrcache": "no", - "ipmitimeout": "2", - "iscsidir": "/iscsidir", - "managedaddressmode": "dhcp", - "master": "10.3.5.8", - "maxssh": "8", - "mnroutenames": "mnroutenames", - "nameservers": "10.3.5.8", - "nmapoptions": "--min-rtt-timeout", - "nodestatus": "n", - "nodesyncfiledir": "/var/xcat/node/syncfiles", - "ntpservers": "10.3.5.8", - "persistkvmguests": "y", - "powerinterval": "0", - "ppcmaxp": "64", - "ppcretry": "3", - "ppctimeout": "0", - "precreatemypostscripts": "1", - "pruneservices": "1", - "runbootscripts": "yes", - "setinstallnic": "1", - "sharedinstall": "no", - "sharedtftp": "1", - "skiptables": "nics", - "skipvalidatelog": "1", - "snmpc": "snmpc", - "sshbetweennodes": "ALLGROUPS", - "svloglocal": "1", - "syspowerinterval": "10", - "syspowermaxnodes": "10", - "tftpdir": "/tftprot/", - "tftpflags": "-v", - "timezone": "America/New_York", - "useNFSv4onAIX": "0", - "useNmapfromMN": "no", - "useSSHonAIX": "0", - "useflowcontrol": "no", - "usexhrm": "no", - "vcenterautojoin": "no", - "vmwarereconfigonpower": "no", - "vsftp": "n", - "xcatconfdir": "/etc/xcat", - "xcatdebugmode": "1", - "xcatdport": "3001", - "xcatiport": "3002", - "xcatlport": "3003", - "xcatmaxbatchconnections": "64", - "xcatmaxconnections": "60", - "xcatsslciphers": "3DES", - "xcatsslversion": "TLSv1" - } - } -}' > /tmp/xcat_inventory_try_to_export_all_type_is_site_default_format/site.org +echo " + schema_version: '2.0' + site: + clustersite: + FQDNfirst: '1' + SNsyncfiledir: /var/xcat/syncfiles + auditnosyslog: '0' + auditskipcmds: ALL + blademaxp: '64' + cleanupxcatpost: 'no' + consoleondemand: 'no' + databaseloc: /var/lib + db2installloc: /mntdb2 + dbtracelevel: '0' + defserialflow: '0' + defserialport: '0' + defserialspeed: '9600' + dhcpinterfaces: eth0 + dhcplease: '43200' + dhcpsetup: n + disjointdhcps: '1' + dnshandler: ddns + dnsinterfaces: xcatmn|eth1,eth2;service|bond0 + dnsupdaters: dnsupdaters + domain: pok.stglabs.ibm.com + enableASMI: 'no' + excludenodes: excludenodes + externaldns: externaldns + extntpservers: extntpservers + forwarders: 10.3.1.13 + fsptimeout: '0' + genmacprefix: 00:11:aa + genpasswords: genpasswords + hierarchicalattrs: hierarchicalattrs + httpport: '80' + hwctrldispatch: y + installdir: /install/ + installloc: hostname:/path + ipmidispatch: y + ipmimaxp: '64' + ipmiretries: '3' + ipmisdrcache: 'no' + ipmitimeout: '2' + iscsidir: /iscsidir + managedaddressmode: dhcp + master: 10.3.1.13 + maxssh: '8' + mnroutenames: mnroutenames + nameservers: 10.3.1.13 + nmapoptions: --min-rtt-timeout + nodestatus: n + nodesyncfiledir: /var/xcat/node/syncfiles + ntpservers: 10.3.1.13 + persistkvmguests: y + powerinterval: '0' + ppcmaxp: '64' + ppcretry: '3' + ppctimeout: '0' + precreatemypostscripts: '1' + pruneservices: '1' + runbootscripts: 'yes' + setinstallnic: '1' + sharedinstall: 'no' + sharedtftp: '1' + skiptables: nics + skipvalidatelog: '1' + snmpc: snmpc + sshbetweennodes: ALLGROUPS + svloglocal: '1' + syspowerinterval: '10' + syspowermaxnodes: '10' + tftpdir: /tftprot/ + tftpflags: -v + timezone: America/New_York + useNFSv4onAIX: '0' + useNmapfromMN: 'no' + useSSHonAIX: '0' + useflowcontrol: 'no' + usexhrm: 'no' + vcenterautojoin: 'no' + vmwarereconfigonpower: 'no' + vsftp: n + xcatconfdir: /etc/xcat + xcatdebugmode: '1' + xcatdport: '3001' + xcatiport: '3002' + xcatlport: '3003' + xcatmaxbatchconnections: '64' + xcatmaxconnections: '60' + xcatsslciphers: 3DES + xcatsslversion: TLSv1 + " > /tmp/xcat_inventory_try_to_export_all_type_is_site_default_format/site.org cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');sed -i "s/10.3.5.8/$mnip/g" /tmp/xcat_inventory_try_to_export_all_type_is_site_default_format/site.org check:rc==0 cmd:xcat-inventory export -t site |tee /tmp/xcat_inventory_try_to_export_all_type_is_site_default_format/site.export @@ -318,7 +316,7 @@ check:rc==0 cmd:xcat-inventory export --format=json -t site |tee /tmp/xcat_inventory_try_to_export_all_type_is_site_json_format/site.export check:rc==0 cmd:#!/bin/bash -diff -y --ignore-blank-lines --ignore-matching-lines="^#" /tmp/xcat_inventory_try_to_export_all_type_is_site_json_format/site.org /tmp/xcat_inventory_try_to_export_all_type_is_site_json_format/site.export +diff -y --ignore-blank-lines --ignore-matching-lines="^#" --ignore-matching-lines="schema_version" /tmp/xcat_inventory_try_to_export_all_type_is_site_json_format/site.org /tmp/xcat_inventory_try_to_export_all_type_is_site_json_format/site.export check:rc==0 cmd:cat /tmp/xcat_inventory_try_to_export_all_type_is_site_json_format/site.stanza | mkdef -z -f check:rc==0 @@ -431,7 +429,7 @@ check:rc==0 cmd:xcat-inventory export --format=yaml -t site|sed -e '/^\s*$/d' |tee /tmp/xcat_inventory_try_to_export_all_type_is_site_yaml_format/site.export check:rc==0 cmd:#!/bin/bash -diff -y --ignore-blank-lines --ignore-matching-lines="^#" /tmp/xcat_inventory_try_to_export_all_type_is_site_yaml_format/site.org /tmp/xcat_inventory_try_to_export_all_type_is_site_yaml_format/site.export +diff -y --ignore-blank-lines --ignore-matching-lines="^#" --ignore-matching-lines="schema_version" /tmp/xcat_inventory_try_to_export_all_type_is_site_yaml_format/site.org /tmp/xcat_inventory_try_to_export_all_type_is_site_yaml_format/site.export check:rc==0 cmd:cat /tmp/xcat_inventory_try_to_export_all_type_is_site_yaml_format/site.stanza | mkdef -z -f check:rc==0 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json index 2dad18b47..92b5fa341 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json @@ -4,7 +4,7 @@ "basic_attributes": { "arch": "OSARCH", "distribution": "OSVERS", - "osdistro": "OSARCH-OSVERS", + "osdistro": "OSVERS-OSARCH", "osname": "Linux" }, "deprecated": { From 14c3fe419dc8fea8d76b34f28c8ee82e1a8d8604 Mon Sep 17 00:00:00 2001 From: litingt Date: Thu, 22 Nov 2018 21:41:22 -0500 Subject: [PATCH 104/121] update to add wget uefi file --- xCAT-test/autotest/testcase/httpport/cases0 | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/xCAT-test/autotest/testcase/httpport/cases0 b/xCAT-test/autotest/testcase/httpport/cases0 index dcca66bfb..b1be40454 100644 --- a/xCAT-test/autotest/testcase/httpport/cases0 +++ b/xCAT-test/autotest/testcase/httpport/cases0 @@ -40,6 +40,7 @@ do fi done done +rm -rf genesis* check:rc==0 cmd:dir="/tftpboot/xcat/xnba/nets";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi cmd:mknb x86_64 @@ -47,10 +48,9 @@ check:rc==0 cmd:#!/bin/bash # get all filename in specified path path=/tftpboot/xcat/xnba/nets/ -rm -rf $path*.uefi rm -rf $path*.elilo files=$(ls $path) -mnip=$(tabdump site |grep -w master |awk -F "," '{print $2}'|sed 's/\"//g') +mnip=$(lsdef -t site -i master -c |awk -F"=" '{print $2}') echo "The mn ip is $mnip" for filename in $files do @@ -64,7 +64,13 @@ do if [ $? == 0 ];then sed -i "s/\${next-server}/$mnip/g" $path$filename fi - links=$(grep 8898 $path$filename|awk -F " " '{print $4}') + + if [ "${filename##*.}"x = "uefi"x ];then + links=$(grep 8898 $path$filename|awk -F " " '{print $2}') + else + links=$(grep 8898 $path$filename|awk -F " " '{print $4}') + fi + for link in $links do wget $link @@ -76,6 +82,8 @@ do fi done done +rm -rf genesis* +rm -rf uefi* check:rc==0 cmd:/opt/xcat/share/xcat/tools/autotest/testcase/httpport/change_http_port.sh 8898 80 cmd:netstat -nlp|grep -E "apache2|httpd" From 193e216ca93342de6f51107d66e54ed74c6a48f5 Mon Sep 17 00:00:00 2001 From: litingt Date: Thu, 22 Nov 2018 21:52:07 -0500 Subject: [PATCH 105/121] update to fix a typo --- xCAT-test/autotest/testcase/httpport/cases0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-test/autotest/testcase/httpport/cases0 b/xCAT-test/autotest/testcase/httpport/cases0 index b1be40454..8671d0a67 100644 --- a/xCAT-test/autotest/testcase/httpport/cases0 +++ b/xCAT-test/autotest/testcase/httpport/cases0 @@ -83,7 +83,7 @@ do done done rm -rf genesis* -rm -rf uefi* +rm -rf elilo* check:rc==0 cmd:/opt/xcat/share/xcat/tools/autotest/testcase/httpport/change_http_port.sh 8898 80 cmd:netstat -nlp|grep -E "apache2|httpd" From f186b36c3bbaedcea311c95e0b9e102aefd5bb77 Mon Sep 17 00:00:00 2001 From: litingt Date: Fri, 23 Nov 2018 01:45:50 -0500 Subject: [PATCH 106/121] update labels for the case --- xCAT-test/autotest/testcase/httpport/cases0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-test/autotest/testcase/httpport/cases0 b/xCAT-test/autotest/testcase/httpport/cases0 index 8671d0a67..a756fbf35 100644 --- a/xCAT-test/autotest/testcase/httpport/cases0 +++ b/xCAT-test/autotest/testcase/httpport/cases0 @@ -1,6 +1,6 @@ start:http_port_change description:Add test cases for bug fix 2629, change http port and then generate genesis (mknb). -label:others +label:mn_only,discovery cmd:netstat -nlp|grep -E "apache2|httpd" check:output =~ 80 cmd:lsdef -t site -i httpport -c |awk -F"=" '{print $2}' From 3168ed462bba291af0eca5b9155063fec25ed09f Mon Sep 17 00:00:00 2001 From: bxuxa Date: Mon, 26 Nov 2018 15:50:58 +0800 Subject: [PATCH 107/121] container simulater is not setup correctly --- .../testcase/performance/simulatorctl.sh | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/xCAT-test/autotest/testcase/performance/simulatorctl.sh b/xCAT-test/autotest/testcase/performance/simulatorctl.sh index e2682864c..efbbe5366 100644 --- a/xCAT-test/autotest/testcase/performance/simulatorctl.sh +++ b/xCAT-test/autotest/testcase/performance/simulatorctl.sh @@ -59,11 +59,31 @@ setup_docker() #workaround as the public repo has issue to install container-selinux yum install -y http://ftp.unicamp.br/pub/ppc64el/rhel/7/docker-ppc64el/container-selinux-2.9-4.el7.noarch.rpm yum install -y docker-ce bridge-utils initscripts - service docker start - sleep 5 else echo "Error: not supported platform." + return + fi + + systemctl start docker + sleep 5 + + local x=1 + while [ $x -le 5 ] + do + echo "Waiting for docker daemon up: $x times" + systemctl is-active docker >/dev/null 2>&1 + if [[ $? -eq 0 ]]; then + x=0 + break + fi + sleep 5 + x=$(( $x + 1 )) + done + + if [[ $x -gt 0 ]]; then + echo "Error: The docker daemon is not up." + return fi # Create the bridge network for testing, and add the physical interface inside From 8ac336fe7eeaf82333a6309faea43a57b97c833c Mon Sep 17 00:00:00 2001 From: cxhong Date: Tue, 27 Nov 2018 01:58:11 -0500 Subject: [PATCH 108/121] EXECUTEALWAYS will only execute syncfile in the syncfile list (#5834) --- perl-xCAT/xCAT/DSHCLI.pm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/DSHCLI.pm b/perl-xCAT/xCAT/DSHCLI.pm index ecafd5446..c69bcd564 100644 --- a/perl-xCAT/xCAT/DSHCLI.pm +++ b/perl-xCAT/xCAT/DSHCLI.pm @@ -6313,7 +6313,18 @@ sub run_always_rsync_postscripts # build xdsh queue # build host and all scripts to execute - push(@{ $dshparms->{'postscripts'}{$postsfile} }, $host); + # EXECUTEALWAYS will only execute the syncfile in the syncfile list + foreach my $key (keys $$options{'destDir_srcFile'}{$host}) { + foreach my $key1 (keys %{ $$options{'destDir_srcFile'}{$host}{$key} }) { + my $index = 0; + while (my $src_file = $$options{'destDir_srcFile'}{$host}{$key}{$key1}->[$index]) { + if ($src_file eq $tmppostfile) { + push(@{ $dshparms->{'postscripts'}{$postsfile} }, $host); + } + $index++; + } + } + } } } From cc6cb0f217befb1f27f502febf731cd9c9499a14 Mon Sep 17 00:00:00 2001 From: bxuxa Date: Tue, 27 Nov 2018 14:06:12 +0800 Subject: [PATCH 109/121] Clear key words for install status update log message (#5618) - detect provisioning when updateing status to installing/netbooting - consistent message format "xcat.updatestatus - ($node): changing status=($status)" (no need to log the time as syslog has the timestamp) --- xCAT-server/lib/xcat/monitoring/monitorctrl.pm | 12 ++++++++---- xCAT-server/sbin/xcatd | 7 ++++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/xcat/monitoring/monitorctrl.pm b/xCAT-server/lib/xcat/monitoring/monitorctrl.pm index afd38801a..87aa3378d 100644 --- a/xCAT-server/lib/xcat/monitoring/monitorctrl.pm +++ b/xCAT-server/lib/xcat/monitoring/monitorctrl.pm @@ -627,7 +627,7 @@ sub getNodeStatusFromNodesetState { Arguments: status -- a hash pointer of the node status. A key is a status string. The value is an array pointer of nodes that have the same status. - for example: {alive=>["node1", "node1"], unreachable=>["node5","node100"]} + for example: {alive=>["node1", "node2"], unreachable=>["node5","node100"]} force -- 1 force the input values to be set. -- 0 make sure if the input value is the next valid value. Returns: @@ -637,7 +637,7 @@ sub getNodeStatusFromNodesetState { #-------------------------------------------------------------------------------- sub setNodeStatusAttributes { - print "monitorctrl::setNodeStatusAttributes called\n"; + #print "monitorctrl::setNodeStatusAttributes called\n"; my $temp = shift; if ($temp =~ /xCAT_monitoring::monitorctrl/) { $temp = shift; @@ -703,8 +703,12 @@ sub setNodeStatusAttributes { if (@$nodes > 0) { $updates{'status'} = $_; $updates{'statustime'} = $currtime; - my $nodestate = "@$nodes status: $updates{'status'} statustime: $updates{'statustime'}"; - xCAT::MsgUtils->message('S', "$nodestate"); + #my $nodestate = "@$nodes status: $updates{'status'} statustime: $updates{'statustime'}"; + foreach my $node (@$nodes) { + # To make the log clear, iterate for each node. This might be potential performance issue! + my $nodestate = "xcat.updatestatus - $node: changing status=$updates{'status'}"; + xCAT::MsgUtils->message('S', "$nodestate"); + } my $where_clause; my $dbname = xCAT::Utils->get_DBName(); diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index 0f55e83c6..71aa7bc75 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -509,7 +509,12 @@ sub do_installm_service { node => [$node], arg => ["$newstat"], ); - xCAT::MsgUtils->trace(0, "I", "xcatd: triggering \'updatenodestat $node $newstat\'..."); + # TODO, better to use constant here for the specified status + if ($newstat eq 'installing') { + xCAT::MsgUtils->trace(0, "I", "xcat.updatestatus - $node: provisioning detected..."); + } elsif ($newstat eq 'netbooting') { + xCAT::MsgUtils->trace(0, "I", "xcat.updatestatus - $node: provisioning detected..."); + } # node should be blocked, race condition may occur otherwise #my $pid=xCAT::Utils->xfork(); #unless ($pid) { # fork off the nodeset and potential slowness From a47c14523b4f854dfa8c6d630f722d83066e9885 Mon Sep 17 00:00:00 2001 From: Weihua Hu Date: Tue, 27 Nov 2018 15:22:49 +0800 Subject: [PATCH 110/121] change the filter test case method back to using label (#5837) --- travis.pl | 48 +++++++++++++----------------------------------- 1 file changed, 13 insertions(+), 35 deletions(-) diff --git a/travis.pl b/travis.pl index 4891d4017..11119f160 100644 --- a/travis.pl +++ b/travis.pl @@ -488,42 +488,20 @@ sub run_fast_regression_test{ @output = runcmd("cat $conf_file"); print Dumper \@output; -# $cmd = "sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -s \"mn_only-wait_fix\" -l'"; -# my @caseslist = runcmd("$cmd"); -# if($::RUNCMD_RC){ -# print RED "[run_fast_regression_test] $cmd ....[Failed]\n"; -# print "[run_fast_regression_test] error dumper:\n"; -# print Dumper \@caseslist; -# return 1; -# }else{ -# print "[run_fast_regression_test] $cmd .....:\n"; -# print Dumper \@caseslist; -# } -# -# #This is a black list for CI test -# #It is useful for debug or development -# #please ignore during common work -## { -## sub array_filter { -## my $src_array_ref = shift; -## my $filter_array_ref = shift; -## -## my @left_array; -## foreach my $item (@{$src_array_ref}) { -## my $hit = 0; -## foreach my $f (@{$filter_array_ref}) { -## $hit = 1 if ($f eq $item); -## } -## push @left_array, $item unless ($hit); -## } -## @$src_array_ref = @left_array; -## } -## -## #my @filter_cases=("testtest"); -## #array_filter(\@caseslist, \@filter_cases); -## } + $cmd = "sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -s \"ci_test\" -l'"; + my @caseslist = runcmd("$cmd"); + if($::RUNCMD_RC){ + print RED "[run_fast_regression_test] $cmd ....[Failed]\n"; + print "[run_fast_regression_test] error dumper:\n"; + print Dumper \@caseslist; + return 1; + }else{ + print "[run_fast_regression_test] $cmd .....:\n"; + print Dumper \@caseslist; + } - my @caseslist = runcmd("sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -l caselist -b MN_basic.bundle'"); + + #my @caseslist = runcmd("sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -l caselist -b MN_basic.bundle'"); my $casenum = @caseslist; my $x = 0; my @failcase; From ee654cffbe8d60588926c22d7e26299320ddf7d0 Mon Sep 17 00:00:00 2001 From: bxuxa Date: Tue, 27 Nov 2018 16:57:48 +0800 Subject: [PATCH 111/121] xcatprobe osdeploy need to be modified accordingly --- xCAT-probe/subcmds/osdeploy | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/xCAT-probe/subcmds/osdeploy b/xCAT-probe/subcmds/osdeploy index 144f31cea..afe461baa 100755 --- a/xCAT-probe/subcmds/osdeploy +++ b/xCAT-probe/subcmds/osdeploy @@ -1169,10 +1169,11 @@ sub handle_cluster_msg { my $log_msg = $log_ref->{msg}; my @split_log = split(/\s+/, $log_msg); - if ($split_log[1] eq "Allowing") { - my $command = $split_log[2]; - my $nodes_str = $split_log[4]; - my $sub_command = $split_log[5]; + # As xcat log message will in both messages.log and cluster.log, need to filter one to avoid the duplication + if ($split_log[1] eq "xCAT:" && $split_log[2] eq "Allowing") { + my $command = $split_log[3]; + my $nodes_str = $split_log[5]; + my $sub_command = $split_log[6]; if ($command eq "rinstall" or $command eq "rnetboot" or ($command eq "rpower" and $sub_command =~ /on|boot|reset/) or ($command eq "xdsh" and $log_msg =~ /reboot|shutdown -r/)) { my @nodes = probe_utils->parse_node_range($nodes_str); @@ -1188,7 +1189,7 @@ sub handle_cluster_msg { } } } - } elsif ($log_ref->{msg} =~ /(.+)\s+status:\s+(.+)\s+statustime:/) { + } elsif ($log_ref->{msg} =~ /INFO xcat.updatestatus - (.+):\s+changing status=(.+)/) { my $nodes = $1; my $status = $2; my $record = "Node status is changed to $status"; From 3b5fd8582ede266407e9bcb83b8fff0faf5d652e Mon Sep 17 00:00:00 2001 From: Yuan Bai Date: Tue, 27 Nov 2018 17:05:36 +0800 Subject: [PATCH 112/121] add syslog for pre script (#5838) * add syslog for pre script --- xCAT-server/share/xcat/install/scripts/post.xcat | 1 - xCAT-server/share/xcat/install/scripts/pre.rh | 12 ++++++++---- xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 | 11 ++++++++--- xCAT-server/share/xcat/install/scripts/pre.rhels8 | 12 ++++++++---- xCAT-server/share/xcat/install/scripts/pre.sle15 | 11 ++++++++--- xCAT-server/share/xcat/install/scripts/pre.sles | 11 ++++++++--- xCAT-server/share/xcat/install/scripts/pre.ubuntu | 12 ++++++------ .../share/xcat/install/scripts/pre.ubuntu.ppc64 | 11 +++++------ 8 files changed, 51 insertions(+), 30 deletions(-) diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index 6cf90fb96..32298bb92 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -43,7 +43,6 @@ chmod 0755 /tmp/updateflag cd /tmp log_label="xcat.deployment" -msgutil_r "$MASTER_IP" "info" "=============deployment starting====================" "/var/log/xcat/xcat.log" "$log_label" msgutil_r "$MASTER_IP" "info" "Executing post.xcat to prepare for firstbooting ..." "/var/log/xcat/xcat.log" "$log_label" RAND=$(perl -e 'print int(rand(50)). "\n"') diff --git a/xCAT-server/share/xcat/install/scripts/pre.rh b/xCAT-server/share/xcat/install/scripts/pre.rh index eedaab849..fd84bb2b8 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.rh +++ b/xCAT-server/share/xcat/install/scripts/pre.rh @@ -2,7 +2,11 @@ export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#" if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then set -x fi - +export MASTER_IP="#ENV:MASTER_IP#" +#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib# +log_label="xcat.deployment" +msgutil_r "$MASTER_IP" "info" "============deployment starting============" "/var/log/xcat/xcat.log" "$log_label" +msgutil_r "$MASTER_IP" "info" "Running Anaconda Pre-Installation script..." "/var/log/xcat/xcat.log" "$log_label" if grep n8r /proc/cmdline > /dev/null 2>&1; then stty crtscts @@ -183,7 +187,7 @@ fi #also, find first available block device (sda or vda likely) #TODO: pick a likely non-SAN target if possible shopt -s nullglob - +msgutil_r "$MASTER_IP" "info" "Detecting install disk..." "/var/log/xcat/xcat.log" "$log_label" # # The getinstdisk script is common for RHEL/SLES/PowerKVM/Ubuntu. # It will attempt to select the install disk and write the selection to /tmp/xcat.install_disk @@ -204,7 +208,7 @@ else fi BOOTFSTYPE=ext3 EFIFSTYPE=vfat - +msgutil_r "$MASTER_IP" "info" "Found $instdisk, generate partition file..." "/var/log/xcat/xcat.log" "$log_label" if [ `uname -m` = "ppc64" ]; then echo 'part None --fstype "PPC PReP Boot" --ondisk '$instdisk' --size 8' >> /tmp/partitionfile fi @@ -227,7 +231,7 @@ echo "part / --size 1 --grow --ondisk $instdisk --fstype $FSTYPE" >> /tmp/partit echo "=================The Partition Scheme================" cat /tmp/partitionfile echo "=====================================================" - +msgutil_r "$MASTER_IP" "info" "Generate the repository for the installation" "/var/log/xcat/xcat.log" "$log_label" # The following code is to generate the repository for the installation cat /proc/cmdline diff --git a/xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 b/xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 index 7bea14300..44f1c87c6 100755 --- a/xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 +++ b/xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 @@ -2,7 +2,11 @@ export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#" if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then set -x fi - +export MASTER_IP="#ENV:MASTER_IP#" +#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib# +log_label="xcat.deployment" +msgutil_r "$MASTER_IP" "info" "============deployment starting============" "/var/log/xcat/xcat.log" "$log_label" +msgutil_r "$MASTER_IP" "info" "Running Anaconda Pre-Installation script..." "/var/log/xcat/xcat.log" "$log_label" if grep n8r /proc/cmdline > /dev/null 2>&1; then stty crtscts @@ -38,7 +42,6 @@ sock.close() EOF - cat >/tmp/foo.py <> /tmp/partitionfile if [ `uname -m` = "ppc64" -o `uname -m` = "ppc64le" ]; then echo 'part None --fstype "PPC PReP Boot" --ondisk '$instdisk' --size 8' >> /tmp/partitionfile @@ -218,6 +222,7 @@ cat /tmp/partitionfile echo "=====================================================" # The following code is to generate the repository for the installation +msgutil_r "$MASTER_IP" "info" "Generate the repository for the installation" "/var/log/xcat/xcat.log" "$log_label" cat /proc/cmdline NEXTSERVER=`cat /proc/cmdline | grep http | head -n 1` diff --git a/xCAT-server/share/xcat/install/scripts/pre.rhels8 b/xCAT-server/share/xcat/install/scripts/pre.rhels8 index eb50301b4..92ad09f34 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.rhels8 +++ b/xCAT-server/share/xcat/install/scripts/pre.rhels8 @@ -5,7 +5,11 @@ case "$XCATDEBUGMODE" in set -x ;; esac - +export MASTER_IP="#ENV:MASTER_IP#" +#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib# +log_label="xcat.deployment" +msgutil_r "$MASTER_IP" "info" "============deployment starting============" "/var/log/xcat/xcat.log" "$log_label" +msgutil_r "$MASTER_IP" "info" "Running Anaconda Pre-Installation script..." "/var/log/xcat/xcat.log" "$log_label" if grep -q n8r /proc/cmdline >/dev/null 2>&1 then stty crtscts @@ -148,7 +152,7 @@ esac # also, find first available block device (sda or vda likely) # TODO: pick a likely non-SAN target if possible shopt -s nullglob - +msgutil_r "$MASTER_IP" "info" "Detecting install disk..." "/var/log/xcat/xcat.log" "$log_label" # # The getinstdisk script is common for RHEL/SLES/PowerKVM/Ubuntu. # It will attempt to select the install disk and write the selection to /tmp/xcat.install_disk @@ -162,7 +166,7 @@ fi BOOTFSTYPE=ext4 FSTYPE=ext4 EFIFSTYPE=efi - +msgutil_r "$MASTER_IP" "info" "Found $instdisk, generate partition file..." "/var/log/xcat/xcat.log" "$log_label" echo "ignoredisk --only-use=$instdisk" >>/tmp/partitionfile case "$(uname -m)" in "ppc64"|"ppc64le") @@ -210,7 +214,7 @@ fi echo "================ The Partition Scheme ===============" cat /tmp/partitionfile echo "=====================================================" - +msgutil_r "$MASTER_IP" "info" "Generate the repository for the installation" "/var/log/xcat/xcat.log" "$log_label" # The following code is to generate the repository for the installation cat /proc/cmdline diff --git a/xCAT-server/share/xcat/install/scripts/pre.sle15 b/xCAT-server/share/xcat/install/scripts/pre.sle15 index 127742a60..733fbe66b 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.sle15 +++ b/xCAT-server/share/xcat/install/scripts/pre.sle15 @@ -9,6 +9,11 @@ #!/bin/sh { +export MASTER_IP="#ENV:MASTER_IP#" +#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib# +log_label="xcat.deployment" +msgutil_r "$MASTER_IP" "info" "============deployment starting============" "/var/log/xcat/xcat.log" "$log_label" +msgutil_r "$MASTER_IP" "info" "Running AutoYaST Pre-Installation script..." "/var/log/xcat/xcat.log" "$log_label" echo "Running AutoYaST Pre-Installation script..." export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#" @@ -119,7 +124,7 @@ fi /tmp/foo.awk >/tmp/foo.log 2>&1 & shopt -s nullglob - +msgutil_r "$MASTER_IP" "info" "Detecting install disk..." "/var/log/xcat/xcat.log" "$log_label" # # The getinstdisk script is common for RHEL/SLES/PowerKVM/Ubuntu. # It will attempt to select the install disk and write the selection to /tmp/xcat.install_disk @@ -129,7 +134,7 @@ if [ -e "/tmp/xcat.install_disk" ]; then instdisk=`cat /tmp/xcat.install_disk` fi - +msgutil_r "$MASTER_IP" "info" "Found $instdisk, generate partition file..." "/var/log/xcat/xcat.log" "$log_label" if [ -d /sys/firmware/efi ]; then sed -e 's!XCATPARTITIONHOOK!'$instdisk'vfat/boot/efi128mbswapauto/auto!' /tmp/profile/autoinst.xml > /tmp/profile/modified.xml else @@ -147,7 +152,7 @@ if [ -r "/tmp/partitionfile" ]; then sed -e '//{N;N;s!.*!'$con'!}' /tmp/profile/autoinst.xml > /tmp/profile/modified1.xml sed -e 's!xcattempspace! !g' /tmp/profile/modified1.xml > /tmp/profile/modified.xml fi - +msgutil_r "$MASTER_IP" "info" "Generate the repository for the installation" "/var/log/xcat/xcat.log" "$log_label" export nextserver=`cat /proc/cmdline | grep http | awk -F'autoyast=http://' {'print \$2'} | awk -F':' {'print \$1'}` cp /tmp/profile/modified.xml /tmp/profile/modified1.xml sed -e 's!XCATNEXTSERVERHOOK!'$nextserver'!' /tmp/profile/modified1.xml > /tmp/profile/modified.xml diff --git a/xCAT-server/share/xcat/install/scripts/pre.sles b/xCAT-server/share/xcat/install/scripts/pre.sles index 94c414560..5ddc37786 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.sles +++ b/xCAT-server/share/xcat/install/scripts/pre.sles @@ -9,6 +9,11 @@ #!/bin/sh { +export MASTER_IP="#ENV:MASTER_IP#" +#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib# +log_label="xcat.deployment" +msgutil_r "$MASTER_IP" "info" "============deployment starting============" "/var/log/xcat/xcat.log" "$log_label" +msgutil_r "$MASTER_IP" "info" "Running AutoYaST Pre-Installation script..." "/var/log/xcat/xcat.log" "$log_label" echo "Running AutoYaST Pre-Installation script..." export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#" @@ -119,7 +124,7 @@ fi /tmp/foo.awk >/tmp/foo.log 2>&1 & shopt -s nullglob - +msgutil_r "$MASTER_IP" "info" "Detecting install disk..." "/var/log/xcat/xcat.log" "$log_label" # # The getinstdisk script is common for RHEL/SLES/PowerKVM/Ubuntu. # It will attempt to select the install disk and write the selection to /tmp/xcat.install_disk @@ -129,7 +134,7 @@ if [ -e "/tmp/xcat.install_disk" ]; then instdisk=`cat /tmp/xcat.install_disk` fi - +msgutil_r "$MASTER_IP" "info" "Found $instdisk, generate partition file..." "/var/log/xcat/xcat.log" "$log_label" if [ -d /sys/firmware/efi ]; then sed -e 's!XCATPARTITIONHOOK!'$instdisk'vfat/boot/efi128mbswapauto/auto!' /tmp/profile/autoinst.xml > /tmp/profile/modified.xml else @@ -147,7 +152,7 @@ if [ -r "/tmp/partitionfile" ]; then sed -e '//{N;N;s!.*!'$con'!}' /tmp/profile/autoinst.xml > /tmp/profile/modified1.xml sed -e 's!xcattempspace! !g' /tmp/profile/modified1.xml > /tmp/profile/modified.xml fi - +msgutil_r "$MASTER_IP" "info" "Generate the repository for the installation" "/var/log/xcat/xcat.log" "$log_label" export nextserver=`cat /proc/cmdline | grep http | awk -F'autoyast=http://' {'print \$2'} | awk -F':' {'print \$1'}` cp /tmp/profile/modified.xml /tmp/profile/modified1.xml sed -e 's!!#INSTALL_SOURCES_IN_PRE#!' /tmp/profile/modified1.xml > /tmp/profile/modified.xml diff --git a/xCAT-server/share/xcat/install/scripts/pre.ubuntu b/xCAT-server/share/xcat/install/scripts/pre.ubuntu index 2a64b2ae8..f528eec91 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.ubuntu +++ b/xCAT-server/share/xcat/install/scripts/pre.ubuntu @@ -5,11 +5,11 @@ fi #!/bin/sh -if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then - killall syslogd - syslogd -R #XCATVAR:XCATMASTER# -fi - +killall syslogd +syslogd -R #XCATVAR:XCATMASTER# +log_label="xcat.deployment" +logger -t $log_label -p "info" "============deployment starting============" +logger -t $log_label -p "info" "Running preseeding early_command Installation script..." if [ ! -c /dev/vcs ]; then mknod /dev/vcs c 7 0 fi @@ -187,7 +187,7 @@ base64decode() ))}\\x\${h$(( o2 / 16 ))}\${h$(( o2 % 16 ))}\"" done } - +logger -t $log_label -p "info" "Generate partition file..." if [ -d /sys/firmware/efi ]; then echo "ubuntu-efi ::" > /tmp/partitionfile echo " 512 512 1024 fat16" >> /tmp/partitionfile diff --git a/xCAT-server/share/xcat/install/scripts/pre.ubuntu.ppc64 b/xCAT-server/share/xcat/install/scripts/pre.ubuntu.ppc64 index b410b181f..84141c10b 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.ubuntu.ppc64 +++ b/xCAT-server/share/xcat/install/scripts/pre.ubuntu.ppc64 @@ -5,11 +5,10 @@ fi #!/bin/sh -if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then - killall syslogd - syslogd -R #XCATVAR:XCATMASTER# -fi - +killall syslogd +syslogd -R #XCATVAR:XCATMASTER# +logger -t $log_label -p "info" "============deployment starting============" +logger -t $log_label -p "info" "Running preseeding early_command Installation script..." if [ ! -c /dev/vcs ]; then mknod /dev/vcs c 7 0 fi @@ -201,7 +200,7 @@ base64decode() ))}\\x\${h$(( o2 / 16 ))}\${h$(( o2 % 16 ))}\"" done } - +logger -t $log_label -p "info" "Generate partition file..." if [ -d /sys/firmware/efi ]; then echo "ubuntu-efi ::" > /tmp/partitionfile echo " 512 512 1024 fat16" >> /tmp/partitionfile From 527ef2b4f8178f5f68c0e2cd55e1c69393e75e3d Mon Sep 17 00:00:00 2001 From: yangsbj Date: Tue, 27 Nov 2018 21:27:10 -0500 Subject: [PATCH 113/121] fix issue [automation] Installation failed on several OS because error in DSHCLI.pm #5840 --- perl-xCAT/xCAT/DSHCLI.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/DSHCLI.pm b/perl-xCAT/xCAT/DSHCLI.pm index c69bcd564..1fd552528 100644 --- a/perl-xCAT/xCAT/DSHCLI.pm +++ b/perl-xCAT/xCAT/DSHCLI.pm @@ -6314,7 +6314,7 @@ sub run_always_rsync_postscripts # build xdsh queue # build host and all scripts to execute # EXECUTEALWAYS will only execute the syncfile in the syncfile list - foreach my $key (keys $$options{'destDir_srcFile'}{$host}) { + foreach my $key (keys %{$$options{'destDir_srcFile'}{$host}}) { foreach my $key1 (keys %{ $$options{'destDir_srcFile'}{$host}{$key} }) { my $index = 0; while (my $src_file = $$options{'destDir_srcFile'}{$host}{$key}{$key1}->[$index]) { From d487f450bbb617e6cc95debdc311c1ad35f1f3d3 Mon Sep 17 00:00:00 2001 From: zet809 Date: Wed, 28 Nov 2018 10:28:17 +0800 Subject: [PATCH 114/121] Set theme jekyll-theme-cayman --- _config.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 _config.yml diff --git a/_config.yml b/_config.yml new file mode 100644 index 000000000..c4192631f --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-cayman \ No newline at end of file From e58b6c9cb21f629ef6dd6b40b1d928d313c9254a Mon Sep 17 00:00:00 2001 From: litingt Date: Tue, 27 Nov 2018 22:44:59 -0500 Subject: [PATCH 115/121] update the error label --- .../bionic-ppc64el.sources.list | 0 .../{go-xcat => go_xcat}/bionic-x86_64.sources.list | 0 .../autotest/testcase/{go-xcat => go_xcat}/case0 | 0 .../autotest/testcase/{go-xcat => go_xcat}/case1 | 0 .../autotest/testcase/{go-xcat => go_xcat}/case2 | 0 .../autotest/testcase/{go-xcat => go_xcat}/case4 | 0 .../autotest/testcase/{go-xcat => go_xcat}/case5 | 0 .../trusty-ppc64el.sources.list | 0 .../{go-xcat => go_xcat}/trusty-x86_64.sources.list | 0 .../xenial-ppc64el.sources.list | 0 .../{go-xcat => go_xcat}/xenial-x86_64.sources.list | 0 ...ux_diskfull_installation_flat_postscripts_failed | 2 +- ...ux_diskless_installation_flat_postscripts_failed | 2 +- .../installation/ubuntu_full_installation_vm_docker | 2 +- .../snpool/cfg_wrong_cn_in_sn_pool_tftp_sync_mode | 2 +- .../not_set_xcatmaster_in_sn_pool_tftp_mount_mode | 2 +- ...catmaster_in_sn_pool_tftp_mount_mode_checkresult | 2 +- .../set_disjointdhcps_in_sn_pool_tftp_sync_mode | 2 +- .../set_xcatmaster_in_sn_pool_tftp_mount_mode | 2 +- ...catmaster_in_sn_pool_tftp_mount_mode_checkresult | 2 +- .../snpool/set_xcatmaster_in_sn_pool_tftp_sync_mode | 2 +- .../testcase/snpool/setup_sn_pool_tftp_mount_mode | 2 +- .../testcase/snpool/setup_sn_pool_tftp_sync_mode | 2 +- .../{xcat-inventory => xcat_inventory}/cases.common | 0 .../cases.credential | 0 .../{xcat-inventory => xcat_inventory}/cases.diff | 0 .../cases.environment | 2 +- .../cases.include | 0 .../cases.network | 0 .../{xcat-inventory => xcat_inventory}/cases.nics | 0 .../{xcat-inventory => xcat_inventory}/cases.node | 0 .../cases.osimage | 0 .../cases.osimage.import_from_osimage_dir | 0 .../cases.osimage.validation | 0 .../{xcat-inventory => xcat_inventory}/cases.passwd | 0 .../{xcat-inventory => xcat_inventory}/cases.route | 0 .../{xcat-inventory => xcat_inventory}/cases.site | 0 .../cases.site.validation | 0 .../diff/change_name.sh | 0 .../diff/diff_files.result | 0 .../diff/diff_source.result | 0 .../diff/xcat-inventory_diff_file1.json | 0 .../diff/xcat-inventory_diff_file2.json | 0 .../templates/cluster_invdir/cluster.json | 0 .../osimage/test_myimage/definition.json | 0 .../osimage/test_myimage/test_myimage.stanza | 0 .../osimage/test_myimage/tmp/test_myimage/exlist | 0 .../test_myimage/tmp/test_myimage/otherpkglist | 0 .../test_myimage/tmp/test_myimage/partitionfile | 0 .../test_myimage/tmp/test_myimage/postinstall | 0 .../osimage/test_myimage/tmp/test_myimage/synclists | 0 .../osimage/test_myimage2/definition.json | 0 .../osimage/test_myimage2/test_myimage2.stanza | 0 .../osimage/test_myimage2/tmp/test_myimage2/exlist | 0 .../test_myimage2/tmp/test_myimage2/otherpkglist | 0 .../test_myimage2/tmp/test_myimage2/partitionfile | 0 .../test_myimage2/tmp/test_myimage2/postinstall | 0 .../test_myimage2/tmp/test_myimage2/synclists | 0 .../templates/diff/change_name.sh | 0 .../templates/diff/diff.result | 0 .../templates/diff/diff_files.result | 0 .../templates/diff/diff_source.result | 0 .../templates/diff/xcat-inventory_diff_file1.json | 0 .../templates/diff/xcat-inventory_diff_file2.json | 0 .../gitrepo/otherpkglist/test1.otherpkglist | 0 .../gitrepo/otherpkglist/test2.otherpkglist | 0 .../environment/gitrepo/pkglist/test1.pkglist | 0 .../environment/gitrepo/pkglist/test2.pkglist | 0 .../gitrepo/postinstall/test1.postinstall | 0 .../gitrepo/postinstall/test2.postinstall | 0 .../environment/gitrepo/syncfiles/synclist | 0 .../otherpkgdir/conserver-xcat-8.2.1-1.ppc64le.rpm | Bin .../perl-Net-Telnet-3.03-19.el7.noarch.rpm | Bin ...6761fa5a5171ab309a2aef1d4f6efe3-filelists.xml.gz | Bin ...b614c5a9ea473f9f5f6da76997276c1-other.sqlite.bz2 | Bin ...af7f096945143e6be4f69489eb59a4aa8-primary.xml.gz | Bin ...e7a9b30078ecc06d5710c0520dc56-primary.sqlite.bz2 | Bin ...72f63b394ce110227f7d48f999a86d90ede-other.xml.gz | Bin ...e92f845dd773b0550c7f191e3f8-filelists.sqlite.bz2 | Bin .../swdir/otherpkgdir/repodata/repomd.xml | 0 .../swdir/pkgdir/dhcp-4.2.5-68.el7.ppc64le.rpm | Bin ...ae972ea2347d46b43de8cf48931-filelists.sqlite.bz2 | Bin ...d03e5f823e5ba319d0ddbed4b2a2397-filelists.xml.gz | Bin ...1c0c1203bb1f59a73e373b5cebcf03d65-primary.xml.gz | Bin ...4d8060ad5227802c0c02bb73dd72ce1-other.sqlite.bz2 | Bin ...080db5f7423ec46cf25221fb1193e35611b-other.xml.gz | Bin ...0e051dd788e791d259673af365373-primary.sqlite.bz2 | Bin .../environment/swdir/pkgdir/repodata/repomd.xml | 0 .../swdir/pkgdir/tftp-5.2-22.el7.ppc64le.rpm | Bin .../environment/test.environments.osimage.stanza | 0 .../test.environments.osimage.update.json | 0 .../test.environments.osimage.update.yaml | 0 .../environment/test.environments.osimage.yaml | 0 .../templates/imagedata/test_osimage/exlist | 0 .../templates/imagedata/test_osimage/file1.1 | 0 .../templates/imagedata/test_osimage/file2.1 | 0 .../templates/imagedata/test_osimage/file2.2 | 0 .../templates/imagedata/test_osimage/file2.3 | 0 .../templates/imagedata/test_osimage/file3.1 | 0 .../templates/imagedata/test_osimage/file3.2 | 0 .../templates/imagedata/test_osimage/file3.3 | 0 .../templates/imagedata/test_osimage/file4.1 | 0 .../templates/imagedata/test_osimage/file4.2 | 0 .../templates/imagedata/test_osimage/file4.3 | 0 .../templates/imagedata/test_osimage/file5 | 0 .../templates/imagedata/test_osimage/file6 | 0 .../templates/imagedata/test_osimage/file7 | 0 .../templates/imagedata/test_osimage/otherpkglist | 0 .../templates/imagedata/test_osimage/partitionfile | 0 .../templates/imagedata/test_osimage/pkglist | 0 .../templates/imagedata/test_osimage/postinstall | 0 .../templates/imagedata/test_osimage/synclists | 0 .../templates/imagedata/test_osimage/template.tmpl | 0 .../imagedata/test_osimage/test_osimage.stanza | 0 .../templates/network.json | 0 .../templates/network.yaml | 0 .../templates/nics.csv | 0 .../templates/nics.json | 0 .../templates/nics.yaml | 0 .../templates/node.json | 0 .../templates/node.yaml | 0 .../templates/osimage.json | 0 .../templates/osimage.yaml | 0 .../templates/passwd.json | 0 .../templates/passwd.yaml | 0 .../templates/route.json | 0 .../templates/route.yaml | 0 .../templates/site.json | 0 .../templates/site.yaml | 0 .../validatehelper | 0 .../xcatdebugmode/rhels_xcatdebugmode_diskful | 12 ++++++------ .../xcatdebugmode/sles_xcatdebugmode_diskful | 8 ++++---- .../xcatdebugmode/ubuntu_xcatdebugmode_diskful | 8 ++++---- 133 files changed, 27 insertions(+), 27 deletions(-) rename xCAT-test/autotest/testcase/{go-xcat => go_xcat}/bionic-ppc64el.sources.list (100%) rename xCAT-test/autotest/testcase/{go-xcat => go_xcat}/bionic-x86_64.sources.list (100%) rename xCAT-test/autotest/testcase/{go-xcat => go_xcat}/case0 (100%) rename xCAT-test/autotest/testcase/{go-xcat => go_xcat}/case1 (100%) rename xCAT-test/autotest/testcase/{go-xcat => go_xcat}/case2 (100%) rename xCAT-test/autotest/testcase/{go-xcat => go_xcat}/case4 (100%) rename xCAT-test/autotest/testcase/{go-xcat => go_xcat}/case5 (100%) rename xCAT-test/autotest/testcase/{go-xcat => go_xcat}/trusty-ppc64el.sources.list (100%) rename xCAT-test/autotest/testcase/{go-xcat => go_xcat}/trusty-x86_64.sources.list (100%) rename xCAT-test/autotest/testcase/{go-xcat => go_xcat}/xenial-ppc64el.sources.list (100%) rename xCAT-test/autotest/testcase/{go-xcat => go_xcat}/xenial-x86_64.sources.list (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/cases.common (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/cases.credential (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/cases.diff (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/cases.environment (99%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/cases.include (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/cases.network (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/cases.nics (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/cases.node (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/cases.osimage (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/cases.osimage.import_from_osimage_dir (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/cases.osimage.validation (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/cases.passwd (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/cases.route (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/cases.site (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/cases.site.validation (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/diff/change_name.sh (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/diff/diff_files.result (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/diff/diff_source.result (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/diff/xcat-inventory_diff_file1.json (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/diff/xcat-inventory_diff_file2.json (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/cluster_invdir/cluster.json (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/cluster_invdir/osimage/test_myimage/definition.json (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/cluster_invdir/osimage/test_myimage/test_myimage.stanza (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/exlist (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/otherpkglist (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/partitionfile (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/postinstall (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/synclists (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/cluster_invdir/osimage/test_myimage2/definition.json (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/cluster_invdir/osimage/test_myimage2/test_myimage2.stanza (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/exlist (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/otherpkglist (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/partitionfile (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/postinstall (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/synclists (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/diff/change_name.sh (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/diff/diff.result (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/diff/diff_files.result (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/diff/diff_source.result (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/diff/xcat-inventory_diff_file1.json (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/diff/xcat-inventory_diff_file2.json (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/gitrepo/otherpkglist/test1.otherpkglist (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/gitrepo/otherpkglist/test2.otherpkglist (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/gitrepo/pkglist/test1.pkglist (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/gitrepo/pkglist/test2.pkglist (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/gitrepo/postinstall/test1.postinstall (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/gitrepo/postinstall/test2.postinstall (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/gitrepo/syncfiles/synclist (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/swdir/otherpkgdir/conserver-xcat-8.2.1-1.ppc64le.rpm (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/swdir/otherpkgdir/perl-Net-Telnet-3.03-19.el7.noarch.rpm (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/swdir/otherpkgdir/repodata/2f8132e926de0ada34da23f1a63713a9e6761fa5a5171ab309a2aef1d4f6efe3-filelists.xml.gz (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/swdir/otherpkgdir/repodata/771b092d010ec878233b66dc1dba2ab81b614c5a9ea473f9f5f6da76997276c1-other.sqlite.bz2 (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/swdir/otherpkgdir/repodata/8a1f4155ca9e8784d0a41e5a9b5b715af7f096945143e6be4f69489eb59a4aa8-primary.xml.gz (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/swdir/otherpkgdir/repodata/98590d4faf7b8f997493a85d6fcbb6aa2ede7a9b30078ecc06d5710c0520dc56-primary.sqlite.bz2 (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/swdir/otherpkgdir/repodata/bd36e0c2e540280fd45799e9f755a72f63b394ce110227f7d48f999a86d90ede-other.xml.gz (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/swdir/otherpkgdir/repodata/e3cf2fc42c62b0328effe9e44a4ab1296905ae92f845dd773b0550c7f191e3f8-filelists.sqlite.bz2 (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/swdir/otherpkgdir/repodata/repomd.xml (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/swdir/pkgdir/dhcp-4.2.5-68.el7.ppc64le.rpm (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/swdir/pkgdir/repodata/2a9abe54b23615850e70c41456bd49ff3994eae972ea2347d46b43de8cf48931-filelists.sqlite.bz2 (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/swdir/pkgdir/repodata/4160c0db6523d465541345245e8463eacd03e5f823e5ba319d0ddbed4b2a2397-filelists.xml.gz (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/swdir/pkgdir/repodata/75c2df3e4d5ca66a0c105562f4d0cea1c0c1203bb1f59a73e373b5cebcf03d65-primary.xml.gz (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/swdir/pkgdir/repodata/811daeb0fde54384fec22af72ecdcdd2d4d8060ad5227802c0c02bb73dd72ce1-other.sqlite.bz2 (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/swdir/pkgdir/repodata/9fcfad63d06bdaba2be3507fbb1cd080db5f7423ec46cf25221fb1193e35611b-other.xml.gz (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/swdir/pkgdir/repodata/e4f965fd5f4b914c4e89d54b8784394b7760e051dd788e791d259673af365373-primary.sqlite.bz2 (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/swdir/pkgdir/repodata/repomd.xml (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/swdir/pkgdir/tftp-5.2-22.el7.ppc64le.rpm (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/test.environments.osimage.stanza (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/test.environments.osimage.update.json (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/test.environments.osimage.update.yaml (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/environment/test.environments.osimage.yaml (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/imagedata/test_osimage/exlist (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/imagedata/test_osimage/file1.1 (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/imagedata/test_osimage/file2.1 (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/imagedata/test_osimage/file2.2 (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/imagedata/test_osimage/file2.3 (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/imagedata/test_osimage/file3.1 (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/imagedata/test_osimage/file3.2 (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/imagedata/test_osimage/file3.3 (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/imagedata/test_osimage/file4.1 (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/imagedata/test_osimage/file4.2 (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/imagedata/test_osimage/file4.3 (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/imagedata/test_osimage/file5 (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/imagedata/test_osimage/file6 (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/imagedata/test_osimage/file7 (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/imagedata/test_osimage/otherpkglist (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/imagedata/test_osimage/partitionfile (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/imagedata/test_osimage/pkglist (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/imagedata/test_osimage/postinstall (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/imagedata/test_osimage/synclists (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/imagedata/test_osimage/template.tmpl (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/imagedata/test_osimage/test_osimage.stanza (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/network.json (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/network.yaml (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/nics.csv (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/nics.json (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/nics.yaml (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/node.json (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/node.yaml (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/osimage.json (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/osimage.yaml (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/passwd.json (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/passwd.yaml (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/route.json (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/route.yaml (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/site.json (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/templates/site.yaml (100%) rename xCAT-test/autotest/testcase/{xcat-inventory => xcat_inventory}/validatehelper (100%) diff --git a/xCAT-test/autotest/testcase/go-xcat/bionic-ppc64el.sources.list b/xCAT-test/autotest/testcase/go_xcat/bionic-ppc64el.sources.list similarity index 100% rename from xCAT-test/autotest/testcase/go-xcat/bionic-ppc64el.sources.list rename to xCAT-test/autotest/testcase/go_xcat/bionic-ppc64el.sources.list diff --git a/xCAT-test/autotest/testcase/go-xcat/bionic-x86_64.sources.list b/xCAT-test/autotest/testcase/go_xcat/bionic-x86_64.sources.list similarity index 100% rename from xCAT-test/autotest/testcase/go-xcat/bionic-x86_64.sources.list rename to xCAT-test/autotest/testcase/go_xcat/bionic-x86_64.sources.list diff --git a/xCAT-test/autotest/testcase/go-xcat/case0 b/xCAT-test/autotest/testcase/go_xcat/case0 similarity index 100% rename from xCAT-test/autotest/testcase/go-xcat/case0 rename to xCAT-test/autotest/testcase/go_xcat/case0 diff --git a/xCAT-test/autotest/testcase/go-xcat/case1 b/xCAT-test/autotest/testcase/go_xcat/case1 similarity index 100% rename from xCAT-test/autotest/testcase/go-xcat/case1 rename to xCAT-test/autotest/testcase/go_xcat/case1 diff --git a/xCAT-test/autotest/testcase/go-xcat/case2 b/xCAT-test/autotest/testcase/go_xcat/case2 similarity index 100% rename from xCAT-test/autotest/testcase/go-xcat/case2 rename to xCAT-test/autotest/testcase/go_xcat/case2 diff --git a/xCAT-test/autotest/testcase/go-xcat/case4 b/xCAT-test/autotest/testcase/go_xcat/case4 similarity index 100% rename from xCAT-test/autotest/testcase/go-xcat/case4 rename to xCAT-test/autotest/testcase/go_xcat/case4 diff --git a/xCAT-test/autotest/testcase/go-xcat/case5 b/xCAT-test/autotest/testcase/go_xcat/case5 similarity index 100% rename from xCAT-test/autotest/testcase/go-xcat/case5 rename to xCAT-test/autotest/testcase/go_xcat/case5 diff --git a/xCAT-test/autotest/testcase/go-xcat/trusty-ppc64el.sources.list b/xCAT-test/autotest/testcase/go_xcat/trusty-ppc64el.sources.list similarity index 100% rename from xCAT-test/autotest/testcase/go-xcat/trusty-ppc64el.sources.list rename to xCAT-test/autotest/testcase/go_xcat/trusty-ppc64el.sources.list diff --git a/xCAT-test/autotest/testcase/go-xcat/trusty-x86_64.sources.list b/xCAT-test/autotest/testcase/go_xcat/trusty-x86_64.sources.list similarity index 100% rename from xCAT-test/autotest/testcase/go-xcat/trusty-x86_64.sources.list rename to xCAT-test/autotest/testcase/go_xcat/trusty-x86_64.sources.list diff --git a/xCAT-test/autotest/testcase/go-xcat/xenial-ppc64el.sources.list b/xCAT-test/autotest/testcase/go_xcat/xenial-ppc64el.sources.list similarity index 100% rename from xCAT-test/autotest/testcase/go-xcat/xenial-ppc64el.sources.list rename to xCAT-test/autotest/testcase/go_xcat/xenial-ppc64el.sources.list diff --git a/xCAT-test/autotest/testcase/go-xcat/xenial-x86_64.sources.list b/xCAT-test/autotest/testcase/go_xcat/xenial-x86_64.sources.list similarity index 100% rename from xCAT-test/autotest/testcase/go-xcat/xenial-x86_64.sources.list rename to xCAT-test/autotest/testcase/go_xcat/xenial-x86_64.sources.list diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat_postscripts_failed b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat_postscripts_failed index d61220f77..511a93fea 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat_postscripts_failed +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat_postscripts_failed @@ -2,7 +2,7 @@ start:reg_linux_diskfull_installation_flat_postscripts_failed description:This case is for postscripts failed the status will return failed during diskfull installation. attribute:$$CN-The operation object of diskfull installation. os:Linux -label:others,postscripts,invoke_provison +label:others,postscripts,invoke_provision cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi cmd:MINIISO=NUll;if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu" ]] && [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc64" ]];then mkdir /tmp/iso; mount -o loop $$MINIISO /tmp/iso ; mkdir -p /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot; cp /tmp/iso/install/initrd.gz /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot;umount /tmp/iso; rmdir /tmp/iso; fi check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat_postscripts_failed b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat_postscripts_failed index 0121d2249..d29e28cd0 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat_postscripts_failed +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat_postscripts_failed @@ -2,7 +2,7 @@ start:reg_linux_diskless_installation_flat_postscripts_failed description:This case is for postscripts failed the status will return failed during diskless installation. attribute:$$CN-The operation object of diskless installation. os:Linux -label:others,postscripts,invoke_provison +label:others,postscripts,invoke_provision cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm_docker b/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm_docker index e7aabd53b..c8e099502 100644 --- a/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm_docker +++ b/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm_docker @@ -1,6 +1,6 @@ start:Full_installation_flat_docker os:Linux -label:others,docker,invoke_provison +label:others,docker,invoke_provision cmd:copycds $$ISO check:rc==0 cmd:makedns -n diff --git a/xCAT-test/autotest/testcase/snpool/cfg_wrong_cn_in_sn_pool_tftp_sync_mode b/xCAT-test/autotest/testcase/snpool/cfg_wrong_cn_in_sn_pool_tftp_sync_mode index 9dc4543b5..955bc1f21 100644 --- a/xCAT-test/autotest/testcase/snpool/cfg_wrong_cn_in_sn_pool_tftp_sync_mode +++ b/xCAT-test/autotest/testcase/snpool/cfg_wrong_cn_in_sn_pool_tftp_sync_mode @@ -1,6 +1,6 @@ start:cfg_wrong_cn_in_sn_pool_tftp_sync_mode description:The test case is intend to test the error handling of the service node pool when a compute has misconfigured node definition -label:others,invoke_provision,sn_pool +label:others,invoke_provision,snpool cmd:fdisk -l cmd:df -T #cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode b/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode index f56e03bfe..c44d061e0 100644 --- a/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode +++ b/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode @@ -1,6 +1,6 @@ start:not_set_xcatmaster_in_sn_pool_tftp_mount_mode description: this case is to test when compute nodes' xcatmaster is not set in service node pool environment,compute node's provision files are correctly set after nodeset. -label:others,invoke_provision,sn_pool +label:others,invoke_provision,snpool cmd:fdisk -l cmd:df -T #cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult b/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult index 51da0667e..1f2a75243 100644 --- a/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult +++ b/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult @@ -1,6 +1,6 @@ start:not_set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult description: this case is to check the configuration files after nodeset for case not_set_xcatmaster_in_sn_pool_tftp_mount_mode -label:others,invoke_provision,sn_pool +label:others,invoke_provision,snpool #create a test compute node, don't set it's xcatmaster, set it's service node as SN and CN cmd:mkdef -t node -o compute1 groups=compute ip=10.0.0.199 mac=4a:c8:f7:de:d0:09 profile=compute os=__GETNODEATTR($$CN,os)__ arch=__GETNODEATTR($$CN,arch)__ netboot=__GETNODEATTR($$CN,netboot)__ diff --git a/xCAT-test/autotest/testcase/snpool/set_disjointdhcps_in_sn_pool_tftp_sync_mode b/xCAT-test/autotest/testcase/snpool/set_disjointdhcps_in_sn_pool_tftp_sync_mode index 533a68a7a..086a659cd 100644 --- a/xCAT-test/autotest/testcase/snpool/set_disjointdhcps_in_sn_pool_tftp_sync_mode +++ b/xCAT-test/autotest/testcase/snpool/set_disjointdhcps_in_sn_pool_tftp_sync_mode @@ -1,6 +1,6 @@ start:set_disjointdhcps_in_sn_pool_tftp_sync_mode description: Verify the disjointdhcps feature when petitboot is used for OS loader. -label:others,invoke_provision,sn_pool,dhcp +label:others,invoke_provision,snpool,dhcp cmd:rmdef testnode1 cmd:rm -f /tftpboot/petitboot/testnode1 cmd:mkdef -t node -o testnode1 arch=ppc64le cons=bmc groups=ipmi ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=ipmi profile=compute os=rhels7.99 diff --git a/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode b/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode index fec54758b..e0853de30 100644 --- a/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode +++ b/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode @@ -1,6 +1,6 @@ start:set_xcatmaster_in_sn_pool_tftp_mount_mode description: this case is to test when compute nodes' xcatmaster is set in service node pool environment,compute node's provision files are correctly set after nodeset. -label:others,invoke_provision,sn_pool +label:others,invoke_provision,snpool cmd:fdisk -l cmd:df -T #cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult b/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult index 69ef75fae..48efb039f 100644 --- a/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult +++ b/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult @@ -1,6 +1,6 @@ start:set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult description: this case is to check the configuration files after nodeset for case set_xcatmaster_in_sn_pool_tftp_mount_mode -label:others,invoke_provision,sn_pool +label:others,invoke_provision,snpool #create a test compute node, set it's xcatmaster as SN, set it's service node as SN and CN cmd:mkdef -t node -o compute1 groups=compute ip=10.0.0.199 mac=4a:c8:f7:de:d0:09 profile=compute os=__GETNODEATTR($$CN,os)__ arch=__GETNODEATTR($$CN,arch)__ netboot=__GETNODEATTR($$CN,netboot)__ diff --git a/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_sync_mode b/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_sync_mode index a09faa03a..9131e8860 100644 --- a/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_sync_mode +++ b/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_sync_mode @@ -1,6 +1,6 @@ start:set_xcatmaster_in_sn_pool_tftp_sync_mode description: this case is to test when compute nodes' xcatmaster is set in service node pool environment,compute node's provision files are correctly set after nodeset. -label:others,invoke_provision,sn_pool +label:others,invoke_provision,snpool cmd:fdisk -l cmd:df -T #cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_mount_mode b/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_mount_mode index 0441e3e9c..06e0cd23a 100644 --- a/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_mount_mode +++ b/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_mount_mode @@ -1,6 +1,6 @@ start:setup_sn_pool_tftp_mount_mode description: this case is to test when sharedtftp=1 and installloc=/install are set on mn, after all service nodes are installed, /tftpboot and /install directory on all service nodes are mounted.Since test framework only support 1 sn and 1 cn parameter. This case will install CN as another service node. -label:others,invoke_provision,sn_pool +label:others,invoke_provision,snpool cmd:fdisk -l cmd:df -T #cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_sync_mode b/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_sync_mode index 7030f3f79..12d07824d 100644 --- a/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_sync_mode +++ b/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_sync_mode @@ -1,6 +1,6 @@ start:setup_sn_pool_tftp_sync_mode description: this case is to test when sharedtftp=0 and installloc=/install are not set on mn, after all service nodes are installed, /tftpboot and /install directory on all service nodes are separated and need to be rsynced. Since test framework only support 1 sn and 1 cn parameter. This case will install CN as another service node. -label:others,invoke_provision,sn_pool +label:others,invoke_provision,snpool cmd:fdisk -l cmd:df -T #cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.common b/xCAT-test/autotest/testcase/xcat_inventory/cases.common similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.common rename to xCAT-test/autotest/testcase/xcat_inventory/cases.common diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.credential b/xCAT-test/autotest/testcase/xcat_inventory/cases.credential similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.credential rename to xCAT-test/autotest/testcase/xcat_inventory/cases.credential diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.diff b/xCAT-test/autotest/testcase/xcat_inventory/cases.diff similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.diff rename to xCAT-test/autotest/testcase/xcat_inventory/cases.diff diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.environment b/xCAT-test/autotest/testcase/xcat_inventory/cases.environment similarity index 99% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.environment rename to xCAT-test/autotest/testcase/xcat_inventory/cases.environment index 2fd08a52a..31b91dfc1 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.environment +++ b/xCAT-test/autotest/testcase/xcat_inventory/cases.environment @@ -1,7 +1,7 @@ start:import_osimage_with_environments_in_yaml description:this case is to verify if osimage import could support environment variables. os:Linux -label:others,xcat_inventory,invoke_provison +label:others,xcat_inventory,invoke_provision cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.include b/xCAT-test/autotest/testcase/xcat_inventory/cases.include similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.include rename to xCAT-test/autotest/testcase/xcat_inventory/cases.include diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.network b/xCAT-test/autotest/testcase/xcat_inventory/cases.network similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.network rename to xCAT-test/autotest/testcase/xcat_inventory/cases.network diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.nics b/xCAT-test/autotest/testcase/xcat_inventory/cases.nics similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.nics rename to xCAT-test/autotest/testcase/xcat_inventory/cases.nics diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.node b/xCAT-test/autotest/testcase/xcat_inventory/cases.node similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.node rename to xCAT-test/autotest/testcase/xcat_inventory/cases.node diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage b/xCAT-test/autotest/testcase/xcat_inventory/cases.osimage similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.osimage rename to xCAT-test/autotest/testcase/xcat_inventory/cases.osimage diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage.import_from_osimage_dir b/xCAT-test/autotest/testcase/xcat_inventory/cases.osimage.import_from_osimage_dir similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.osimage.import_from_osimage_dir rename to xCAT-test/autotest/testcase/xcat_inventory/cases.osimage.import_from_osimage_dir diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage.validation b/xCAT-test/autotest/testcase/xcat_inventory/cases.osimage.validation similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.osimage.validation rename to xCAT-test/autotest/testcase/xcat_inventory/cases.osimage.validation diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.passwd b/xCAT-test/autotest/testcase/xcat_inventory/cases.passwd similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.passwd rename to xCAT-test/autotest/testcase/xcat_inventory/cases.passwd diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.route b/xCAT-test/autotest/testcase/xcat_inventory/cases.route similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.route rename to xCAT-test/autotest/testcase/xcat_inventory/cases.route diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.site b/xCAT-test/autotest/testcase/xcat_inventory/cases.site similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.site rename to xCAT-test/autotest/testcase/xcat_inventory/cases.site diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.site.validation b/xCAT-test/autotest/testcase/xcat_inventory/cases.site.validation similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.site.validation rename to xCAT-test/autotest/testcase/xcat_inventory/cases.site.validation diff --git a/xCAT-test/autotest/testcase/xcat-inventory/diff/change_name.sh b/xCAT-test/autotest/testcase/xcat_inventory/diff/change_name.sh similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/diff/change_name.sh rename to xCAT-test/autotest/testcase/xcat_inventory/diff/change_name.sh diff --git a/xCAT-test/autotest/testcase/xcat-inventory/diff/diff_files.result b/xCAT-test/autotest/testcase/xcat_inventory/diff/diff_files.result similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/diff/diff_files.result rename to xCAT-test/autotest/testcase/xcat_inventory/diff/diff_files.result diff --git a/xCAT-test/autotest/testcase/xcat-inventory/diff/diff_source.result b/xCAT-test/autotest/testcase/xcat_inventory/diff/diff_source.result similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/diff/diff_source.result rename to xCAT-test/autotest/testcase/xcat_inventory/diff/diff_source.result diff --git a/xCAT-test/autotest/testcase/xcat-inventory/diff/xcat-inventory_diff_file1.json b/xCAT-test/autotest/testcase/xcat_inventory/diff/xcat-inventory_diff_file1.json similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/diff/xcat-inventory_diff_file1.json rename to xCAT-test/autotest/testcase/xcat_inventory/diff/xcat-inventory_diff_file1.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/diff/xcat-inventory_diff_file2.json b/xCAT-test/autotest/testcase/xcat_inventory/diff/xcat-inventory_diff_file2.json similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/diff/xcat-inventory_diff_file2.json rename to xCAT-test/autotest/testcase/xcat_inventory/diff/xcat-inventory_diff_file2.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/cluster.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/cluster.json similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/cluster.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/cluster.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/definition.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/definition.json similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/definition.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/definition.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/test_myimage.stanza b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/test_myimage.stanza similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/test_myimage.stanza rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/test_myimage.stanza diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/exlist b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/exlist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/exlist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/exlist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/otherpkglist b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/otherpkglist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/otherpkglist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/otherpkglist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/partitionfile b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/partitionfile similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/partitionfile rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/partitionfile diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/postinstall b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/postinstall similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/postinstall rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/postinstall diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/synclists b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/synclists similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/synclists rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/synclists diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/definition.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/definition.json similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/definition.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/definition.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/test_myimage2.stanza b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/test_myimage2.stanza similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/test_myimage2.stanza rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/test_myimage2.stanza diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/exlist b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/exlist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/exlist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/exlist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/otherpkglist b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/otherpkglist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/otherpkglist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/otherpkglist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/partitionfile b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/partitionfile similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/partitionfile rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/partitionfile diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/postinstall b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/postinstall similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/postinstall rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/postinstall diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/synclists b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/synclists similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/synclists rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/synclists diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/change_name.sh b/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/change_name.sh similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/diff/change_name.sh rename to xCAT-test/autotest/testcase/xcat_inventory/templates/diff/change_name.sh diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff.result b/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/diff.result similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff.result rename to xCAT-test/autotest/testcase/xcat_inventory/templates/diff/diff.result diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff_files.result b/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/diff_files.result similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff_files.result rename to xCAT-test/autotest/testcase/xcat_inventory/templates/diff/diff_files.result diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff_source.result b/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/diff_source.result similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff_source.result rename to xCAT-test/autotest/testcase/xcat_inventory/templates/diff/diff_source.result diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file1.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file1.json similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file1.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file1.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file2.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file2.json similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file2.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file2.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/otherpkglist/test1.otherpkglist b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/otherpkglist/test1.otherpkglist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/otherpkglist/test1.otherpkglist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/otherpkglist/test1.otherpkglist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/otherpkglist/test2.otherpkglist b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/otherpkglist/test2.otherpkglist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/otherpkglist/test2.otherpkglist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/otherpkglist/test2.otherpkglist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test1.pkglist b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/pkglist/test1.pkglist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test1.pkglist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/pkglist/test1.pkglist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test2.pkglist b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/pkglist/test2.pkglist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test2.pkglist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/pkglist/test2.pkglist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/postinstall/test1.postinstall b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/postinstall/test1.postinstall similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/postinstall/test1.postinstall rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/postinstall/test1.postinstall diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/postinstall/test2.postinstall b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/postinstall/test2.postinstall similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/postinstall/test2.postinstall rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/postinstall/test2.postinstall diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/syncfiles/synclist b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/syncfiles/synclist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/syncfiles/synclist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/syncfiles/synclist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/conserver-xcat-8.2.1-1.ppc64le.rpm b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/conserver-xcat-8.2.1-1.ppc64le.rpm similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/conserver-xcat-8.2.1-1.ppc64le.rpm rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/conserver-xcat-8.2.1-1.ppc64le.rpm diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/perl-Net-Telnet-3.03-19.el7.noarch.rpm b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/perl-Net-Telnet-3.03-19.el7.noarch.rpm similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/perl-Net-Telnet-3.03-19.el7.noarch.rpm rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/perl-Net-Telnet-3.03-19.el7.noarch.rpm diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/2f8132e926de0ada34da23f1a63713a9e6761fa5a5171ab309a2aef1d4f6efe3-filelists.xml.gz b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/2f8132e926de0ada34da23f1a63713a9e6761fa5a5171ab309a2aef1d4f6efe3-filelists.xml.gz similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/2f8132e926de0ada34da23f1a63713a9e6761fa5a5171ab309a2aef1d4f6efe3-filelists.xml.gz rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/2f8132e926de0ada34da23f1a63713a9e6761fa5a5171ab309a2aef1d4f6efe3-filelists.xml.gz diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/771b092d010ec878233b66dc1dba2ab81b614c5a9ea473f9f5f6da76997276c1-other.sqlite.bz2 b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/771b092d010ec878233b66dc1dba2ab81b614c5a9ea473f9f5f6da76997276c1-other.sqlite.bz2 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/771b092d010ec878233b66dc1dba2ab81b614c5a9ea473f9f5f6da76997276c1-other.sqlite.bz2 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/771b092d010ec878233b66dc1dba2ab81b614c5a9ea473f9f5f6da76997276c1-other.sqlite.bz2 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/8a1f4155ca9e8784d0a41e5a9b5b715af7f096945143e6be4f69489eb59a4aa8-primary.xml.gz b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/8a1f4155ca9e8784d0a41e5a9b5b715af7f096945143e6be4f69489eb59a4aa8-primary.xml.gz similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/8a1f4155ca9e8784d0a41e5a9b5b715af7f096945143e6be4f69489eb59a4aa8-primary.xml.gz rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/8a1f4155ca9e8784d0a41e5a9b5b715af7f096945143e6be4f69489eb59a4aa8-primary.xml.gz diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/98590d4faf7b8f997493a85d6fcbb6aa2ede7a9b30078ecc06d5710c0520dc56-primary.sqlite.bz2 b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/98590d4faf7b8f997493a85d6fcbb6aa2ede7a9b30078ecc06d5710c0520dc56-primary.sqlite.bz2 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/98590d4faf7b8f997493a85d6fcbb6aa2ede7a9b30078ecc06d5710c0520dc56-primary.sqlite.bz2 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/98590d4faf7b8f997493a85d6fcbb6aa2ede7a9b30078ecc06d5710c0520dc56-primary.sqlite.bz2 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/bd36e0c2e540280fd45799e9f755a72f63b394ce110227f7d48f999a86d90ede-other.xml.gz b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/bd36e0c2e540280fd45799e9f755a72f63b394ce110227f7d48f999a86d90ede-other.xml.gz similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/bd36e0c2e540280fd45799e9f755a72f63b394ce110227f7d48f999a86d90ede-other.xml.gz rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/bd36e0c2e540280fd45799e9f755a72f63b394ce110227f7d48f999a86d90ede-other.xml.gz diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/e3cf2fc42c62b0328effe9e44a4ab1296905ae92f845dd773b0550c7f191e3f8-filelists.sqlite.bz2 b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/e3cf2fc42c62b0328effe9e44a4ab1296905ae92f845dd773b0550c7f191e3f8-filelists.sqlite.bz2 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/e3cf2fc42c62b0328effe9e44a4ab1296905ae92f845dd773b0550c7f191e3f8-filelists.sqlite.bz2 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/e3cf2fc42c62b0328effe9e44a4ab1296905ae92f845dd773b0550c7f191e3f8-filelists.sqlite.bz2 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/repomd.xml b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/repomd.xml similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/repomd.xml rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/repomd.xml diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/dhcp-4.2.5-68.el7.ppc64le.rpm b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/dhcp-4.2.5-68.el7.ppc64le.rpm similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/dhcp-4.2.5-68.el7.ppc64le.rpm rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/dhcp-4.2.5-68.el7.ppc64le.rpm diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/2a9abe54b23615850e70c41456bd49ff3994eae972ea2347d46b43de8cf48931-filelists.sqlite.bz2 b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/2a9abe54b23615850e70c41456bd49ff3994eae972ea2347d46b43de8cf48931-filelists.sqlite.bz2 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/2a9abe54b23615850e70c41456bd49ff3994eae972ea2347d46b43de8cf48931-filelists.sqlite.bz2 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/2a9abe54b23615850e70c41456bd49ff3994eae972ea2347d46b43de8cf48931-filelists.sqlite.bz2 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/4160c0db6523d465541345245e8463eacd03e5f823e5ba319d0ddbed4b2a2397-filelists.xml.gz b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/4160c0db6523d465541345245e8463eacd03e5f823e5ba319d0ddbed4b2a2397-filelists.xml.gz similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/4160c0db6523d465541345245e8463eacd03e5f823e5ba319d0ddbed4b2a2397-filelists.xml.gz rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/4160c0db6523d465541345245e8463eacd03e5f823e5ba319d0ddbed4b2a2397-filelists.xml.gz diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/75c2df3e4d5ca66a0c105562f4d0cea1c0c1203bb1f59a73e373b5cebcf03d65-primary.xml.gz b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/75c2df3e4d5ca66a0c105562f4d0cea1c0c1203bb1f59a73e373b5cebcf03d65-primary.xml.gz similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/75c2df3e4d5ca66a0c105562f4d0cea1c0c1203bb1f59a73e373b5cebcf03d65-primary.xml.gz rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/75c2df3e4d5ca66a0c105562f4d0cea1c0c1203bb1f59a73e373b5cebcf03d65-primary.xml.gz diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/811daeb0fde54384fec22af72ecdcdd2d4d8060ad5227802c0c02bb73dd72ce1-other.sqlite.bz2 b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/811daeb0fde54384fec22af72ecdcdd2d4d8060ad5227802c0c02bb73dd72ce1-other.sqlite.bz2 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/811daeb0fde54384fec22af72ecdcdd2d4d8060ad5227802c0c02bb73dd72ce1-other.sqlite.bz2 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/811daeb0fde54384fec22af72ecdcdd2d4d8060ad5227802c0c02bb73dd72ce1-other.sqlite.bz2 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/9fcfad63d06bdaba2be3507fbb1cd080db5f7423ec46cf25221fb1193e35611b-other.xml.gz b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/9fcfad63d06bdaba2be3507fbb1cd080db5f7423ec46cf25221fb1193e35611b-other.xml.gz similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/9fcfad63d06bdaba2be3507fbb1cd080db5f7423ec46cf25221fb1193e35611b-other.xml.gz rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/9fcfad63d06bdaba2be3507fbb1cd080db5f7423ec46cf25221fb1193e35611b-other.xml.gz diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/e4f965fd5f4b914c4e89d54b8784394b7760e051dd788e791d259673af365373-primary.sqlite.bz2 b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/e4f965fd5f4b914c4e89d54b8784394b7760e051dd788e791d259673af365373-primary.sqlite.bz2 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/e4f965fd5f4b914c4e89d54b8784394b7760e051dd788e791d259673af365373-primary.sqlite.bz2 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/e4f965fd5f4b914c4e89d54b8784394b7760e051dd788e791d259673af365373-primary.sqlite.bz2 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/repomd.xml b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/repomd.xml similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/repomd.xml rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/repomd.xml diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/tftp-5.2-22.el7.ppc64le.rpm b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/tftp-5.2-22.el7.ppc64le.rpm similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/tftp-5.2-22.el7.ppc64le.rpm rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/tftp-5.2-22.el7.ppc64le.rpm diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.stanza similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.stanza diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.update.json similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.update.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.update.yaml similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.update.yaml diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.yaml similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.yaml diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/exlist b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/exlist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/exlist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/exlist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file1.1 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file1.1 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file1.1 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file1.1 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file2.1 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file2.1 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file2.1 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file2.1 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file2.2 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file2.2 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file2.2 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file2.2 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file2.3 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file2.3 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file2.3 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file2.3 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file3.1 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file3.1 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file3.1 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file3.1 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file3.2 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file3.2 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file3.2 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file3.2 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file3.3 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file3.3 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file3.3 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file3.3 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file4.1 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file4.1 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file4.1 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file4.1 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file4.2 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file4.2 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file4.2 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file4.2 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file4.3 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file4.3 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file4.3 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file4.3 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file5 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file5 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file5 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file5 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file6 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file6 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file6 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file6 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file7 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file7 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file7 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file7 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/otherpkglist b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/otherpkglist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/otherpkglist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/otherpkglist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/partitionfile b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/partitionfile similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/partitionfile rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/partitionfile diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/pkglist b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/pkglist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/pkglist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/pkglist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/postinstall b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/postinstall similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/postinstall rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/postinstall diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/synclists b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/synclists similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/synclists rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/synclists diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/template.tmpl b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/template.tmpl similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/template.tmpl rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/template.tmpl diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/test_osimage.stanza b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/test_osimage.stanza similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/test_osimage.stanza rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/test_osimage.stanza diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/network.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/network.json similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/network.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/network.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/network.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/network.yaml similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/network.yaml rename to xCAT-test/autotest/testcase/xcat_inventory/templates/network.yaml diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/nics.csv b/xCAT-test/autotest/testcase/xcat_inventory/templates/nics.csv similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/nics.csv rename to xCAT-test/autotest/testcase/xcat_inventory/templates/nics.csv diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/nics.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/nics.json similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/nics.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/nics.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/nics.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/nics.yaml similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/nics.yaml rename to xCAT-test/autotest/testcase/xcat_inventory/templates/nics.yaml diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/node.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/node.json similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/node.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/node.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/node.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/node.yaml similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/node.yaml rename to xCAT-test/autotest/testcase/xcat_inventory/templates/node.yaml diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/osimage.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/osimage.json similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/osimage.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/osimage.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/osimage.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/osimage.yaml similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/osimage.yaml rename to xCAT-test/autotest/testcase/xcat_inventory/templates/osimage.yaml diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/passwd.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/passwd.json similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/passwd.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/passwd.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/passwd.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/passwd.yaml similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/passwd.yaml rename to xCAT-test/autotest/testcase/xcat_inventory/templates/passwd.yaml diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/route.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/route.json similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/route.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/route.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/route.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/route.yaml similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/route.yaml rename to xCAT-test/autotest/testcase/xcat_inventory/templates/route.yaml diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/site.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/site.json similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/site.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/site.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/site.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/site.yaml similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/site.yaml rename to xCAT-test/autotest/testcase/xcat_inventory/templates/site.yaml diff --git a/xCAT-test/autotest/testcase/xcat-inventory/validatehelper b/xCAT-test/autotest/testcase/xcat_inventory/validatehelper similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/validatehelper rename to xCAT-test/autotest/testcase/xcat_inventory/validatehelper diff --git a/xCAT-test/autotest/testcase/xcatdebugmode/rhels_xcatdebugmode_diskful b/xCAT-test/autotest/testcase/xcatdebugmode/rhels_xcatdebugmode_diskful index a73c52cf5..603d19fa0 100644 --- a/xCAT-test/autotest/testcase/xcatdebugmode/rhels_xcatdebugmode_diskful +++ b/xCAT-test/autotest/testcase/xcatdebugmode/rhels_xcatdebugmode_diskful @@ -1,7 +1,7 @@ start:reg_set_xcatdebugmode_off_rhels_diskful_flat os:linux description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. -label:flat_cn_diskful,invoke_provison,xcatdebugmode +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 @@ -58,7 +58,7 @@ end start:reg_set_xcatdebugmode_value_one_rhels_diskful_flat os:linux description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. -label:flat_cn_diskful,invoke_provison,xcatdebugmode +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 @@ -146,7 +146,7 @@ end start:reg_set_xcatdebugmode_value_two_rhels_diskful_flat os:linux description:site.xcatdebugmode value is 2, , the following logs will be shown and ssh is supported. -label:flat_cn_diskful,invoke_provison,xcatdebugmode +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 @@ -234,7 +234,7 @@ end start:set_xcatdebugmode_off_rhels_diskful_flat_p8_le os:Linux description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. -label:flat_cn_diskful,invoke_provison,xcatdebugmode +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:chtab key=xcatdebugmode site.value="0" check:rc==0 @@ -287,7 +287,7 @@ end start:set_xcatdebugmode_value_one_rhels_diskful_flat_p8_le os:Linux description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. -label:flat_cn_diskful,invoke_provison,xcatdebugmode +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 @@ -377,7 +377,7 @@ end start:set_xcatdebugmode_value_two_rhels_diskful_flat_p8_le os:Linux description:site.xcatdebugmode value is 2, the following logs will be shown and ssh is supported. -label:flat_cn_diskful,invoke_provison,xcatdebugmode +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 diff --git a/xCAT-test/autotest/testcase/xcatdebugmode/sles_xcatdebugmode_diskful b/xCAT-test/autotest/testcase/xcatdebugmode/sles_xcatdebugmode_diskful index 71eb112e9..f8033badc 100644 --- a/xCAT-test/autotest/testcase/xcatdebugmode/sles_xcatdebugmode_diskful +++ b/xCAT-test/autotest/testcase/xcatdebugmode/sles_xcatdebugmode_diskful @@ -1,7 +1,7 @@ start:reg_set_xcatdebugmode_off_sles_diskful_flat os:linux description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. -label:flat_cn_diskful,invoke_provison,xcatdebugmode +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN @@ -68,7 +68,7 @@ end start:reg_set_xcatdebugmode_value_one_sles_diskful_flat os:linux description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. -label:flat_cn_diskful,invoke_provison,xcatdebugmode +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 @@ -162,7 +162,7 @@ end start:set_xcatdebugmode_off_sles_diskful_flat_p8_le os:linux description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. -label:flat_cn_diskful,invoke_provison,xcatdebugmode +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:chtab key=xcatdebugmode site.value="0" check:rc==0 @@ -224,7 +224,7 @@ end start:set_xcatdebugmode_value_one_sles_diskful_flat_p8_le os:linux description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. -label:flat_cn_diskful,invoke_provison,xcatdebugmode +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 diff --git a/xCAT-test/autotest/testcase/xcatdebugmode/ubuntu_xcatdebugmode_diskful b/xCAT-test/autotest/testcase/xcatdebugmode/ubuntu_xcatdebugmode_diskful index e55e7b381..70d8cc3a9 100644 --- a/xCAT-test/autotest/testcase/xcatdebugmode/ubuntu_xcatdebugmode_diskful +++ b/xCAT-test/autotest/testcase/xcatdebugmode/ubuntu_xcatdebugmode_diskful @@ -1,7 +1,7 @@ start:set_xcatdebugmode_off_ubuntule_diskful os:linux description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. -label:flat_cn_diskful,invoke_provison,xcatdebugmode +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:chtab key=xcatdebugmode site.value="0" check:rc==0 cmd:copycds $$ISO @@ -45,7 +45,7 @@ end start:set_xcatdebugmode_off_ubuntux_vm_diskful os:linux description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. -label:flat_cn_diskful,invoke_provison,xcatdebugmode +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:makedns -n check:rc==0 cmd:sleep 60 @@ -88,7 +88,7 @@ end start:set_xcatdebugmode_value_one_ubuntule_diskful os:linux description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. -label:flat_cn_diskful,invoke_provison,xcatdebugmode +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 cmd:chtab key=xcatdebugmode site.value="1" @@ -160,7 +160,7 @@ end start:set_xcatdebugmode_value_one_ubuntux_vm_diskful os:linux description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. -label:flat_cn_diskful,invoke_provison,xcatdebugmode +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 From 71594f41ce45ec17885e6573f13fcf8a4ba289c3 Mon Sep 17 00:00:00 2001 From: litingt Date: Wed, 28 Nov 2018 01:51:26 -0500 Subject: [PATCH 116/121] update arch for x86_64 --- xCAT-test/autotest/testcase/nodestat/cases0 | 2 +- .../snpool/not_set_xcatmaster_in_sn_pool_tftp_sync_mode | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-test/autotest/testcase/nodestat/cases0 b/xCAT-test/autotest/testcase/nodestat/cases0 index 6184447b4..3c5a62724 100644 --- a/xCAT-test/autotest/testcase/nodestat/cases0 +++ b/xCAT-test/autotest/testcase/nodestat/cases0 @@ -1,6 +1,6 @@ start:nodestat_noderange label:others -arch:x86 +arch:x86_64 cmd:nodestat $$CN check:rc==0 check:output=~noping|sshd|install|snmp|pbs diff --git a/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_sync_mode b/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_sync_mode index 9cfb9e169..3c2a0a051 100644 --- a/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_sync_mode +++ b/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_sync_mode @@ -1,6 +1,6 @@ start:not_set_xcatmaster_in_sn_pool_tftp_sync_mode description: this case is to test when compute nodes' xcatmaster is not set in service node pool environment, compute node's provision files are correctly set after nodeset. -label:others,invoke_provision,sn_pool +label:others,invoke_provision,snpool cmd:fdisk -l cmd:df -T #cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ From 55b435c64ab0f18d51048ad45979d41d091d5c1f Mon Sep 17 00:00:00 2001 From: litingt Date: Wed, 28 Nov 2018 03:42:43 -0500 Subject: [PATCH 117/121] update go-xcat cases labels --- xCAT-test/autotest/testcase/go_xcat/case0 | 14 +++++++------- xCAT-test/autotest/testcase/go_xcat/case1 | 8 ++++---- xCAT-test/autotest/testcase/go_xcat/case2 | 12 ++++++------ xCAT-test/autotest/testcase/go_xcat/case4 | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/xCAT-test/autotest/testcase/go_xcat/case0 b/xCAT-test/autotest/testcase/go_xcat/case0 index 237693040..d8174c0bd 100644 --- a/xCAT-test/autotest/testcase/go_xcat/case0 +++ b/xCAT-test/autotest/testcase/go_xcat/case0 @@ -1,6 +1,6 @@ start:go_xcat_local_repo_case1 description:test go_xcat with the option --xcat-core=/path/to/xcat-core.repo install -label:others,go-xcat +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -41,7 +41,7 @@ end start:go_xcat_local_repo_case2 description:test go_xcat with the option --xcat-core=/path/to/xcat-core install -label:others,go-xcat +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -80,7 +80,7 @@ end start:go_xcat_local_repo_case3 description:test go_xcat with the option --xcat-core=/path/to/xcat-core.tar install -label:others,go-xcat +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -119,7 +119,7 @@ end start:go_xcat_local_repo_case4 description:test go_xcat with the option --xcat-core=/path/to/xcat-core.tar.bz2 --xcat-dep=/path/to/xcat-dep.tar.bz2 install -label:others,go-xcat +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -158,7 +158,7 @@ end start:go_xcat_local_repo_case5 description:test go_xcat with the option --xcat-core=/path/to/xcat-core.repo --xcat-dep=/path/to/xcat-dep.repo install -label:others,go-xcat +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -205,7 +205,7 @@ end start:go_xcat_local_repo_case6 description:test go_xcat with the option --xcat-core=/path/to/xcat-core --xcat-dep=/path/to/xcat-dep install -label:others,go-xcat +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -248,7 +248,7 @@ end start:go_xcat_local_repo_case7 description:test go_xcat with the option --xcat-core=/path/to/xcat-core.tar.bz2 --xcat-dep=/path/to/xcat-dep.tar.bz2 install -label:others,go-xcat +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat xcat-buildkit xcat-genesis-scripts xcat-genesis-base-amd64 xcat-genesis-base-ppc64 -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi diff --git a/xCAT-test/autotest/testcase/go_xcat/case1 b/xCAT-test/autotest/testcase/go_xcat/case1 index eb105537d..2e4b58028 100644 --- a/xCAT-test/autotest/testcase/go_xcat/case1 +++ b/xCAT-test/autotest/testcase/go_xcat/case1 @@ -1,6 +1,6 @@ start:go_xcat_noinput description:test go_xcat without any input parameters -label:others,go-xcat +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat xcat-buildkit xcat-genesis-scripts xcat-genesis-base-amd64 xcat-genesis-base-ppc64 -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -36,7 +36,7 @@ end start:go_xcat_with_x description:test go_xcat with the option -x version -y install -label:others,go-xcat +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat xcat-buildkit xcat-genesis-scripts xcat-genesis-base-amd64 xcat-genesis-base-ppc64 -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -78,7 +78,7 @@ end start:go_xcat_with_xcat-version-1 description:test go_xcat with the option --xcat-version=devel install -label:others,go-xcat +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat xcat-buildkit xcat-genesis-scripts xcat-genesis-base-amd64 xcat-genesis-base-ppc64 -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -113,7 +113,7 @@ end start:go_xcat_with_xcat-version-2 description:test go_xcat with the option --xcat-version=$MIGRATION2_VERSION install -label:others,go-xcat +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi diff --git a/xCAT-test/autotest/testcase/go_xcat/case2 b/xCAT-test/autotest/testcase/go_xcat/case2 index 1b354f952..4d4f1f809 100644 --- a/xCAT-test/autotest/testcase/go_xcat/case2 +++ b/xCAT-test/autotest/testcase/go_xcat/case2 @@ -1,6 +1,6 @@ start:go_xcat_online_repo_case1 description:test go_xcat with the option --xcat-core=http://xcat.org/path/to/xcat-core.repo install. This case is only for rh and suse -label:others,go-xcat +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -31,7 +31,7 @@ end start:go_xcat_online_repo_case2 description:test go_xcat with the option --xcat-core=http://xcat.org/path/to/xcat-core install -label:others,go-xcat +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -67,7 +67,7 @@ end start:go_xcat_online_repo_case3 description:test go_xcat with the option --xcat-core=http://xcat.org/path/to/xcat-core.tar.bz2 install -label:others,go-xcat +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -103,7 +103,7 @@ end start:go_xcat_online_repo_case4 description:test go_xcat with the option --xcat-core=http://xcat.org/path/to/xcat-core.repo --xcat-dep=http://xcat.org/path/to/xcat-dep.repo install. This is for rh and suse. -label:others,go-xcat +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -134,7 +134,7 @@ end start:go_xcat_online_repo_case5 description:test go_xcat with the option --xcat-core=http://xcat.org/path/to/xcat-core --xcat-dep=http://xcat.org/path/to/xcat-dep install -label:others,go-xcat +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -169,7 +169,7 @@ end start:go_xcat_online_repo_case6 description:test go_xcat with the option --xcat-core=http://xcat.org/path/to/xcat-core.tar.bz2 --xcat-dep=http://xcat.org/path/to/xcat-dep.tar.bz2 install -label:others,go-xcat +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat xcat-buildkit xcat-genesis-scripts xcat-genesis-base-amd64 xcat-genesis-base-ppc64 -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi diff --git a/xCAT-test/autotest/testcase/go_xcat/case4 b/xCAT-test/autotest/testcase/go_xcat/case4 index b765c0a57..7f3387d15 100644 --- a/xCAT-test/autotest/testcase/go_xcat/case4 +++ b/xCAT-test/autotest/testcase/go_xcat/case4 @@ -1,6 +1,6 @@ start:go_xcat_update_case1 description:test go_xcat with the option update -label:others,go-xcat +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi From 6146a30acccb2955915603ceece6bef1fe46d676 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 28 Nov 2018 22:33:43 -0500 Subject: [PATCH 118/121] Additional info display for rspconfig (#5803) * Additional info display for rspconfig * Changes for review comments * Better message suggestions * Fix tidy look --- .../agent/hwctl/executor/openbmc_bmcconfig.py | 20 ++++++++++++------- .../lib/python/agent/hwctl/openbmc_client.py | 10 ++++++---- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_bmcconfig.py b/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_bmcconfig.py index b5746eeff..19b990228 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_bmcconfig.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_bmcconfig.py @@ -379,6 +379,8 @@ rmdir \"/tmp/$userid\" \n") except (SelfServerException, SelfClientException) as e: self.callback.error(e.message, node) + self.callback.info("%s: BMC password changed. Update 'bmcpasswd' for the node or the 'passwd' table with the new password." % node) + def _set_apis_values(self, key, value, **kw): node = kw['node'] obmc = openbmc.OpenBMCRest(name=node, nodeinfo=kw['nodeinfo'], messager=self.callback, @@ -430,8 +432,8 @@ rmdir \"/tmp/$userid\" \n") def _print_bmc_netinfo(self, node, ip, netmask, gateway, vlan): - self.callback.info('%s: BMC IP: %s'% (node, ip)) - self.callback.info('%s: BMC Netmask: %s' % (node, netmask)) + self.callback.info('%s: BMC IP: %s' % (node, ip)) + self.callback.info('%s: BMC Netmask: %s' % (node, netmask)) self.callback.info('%s: BMC Gateway: %s' % (node, gateway)) if vlan: self.callback.info('%s: BMC VLAN ID: %s' % (node, vlan)) @@ -440,6 +442,7 @@ rmdir \"/tmp/$userid\" \n") node = kw['node'] node_info = kw['nodeinfo'] + zeroconf = "Unknown" obmc = openbmc.OpenBMCRest(name=node, nodeinfo=node_info, messager=self.callback, debugmode=self.debugmode, verbose=self.verbose) @@ -451,7 +454,7 @@ rmdir \"/tmp/$userid\" \n") return if not netinfo: - return self.callback.error("No network information get", node) + return self.callback.error("Can not get network information", node) if 'error' in netinfo: return self.callback.info('%s: %s' % (node, netinfo['error'])) @@ -470,6 +473,7 @@ rmdir \"/tmp/$userid\" \n") origin_type = netinfo[origin_nic]['ipsrc'] origin_ip_obj = netinfo[origin_nic]['ipobj'] + zeroconf = netinfo[origin_nic]['zeroconf'] if vlan: pre_nic = nic.split('_')[0] @@ -482,6 +486,8 @@ rmdir \"/tmp/$userid\" \n") nic = pre_nic + '_' + vlan try: + # Display Zero Config information in case IP setting fails or set IP is not accessible + self.callback.info('%s: Setting BMC IP configuration... [Zero Config IP: %s]' % (node, zeroconf)) obmc.set_netinfo(nic, ip, prefix, gateway) sleep( 5 ) nic_netinfo = obmc.get_nic_netinfo(nic) @@ -490,7 +496,7 @@ rmdir \"/tmp/$userid\" \n") return if not nic_netinfo: - return self.callback.error('Did not get info for NIC %s' % nic, node) + return self.callback.error('Can not get info for NIC %s' % nic, node) set_success = False for net_id, attr in nic_netinfo.items(): @@ -500,7 +506,7 @@ rmdir \"/tmp/$userid\" \n") set_success = True if not set_success: - return self.callback.error('Config BMC IP failed', node) + return self.callback.error('Setting BMC IP configuration failed. [Zero Config IP: %s]' % zeroconf, node) try: if origin_type == 'DHCP': @@ -508,7 +514,7 @@ rmdir \"/tmp/$userid\" \n") elif origin_type == 'Static': obmc.delete_ip_object(origin_nic, origin_ip_obj) else: - self.callback.error('Get wrong Origin type %s for NIC %s IP object %s' % (origin_type, nic, origin_ip_obj), node) + self.callback.error('Got wrong origin type %s for NIC %s IP object %s' % (origin_type, nic, origin_ip_obj), node) except (SelfServerException, SelfClientException) as e: self.callback.error(e.message, node) @@ -525,7 +531,7 @@ rmdir \"/tmp/$userid\" \n") self.callback.error(e.message, node) return if not netinfo: - return self.callback.error("No network information get", node) + return self.callback.error("Can not get network information", node) defaultgateway = "n/a" bmchostname = "" if 'defaultgateway' in netinfo: diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py index 32f081d06..c244abc40 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py @@ -900,13 +900,15 @@ class OpenBMCRest(object): continue dev,match,netid = k.partition("/ipv4/") if netid: - if 'LinkLocal' in v["Origin"] or v["Address"].startswith("169.254"): - msg = "Found LinkLocal address %s for interface %s, Ignoring..." % (v["Address"], dev) - self._print_record_log(msg, 'get_netinfo') - continue nicid = dev.split('/')[-1] if nicid not in netinfo: netinfo[nicid] = {} + if 'LinkLocal' in v["Origin"] or v["Address"].startswith("169.254"): + msg = "Found LinkLocal address %s for interface %s, Ignoring..." % (v["Address"], dev) + self._print_record_log(msg, 'get_netinfo') + # Save Zero Conf information + netinfo[nicid]["zeroconf"] = v["Address"] + continue if 'ip' in netinfo[nicid]: msg = "%s: Another valid ip %s found." % (node, v["Address"]) self._print_record_log(msg, 'get_netinfo') From 046531394a354eea0bbdd6f637df7847bbdfb176 Mon Sep 17 00:00:00 2001 From: huweihua Date: Thu, 29 Nov 2018 00:14:33 -0500 Subject: [PATCH 119/121] fix for issue5848 --- xCAT-test/autotest/testcase/go_xcat/case0 | 14 +++++++------- xCAT-test/autotest/testcase/go_xcat/case1 | 8 ++++---- xCAT-test/autotest/testcase/go_xcat/case2 | 8 ++++---- xCAT-test/autotest/testcase/go_xcat/case4 | 2 +- xCAT-test/autotest/testcase/install_xCAT/case0 | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/xCAT-test/autotest/testcase/go_xcat/case0 b/xCAT-test/autotest/testcase/go_xcat/case0 index d8174c0bd..7af2a8a04 100644 --- a/xCAT-test/autotest/testcase/go_xcat/case0 +++ b/xCAT-test/autotest/testcase/go_xcat/case0 @@ -17,7 +17,7 @@ cmd:xdsh $$CN "cd /; tar -jxf /xcat-core.tar.bz2" check:rc==0 cmd:xdsh $$CN "cd /xcat-core; ./mklocalrepo.sh" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -56,7 +56,7 @@ cmd:xdsh $$CN "cd /; scp -r $$MN:/core-*-snap.tar.bz2 /xcat-core.tar.bz2" check:rc==0 cmd:xdsh $$CN "cd /; tar -jxf /xcat-core.tar.bz2" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -95,7 +95,7 @@ cmd:xdsh $$CN "cd /; scp -r $$MN:/core-*-snap.tar.bz2 /xcat-core.tar.bz2" check:rc==0 cmd:xdsh $$CN "cd /; bunzip2 /xcat-core.tar.bz2" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -134,7 +134,7 @@ cmd:xdsh $$CN "cd /; scp -r $$MN:/core-*-snap.tar.bz2 /xcat-core.tar.bz2" check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/xcat-dep*.tar.bz2 /xcat-dep.tar.bz2" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -181,7 +181,7 @@ cmd:xdsh $$CN "cd /; tar -jxf /xcat-core.tar.bz2" check:rc==0 cmd:xdsh $$CN "cd /xcat-core; ./mklocalrepo.sh" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -224,7 +224,7 @@ cmd:xdsh $$CN "cd /; tar -jxf /xcat-dep.tar.bz2" check:rc==0 cmd:xdsh $$CN "cd /; tar -jxf /xcat-core.tar.bz2" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -261,7 +261,7 @@ cmd:xdsh $$CN "cd /; scp -r $$MN:/core-*-snap.tar.bz2 /xcat-core.tar.bz2" check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/xcat-dep*.tar.bz2 /xcat-dep.tar.bz2" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi diff --git a/xCAT-test/autotest/testcase/go_xcat/case1 b/xCAT-test/autotest/testcase/go_xcat/case1 index 2e4b58028..de11a1a6a 100644 --- a/xCAT-test/autotest/testcase/go_xcat/case1 +++ b/xCAT-test/autotest/testcase/go_xcat/case1 @@ -12,7 +12,7 @@ cmd:xdsh $$CN "cd /; rm -rf /go-xcat" check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -47,7 +47,7 @@ cmd:xdsh $$CN "cd /; rm -rf /go-xcat" check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -89,7 +89,7 @@ cmd:xdsh $$CN "cd /; rm -rf /go-xcat" check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -124,7 +124,7 @@ cmd:xdsh $$CN "cd /; rm -rf /go-xcat" check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi diff --git a/xCAT-test/autotest/testcase/go_xcat/case2 b/xCAT-test/autotest/testcase/go_xcat/case2 index 4d4f1f809..058a19de3 100644 --- a/xCAT-test/autotest/testcase/go_xcat/case2 +++ b/xCAT-test/autotest/testcase/go_xcat/case2 @@ -42,7 +42,7 @@ cmd:xdsh $$CN "cd /; rm -rf /go-xcat" check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -78,7 +78,7 @@ cmd:xdsh $$CN "cd /; rm -rf /go-xcat" check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -146,7 +146,7 @@ check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 cmd:dir="__GETNODEATTR($$CN,os)__"; if grep SUSE /etc/*release;then os=`echo $dir |cut -c 1-6` && xdsh $$CN "cd /xcat-dep/$os/__GETNODEATTR($$CN,arch)__/; ./mklocalrepo.sh" ; elif grep "Red Hat" /etc/*release;then os=`echo $dir |cut -c 1-2` && xdsh $$CN "cd /xcat-dep/$os`echo __GETNODEATTR($$CN,os)__ | cut -c6`/__GETNODEATTR($$CN,arch)__/; ./mklocalrepo.sh"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cd /xcat-dep; ./mklocalrepo.sh"; else echo "Sorry,this is not supported os"; fi -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -182,7 +182,7 @@ cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 cmd:cp /xcat-dep-*.tar.bz2 /install/ check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi diff --git a/xCAT-test/autotest/testcase/go_xcat/case4 b/xCAT-test/autotest/testcase/go_xcat/case4 index 7f3387d15..c5603a64b 100644 --- a/xCAT-test/autotest/testcase/go_xcat/case4 +++ b/xCAT-test/autotest/testcase/go_xcat/case4 @@ -15,7 +15,7 @@ cmd:xdsh $$CN "cd /; scp -r $$MN:/core-*-snap.tar.bz2 /xcat-core.tar.bz2" check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/xcat-dep*.tar.bz2 /xcat-dep.tar.bz2" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi diff --git a/xCAT-test/autotest/testcase/install_xCAT/case0 b/xCAT-test/autotest/testcase/install_xCAT/case0 index 9eb7b5606..80d030fa9 100644 --- a/xCAT-test/autotest/testcase/install_xCAT/case0 +++ b/xCAT-test/autotest/testcase/install_xCAT/case0 @@ -28,7 +28,7 @@ description:install xCAT with go-xcat tool in a fresh environment for ubuntu label:xcat_install os:Linux stop:yes -cmd:arc_all=`uname -a`; code=`lsb_release -sc`;if [[ $arc_all =~ "ppc64le" ]]; then arch="ppc64el";else arch="x86_64";fi; cp "/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-$arch.sources.list" "/etc/apt/sources.list" +cmd:arc_all=`uname -a`; code=`lsb_release -sc`;if [[ $arc_all =~ "ppc64le" ]]; then arch="ppc64el";else arch="x86_64";fi; cp "/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-$arch.sources.list" "/etc/apt/sources.list" cmd:apt-get clean;apt-get update check:rc==0 cmd:cp /core-*-snap.tar.bz2 /install_xCAT_xcat-core.tar.bz2 From 8f3c3f7677b393edead972c33016539e6ef6268a Mon Sep 17 00:00:00 2001 From: zet809 Date: Fri, 30 Nov 2018 08:19:42 +0800 Subject: [PATCH 120/121] Fix issue 5150: tabch and tabdump commands can not deal with invalid attribute names (#5846) * Fix issue 5150: tabch and tabdump commands can not deal with invalid attribute names * reuse buildWhereClause for key retriving --- perl-xCAT/xCAT/Table.pm | 12 +++++++++++- xCAT-server/lib/xcat/plugins/tabutils.pm | 22 ++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 2b3d50fc1..9dc46944b 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -4330,8 +4330,10 @@ sub delimitcol { #-------------------------------------------------------------------------------- sub buildWhereClause { my $attrvalstr = shift; # array of atrval strings + my $getkeysonly = shift; my $whereclause; # Where Clause my $firstpass = 1; + my @gotkeys = (); foreach my $m (@{$attrvalstr}) { my $attr; @@ -4372,6 +4374,9 @@ sub buildWhereClause { ($attr, $val) = split />/, $m, 2; $operator = ' > '; } else { + if (defined($getkeysonly)) { + return "Unsupported operator:$m on -w flag input"; + } xCAT::MsgUtils->message("S", "Unsupported operator:$m on -w flag input, could not build a Where Clause."); $whereclause = ""; return $whereclause; @@ -4386,7 +4391,12 @@ sub buildWhereClause { #$whereclause .="\')"; $whereclause .= "\'"; - + if (defined($getkeysonly)) { + push @gotkeys, $attr; + } + } + if (defined($getkeysonly)) { + return \@gotkeys; } return $whereclause; diff --git a/xCAT-server/lib/xcat/plugins/tabutils.pm b/xCAT-server/lib/xcat/plugins/tabutils.pm index 0d428a5d9..64f3933f8 100644 --- a/xCAT-server/lib/xcat/plugins/tabutils.pm +++ b/xCAT-server/lib/xcat/plugins/tabutils.pm @@ -732,6 +732,18 @@ sub tabdump foreach my $w (@{$OPTW}) { # get each attr=val push @attrarray, $w; } + my $keys = xCAT::Table::buildWhereClause(\@attrarray, "1"); + if (ref($keys) ne 'ARRAY') { + $cb->({ error => ["$keys"], errorcode => [1] }); + return; + } else { + foreach my $k (@$keys) { + unless (grep /$k/, @{ $xCAT::Schema::tabspec{$table}->{cols} }) { + $cb->({ error => ["No column \"$k\" in table \"$table\""], errorcode => [1] }); + return; + } + } + } @ents = $tabh->getAllAttribsWhere(\@attrarray, 'ALL'); @$recs = (); foreach my $e (@ents) { @@ -2370,6 +2382,16 @@ sub tabch { } } + my $err_found = 0; + for my $k (keys %keyhash) { + unless (grep /$k/, @{ $xCAT::Schema::tabspec{$table}->{cols} }) { + $callback->({ error => ["No column \"$k\" in table \"$table\""], errorcode => [1] }); + $err_found = 1; + } + } + if ($err_found) { + return 1; + } #splice assignment if (grep /\+=/, $temp) { From 4aa090f6e1368e0b51edd614af41398edfc594fc Mon Sep 17 00:00:00 2001 From: cxhong Date: Thu, 29 Nov 2018 19:23:21 -0500 Subject: [PATCH 121/121] Determine NumberNodes in the command.log by the command requests (#5787) --- xCAT-server/lib/xcat/plugins/DBobjectdefs.pm | 44 +++++++++++++++----- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm index 91e4a49e9..2ac532e15 100755 --- a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm +++ b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm @@ -1709,9 +1709,11 @@ sub defmk $objTypeListsHash{$objk}{$obj} = 1; } } + my $numobjrequest = 0; OBJ: foreach my $obj (keys %::FINALATTRS) { + $numobjrequest++; my $type = $::FINALATTRS{$obj}{objtype}; # check to make sure we have type @@ -2034,16 +2036,19 @@ sub defmk if ($error) { my $rsp; - $rsp->{data}->[0] = "One or more errors occured when attempting to create or modify xCAT \nobject definitions."; + $rsp->{data}->[0] = "One or more errors occured when attempting to create or modify xCAT object definitions."; + $rsp->{numofnodes}->[0] = $numobjrequest; xCAT::MsgUtils->message("E", $rsp, $::callback); return 1; } else { my $nodenum = 0; + my $totalnumobj = 0; my $ret = 0; my @nodes_updated = (); foreach my $node (keys %::FINALATTRS) { + $totalnumobj++; if ($::FINALATTRS{$node}{updated}) { $nodenum++; push @nodes_updated, $node; @@ -2065,6 +2070,7 @@ sub defmk $rsp->{data}->[$n] = "$o"; $n++; } + $rsp->{numofnodes}->[0] = $totalnumobj; if ($n > 1) { # Some objects were created ($n was increased), report as success $rsp->{data}->[0] = "The database was updated for the following objects:"; @@ -2078,9 +2084,9 @@ sub defmk } my $rsp; $rsp->{data}->[0] = "$nodenum object definitions have been created or modified."; + $rsp->{numofnodes}->[0] = $totalnumobj; if ($nodenum > 0) { # Some objects were created, report as success - $rsp->{numofnodes}->[0] = $nodenum; xCAT::MsgUtils->message("I", $rsp, $::callback); } else { @@ -2385,9 +2391,10 @@ sub defch } my $nodewithdomain; my $invalidobjname = (); + my $numobjrequest = 0; foreach my $obj (keys %::FINALATTRS) { - + $numobjrequest++; my $isDefined = 0; my $type = $::FINALATTRS{$obj}{objtype}; my %attrhash; @@ -2919,7 +2926,8 @@ sub defch if ($error) { my $rsp; - $rsp->{data}->[0] = "One or more errors occured when attempting to create or modify xCAT \nobject definitions."; + $rsp->{data}->[0] = "One or more errors occured when attempting to create or modify xCAT object definitions."; + $rsp->{numofnodes}->[0] = $numobjrequest; xCAT::MsgUtils->message("E", $rsp, $::callback); return 1; } @@ -2928,7 +2936,9 @@ sub defch my $nodenum = 0; my $ret = 0; my @nodes_updated = (); + my $totalnumobj = 0; foreach my $node (keys %::FINALATTRS) { + $totalnumobj++; if ($::FINALATTRS{$node}{updated}) { $nodenum++; push @nodes_updated, $node; @@ -2955,6 +2965,7 @@ sub defch } else { $rsp->{data}->[0] = "No database was updated"; } + $rsp->{numofnodes}->[0] = $totalnumobj; xCAT::MsgUtils->message("I", $rsp, $::callback); } else @@ -2963,10 +2974,10 @@ sub defch if ($nodenum) { $rsp->{data}->[0] = "$nodenum object definitions have been created or modified."; - $rsp->{numofnodes}->[0] = $nodenum; } else { $rsp->{data}->[0] = "No object definitions have been created or modified."; } + $rsp->{numofnodes}->[0] = $totalnumobj; xCAT::MsgUtils->message("I", $rsp, $::callback); if (scalar(keys %newobjects) > 0) { @@ -3786,6 +3797,8 @@ sub defls my $numobjects = 0; # keep track of how many object we want to display # for each type + my $totalnumobj = 0; + foreach my $type (@::clobjtypes) { # Check if -i specifies valid attributes @@ -3904,6 +3917,7 @@ sub defls # for each object foreach my $obj (sort keys %defhash) { + $totalnumobj++; # include all the obj unless ($obj) { @@ -4157,8 +4171,15 @@ sub defls # Display the definition of objects if (defined($rsp_info->{data}) && scalar(@{ $rsp_info->{data} }) > 0) { - $rsp_info->{numofnodes}->[0] = $numobjects; + $rsp_info->{numofnodes}->[0] = $totalnumobj; xCAT::MsgUtils->message("I", $rsp_info, $::callback); + } else { + if ( $totalnumobj > 0) { + my $rsp; + $rsp->{data}->[0] = "No object definitions have been found"; + $rsp->{numofnodes}->[0] = $totalnumobj; + xCAT::MsgUtils->message("I", $rsp, $::callback); + } } return 0; @@ -4306,9 +4327,11 @@ sub defrm # the memberlist nodes must be updated. my $numobjects = 0; + my $totalnumobj = 0; my %objTypeLists; foreach my $obj (keys %objhash) { + $totalnumobj++; my $objtype = $objhash{$obj}; if (!defined($objTypeLists{$objtype})) # Do no call getObjectsOfType for the same objtype more than once. { @@ -4504,11 +4527,11 @@ sub defrm { if ($numobjects > 0) { + my $rsp; if ($::verbose) { # give results - my $rsp; $rsp->{data}->[0] = "The following objects were removed:"; xCAT::MsgUtils->message("I", $rsp, $::callback); @@ -4518,16 +4541,14 @@ sub defrm $rsp->{data}->[$n] = "$o"; $n++; } - xCAT::MsgUtils->message("I", $rsp, $::callback); } else { - my $rsp; my $nodenum = scalar(keys %objhash); $rsp->{data}->[0] = "$nodenum object definitions have been removed."; - $rsp->{numofnodes}->[0] = $nodenum; - xCAT::MsgUtils->message("I", $rsp, $::callback); } + $rsp->{numofnodes}->[0] = $totalnumobj; + xCAT::MsgUtils->message("I", $rsp, $::callback); # Give a warning message to the user to remove the children of the node. for my $tn (keys %objhash) { @@ -4541,6 +4562,7 @@ sub defrm else { my $rsp; + $rsp->{numofnodes}->[0] = $totalnumobj; $rsp->{data}->[0] = "No objects have been removed from the xCAT database."; xCAT::MsgUtils->message("I", $rsp, $::callback); }