From 26e52388376dc0a81a89470fb78880975f590756 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 13 Jul 2022 10:27:34 -0400 Subject: [PATCH 01/40] Fix mkvm man page formatting --- .../guides/admin-guides/references/man1/mkvm.1.rst | 10 +++++----- xCAT-client/pods/man1/mkvm.1.pod | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/source/guides/admin-guides/references/man1/mkvm.1.rst b/docs/source/guides/admin-guides/references/man1/mkvm.1.rst index 66884c9b1..0c72964c3 100644 --- a/docs/source/guides/admin-guides/references/man1/mkvm.1.rst +++ b/docs/source/guides/admin-guides/references/man1/mkvm.1.rst @@ -81,7 +81,7 @@ For PPC (with HMC) specific: ============================ -The first form of \ **mkvm**\ command creates new partition(s) with the same profile/resources as the partition specified by \ *singlenode*\ . The -i and \ *noderange*\ specify the starting numeric partition number and the \ *noderange*\ for the newly created partitions, respectively. The LHEA port numbers and the HCA index numbers will be automatically increased if they are defined in the source partition. +The first form of \ **mkvm**\ command creates new partition(s) with the same profile/resources as the partition specified by \ *singlenode*\ . The \ **-i**\ and \ *noderange*\ specify the starting numeric partition number and the \ *noderange*\ for the newly created partitions, respectively. The LHEA port numbers and the HCA index numbers will be automatically increased if they are defined in the source partition. The second form of this command duplicates all the partitions from the source specified by \ *profile*\ to the destination specified by \ *destcec*\ . The source and destination CECs can be managed by different HMCs. @@ -94,9 +94,9 @@ For PPC (using Direct FSP Management) specific: =============================================== -With option \ *full*\ , a partition using all the resources on a normal power machine will be created. +With option \ **-**\ **-full**\ , a partition using all the resources on a normal power machine will be created. -If no option is specified, a partition using the parameters specified with attributes such as 'vmcpus', 'vmmemory', 'vmphyslots', 'vmothersetting', 'vmnics', 'vmstorage' will be created. Those attributes can either be specified with '\*def' commands running before or be specified with this command. +If no option is specified, a partition using the parameters specified with attributes such as \ **vmcpus**\ , \ **vmmemory**\ , \ **vmphyslots**\ , \ **vmothersetting**\ , \ **vmnics**\ , \ **vmstorage**\ will be created. Those attributes can either be specified with '\*def' commands running before or be specified with this command. For KVM and VMware: @@ -148,9 +148,9 @@ OPTIONS \ **vmcpus=**\ \ *value*\ \ **vmmemory=**\ \ *value*\ \ **vmphyslots=**\ \ *value*\ \ **vmothersetting=**\ \ *value*\ \ **vmnics=**\ \ *value*\ \ **vmstorage=**\ \ *value*\ [\ **-**\ **-vios**\ ] - To specify the parameters which are used to create a partition. The \ *vmcpus*\ , \ *vmmemory*\ are necessary, and the value specified with this command have a more high priority. If the value of any of the three options is not specified, the corresponding value specified for the node object will be used. If any of the three attributes is neither specified with this command nor specified with the node object, error information will be returned. To reference to lsvm(1)|lsvm.1 for more information about 'drc_index' for \ *vmphyslots*\ . + To specify the parameters which are used to create a partition. The \ **vmcpus**\ , \ **vmmemory**\ are necessary, and the value specified with this command have a more high priority. If the value of any of the three options is not specified, the corresponding value specified for the node object will be used. If any of the three attributes is neither specified with this command nor specified with the node object, error information will be returned. To reference to lsvm(1)|lsvm.1 for more information about 'drc_index' for \ *vmphyslots*\ . - The option \ *vios*\ is used to specify the partition that will be created is a VIOS partition. If specified, the value for \ *vmstorage*\ shall be number which indicate the number of vSCSI server adapter will be created, and if no value specified for \ *vmphyslots*\ , all the physical slot of the power machine will be assigned to VIOS partition. If not specified, it shall be in form of \ *vios_name:server_slotid*\ to specify the vios and the virtual slot id of the vSCSI server adapter that will be connected from the Logical partition. + The option \ **vios**\ is used to specify the partition that will be created is a VIOS partition. If specified, the value for \ **vmstorage**\ shall be number which indicate the number of vSCSI server adapter will be created, and if no value specified for \ **vmphyslots**\ , all the physical slot of the power machine will be assigned to VIOS partition. If not specified, it shall be in form of \ **vios_name:server_slotid**\ to specify the vios and the virtual slot id of the vSCSI server adapter that will be connected from the Logical partition. diff --git a/xCAT-client/pods/man1/mkvm.1.pod b/xCAT-client/pods/man1/mkvm.1.pod index 6c3d47cc8..59e3cb690 100644 --- a/xCAT-client/pods/man1/mkvm.1.pod +++ b/xCAT-client/pods/man1/mkvm.1.pod @@ -42,7 +42,7 @@ B I [I] [B I] =head2 For PPC (with HMC) specific: -The first form of B command creates new partition(s) with the same profile/resources as the partition specified by I. The -i and I specify the starting numeric partition number and the I for the newly created partitions, respectively. The LHEA port numbers and the HCA index numbers will be automatically increased if they are defined in the source partition. +The first form of B command creates new partition(s) with the same profile/resources as the partition specified by I. The B<-i> and I specify the starting numeric partition number and the I for the newly created partitions, respectively. The LHEA port numbers and the HCA index numbers will be automatically increased if they are defined in the source partition. The second form of this command duplicates all the partitions from the source specified by I to the destination specified by I. The source and destination CECs can be managed by different HMCs. @@ -52,9 +52,9 @@ Note that the B command currently only supports creating standard LPARs, n =head2 For PPC (using Direct FSP Management) specific: -With option I, a partition using all the resources on a normal power machine will be created. +With option B<--full>, a partition using all the resources on a normal power machine will be created. -If no option is specified, a partition using the parameters specified with attributes such as 'vmcpus', 'vmmemory', 'vmphyslots', 'vmothersetting', 'vmnics', 'vmstorage' will be created. Those attributes can either be specified with '*def' commands running before or be specified with this command. +If no option is specified, a partition using the parameters specified with attributes such as B, B, B, B, B, B will be created. Those attributes can either be specified with '*def' commands running before or be specified with this command. =head2 For KVM and VMware: @@ -88,9 +88,9 @@ Request to create a new full system partition for each CEC. =item B I B I B I B I B I B I [B<--vios>] -To specify the parameters which are used to create a partition. The I, I are necessary, and the value specified with this command have a more high priority. If the value of any of the three options is not specified, the corresponding value specified for the node object will be used. If any of the three attributes is neither specified with this command nor specified with the node object, error information will be returned. To reference to L for more information about 'drc_index' for I. +To specify the parameters which are used to create a partition. The B, B are necessary, and the value specified with this command have a more high priority. If the value of any of the three options is not specified, the corresponding value specified for the node object will be used. If any of the three attributes is neither specified with this command nor specified with the node object, error information will be returned. To reference to L for more information about 'drc_index' for I. -The option I is used to specify the partition that will be created is a VIOS partition. If specified, the value for I shall be number which indicate the number of vSCSI server adapter will be created, and if no value specified for I, all the physical slot of the power machine will be assigned to VIOS partition. If not specified, it shall be in form of I to specify the vios and the virtual slot id of the vSCSI server adapter that will be connected from the Logical partition. +The option B is used to specify the partition that will be created is a VIOS partition. If specified, the value for B shall be number which indicate the number of vSCSI server adapter will be created, and if no value specified for B, all the physical slot of the power machine will be assigned to VIOS partition. If not specified, it shall be in form of B to specify the vios and the virtual slot id of the vSCSI server adapter that will be connected from the Logical partition. =item B<-f|--force> From d08312bebdcca29f1214029cfd24f5969bef9766 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 13 Jul 2022 10:44:23 -0400 Subject: [PATCH 02/40] Debug passed testcase count --- github_action_xcat_test.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index 9c23e0207..1ef292f3c 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -499,7 +499,7 @@ sub run_fast_regression_test{ $cmd = "sudo /opt/xcat/bin/xcattest -f $conf_file -t $case"; print "[run_fast_regression_test] run $x: $cmd\n"; @output = runcmd("$cmd"); - #print Dumper \@output; + print Dumper \@output; for(my $i = $#output; $i>-1; --$i){ if($output[$i] =~ /------END::(.+)::Failed/){ push @failcase, $1; From 72ee3d9ac9b8b2049750972a842959df558ae426 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 13 Jul 2022 11:12:07 -0400 Subject: [PATCH 03/40] Debug command output --- xCAT-test/xcattest | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index f6b55c3c0..bb4f7a1e4 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -1565,9 +1565,11 @@ sub setup_env_by_configure_file { my $cmd = undef; foreach $cmd (@{ $$config_ref{script_prev} }) { log_this($running_log_fd, "$cmd"); - &runcmd($cmd); + #MG + my @output = &runcmd($cmd); if ($::RUNCMD_RC != 0) { - $$error_ref = "Fail to run $cmd"; + $$error_ref = "Failed to run $cmd OUTPUT: @output"; + log_this($running_log_fd, "$cmd", "OUTPUT ", @output); return 1; } } From 359c7b349e961cab7f7443c2d9fe59d565fdd121 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 13 Jul 2022 11:27:26 -0400 Subject: [PATCH 04/40] Debug command output3 --- xCAT-test/xcattest | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index bb4f7a1e4..2735f37a6 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -1568,7 +1568,7 @@ sub setup_env_by_configure_file { #MG my @output = &runcmd($cmd); if ($::RUNCMD_RC != 0) { - $$error_ref = "Failed to run $cmd OUTPUT: @output"; + $$error_ref = "Failed1 to run $cmd OUTPUT: @output"; log_this($running_log_fd, "$cmd", "OUTPUT ", @output); return 1; } @@ -1582,9 +1582,9 @@ sub setup_env_by_configure_file { $cmd = $cmd . " $attr=$$config_ref{object}{$type}{$name}{$attr}"; } log_this($running_log_fd, "$cmd"); - runcmd($cmd); + my @output = runcmd($cmd); if ($::RUNCMD_RC != 0) { - $$error_ref = "Fail to run $cmd"; + $$error_ref = "Failed2 to run $cmd"; return 1; } } @@ -1601,9 +1601,9 @@ sub setup_env_by_configure_file { } } log_this($running_log_fd, "$cmd"); - &runcmd($cmd); + my @output = &runcmd($cmd); if ($::RUNCMD_RC != 0) { - $$error_ref = "Fail to run $cmd"; + $$error_ref = "Failed3 to run $cmd OUTPUT: @output"; return 1; } } From 344cf05f9c2ea14e559513834c61e4f0029c8eb3 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 13 Jul 2022 11:40:31 -0400 Subject: [PATCH 05/40] Debug command output4 --- xCAT-test/xcattest | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index 2735f37a6..3d0a8019f 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -178,7 +178,7 @@ if($search_expression){ print "------The total labels are:---------\n"; print Dumper \@total_label_set; print "------The case and its labels:-------\n"; - print Dumper \%case_label_map + print Dumper \%case_label_map; } } @@ -258,7 +258,7 @@ if (defined $list) { print "------The total labels are:---------\n"; print Dumper \@total_label_set; print "------The case and its labels:-------\n"; - print Dumper \%case_label_map + print Dumper \%case_label_map; } my %label_conut; my %case_label_str_map; @@ -1604,6 +1604,7 @@ sub setup_env_by_configure_file { my @output = &runcmd($cmd); if ($::RUNCMD_RC != 0) { $$error_ref = "Failed3 to run $cmd OUTPUT: @output"; + print Dumper \@output; return 1; } } From 40e024975dec097e71bb0227ab6786493be14875 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 13 Jul 2022 12:00:19 -0400 Subject: [PATCH 06/40] Debug command output5 --- xCAT-test/xcattest | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index 3d0a8019f..f6335de41 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -1689,9 +1689,14 @@ sub runcmd if ($?) { $rc = $?; + print "MG rc=" $rc; $rc = $rc >> 8; $::RUNCMD_RC = $rc; + print "MG RUNCMD_RC=" $::RUNCMD_RC; } + print Dumper \@$outref; + print Dumper \@outref; + print Dumper \$outref; chomp(@$outref); return @$outref; From 6eb9b5ef60d4b75ff37df8493fc32a536be0248a Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 13 Jul 2022 13:15:41 -0400 Subject: [PATCH 07/40] Debug command output6 --- xCAT-test/xcattest | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index f6335de41..f64ed7600 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -1689,10 +1689,10 @@ sub runcmd if ($?) { $rc = $?; - print "MG rc=" $rc; + print "MG rc=$rc"; $rc = $rc >> 8; $::RUNCMD_RC = $rc; - print "MG RUNCMD_RC=" $::RUNCMD_RC; + print "MG RUNCMD_RC=$::RUNCMD_RC"; } print Dumper \@$outref; print Dumper \@outref; From d3cbfa2b92a3bc3f5ea6c6322df85e17d9119fed Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 13 Jul 2022 13:29:37 -0400 Subject: [PATCH 08/40] Debug command output7 --- xCAT-test/xcattest | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index f64ed7600..d4545f398 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -1694,9 +1694,9 @@ sub runcmd $::RUNCMD_RC = $rc; print "MG RUNCMD_RC=$::RUNCMD_RC"; } - print Dumper \@$outref; - print Dumper \@outref; - print Dumper \$outref; + print "MG1 " . Dumper \@$outref; + print "MG2 " . Dumper @outref; + print "MG3 " . Dumper $outref; chomp(@$outref); return @$outref; From a07deab1ab1dd3df39c18dece47bd43cb4380939 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 13 Jul 2022 13:41:23 -0400 Subject: [PATCH 09/40] Debug command output8 --- xCAT-test/xcattest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index d4545f398..e40dd12f6 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -1695,7 +1695,7 @@ sub runcmd print "MG RUNCMD_RC=$::RUNCMD_RC"; } print "MG1 " . Dumper \@$outref; - print "MG2 " . Dumper @outref; + print "MG2 " . Dumper @$outref; print "MG3 " . Dumper $outref; chomp(@$outref); return @$outref; From 25de4415eb0fa3c3fcc7aa45a8e17ba1f4afb0ab Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 13 Jul 2022 14:11:33 -0400 Subject: [PATCH 10/40] Debug command output9 --- github_action_xcat_test.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index 1ef292f3c..90840e977 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -477,7 +477,7 @@ sub run_fast_regression_test{ @output = runcmd("cat $conf_file"); print Dumper \@output; - $cmd = "sudo /opt/xcat/bin/xcattest -s \"ci_test\" -l"; + $cmd = "sudo /opt/xcat/bin/xcattest -s \"ci_test\" -l | grep restorexcatdb_p"; my @caseslist = runcmd("$cmd"); if($::RUNCMD_RC){ print RED "[run_fast_regression_test] $cmd ....[Failed]\n"; From 96392c2785faafe3ffd6a180cb2622978e43bda0 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 13 Jul 2022 14:23:21 -0400 Subject: [PATCH 11/40] Debug command output10 --- xCAT-test/xcattest | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index e40dd12f6..e226b747a 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -1692,10 +1692,8 @@ sub runcmd print "MG rc=$rc"; $rc = $rc >> 8; $::RUNCMD_RC = $rc; - print "MG RUNCMD_RC=$::RUNCMD_RC"; + print " RUNCMD_RC=$::RUNCMD_RC\n"; } - print "MG1 " . Dumper \@$outref; - print "MG2 " . Dumper @$outref; print "MG3 " . Dumper $outref; chomp(@$outref); return @$outref; From b2e74483c7c7ba873b0ff4a132d70c7465b8288f Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 13 Jul 2022 14:50:12 -0400 Subject: [PATCH 12/40] Debug command output11 --- github_action_xcat_test.pl | 4 ++-- xCAT-test/xcattest | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index 90840e977..6403d9e71 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -515,11 +515,11 @@ sub run_fast_regression_test{ if($failnum){ my $log_str = join (",", @failcase ); - $check_result_str .= "> **FAST REGRESSION TEST Failed**: Totalcase $casenum Passed $passnum Failed $failnum FailedCases: $log_str. Please click ``Details`` label in ``Merge pull request`` box for detailed information"; + $check_result_str .= "> **FAST REGRESSION TEST Failed**: Totalcase $casenum Passed $passnum Failed $failnum FailedCases: $log_str. Please click ``Details`` label in ``Merge pull request`` box for detailed information\n"; print $check_result_str; return 1; }else{ - $check_result_str .= "> **FAST REGRESSION TEST Successful**: Totalcase $casenum Passed $passnum Failed $failnum"; + $check_result_str .= "> **FAST REGRESSION TEST Successful**: Totalcase $casenum Passed $passnum Failed $failnum\n"; print $check_result_str; } diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index e226b747a..56847b57e 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -1605,6 +1605,8 @@ sub setup_env_by_configure_file { if ($::RUNCMD_RC != 0) { $$error_ref = "Failed3 to run $cmd OUTPUT: @output"; print Dumper \@output; + my @output2 = &runcmd("lsdef -t site clustersite -i domain -c"); + print "MG_LSDEF:\n " . Dumper \@output2; return 1; } } From 313244045ae30e6408e32941a43fcfc74d5341e8 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 13 Jul 2022 15:15:54 -0400 Subject: [PATCH 13/40] Debug command output12 --- github_action_xcat_test.pl | 2 +- xCAT-test/xcattest | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index 6403d9e71..6187f5d9b 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -477,7 +477,7 @@ sub run_fast_regression_test{ @output = runcmd("cat $conf_file"); print Dumper \@output; - $cmd = "sudo /opt/xcat/bin/xcattest -s \"ci_test\" -l | grep restorexcatdb_p"; + $cmd = "sudo /opt/xcat/bin/xcattest -s \"ci_test\" -l | grep chdef_t"; my @caseslist = runcmd("$cmd"); if($::RUNCMD_RC){ print RED "[run_fast_regression_test] $cmd ....[Failed]\n"; diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index 56847b57e..18557ae69 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -1594,7 +1594,7 @@ sub setup_env_by_configure_file { if (exists $$config_ref{table}) { foreach my $type (keys %{ $$config_ref{table} }) { foreach my $name (keys %{ $$config_ref{table}{$type} }) { - $cmd = "chtab $$config_ref{table}{$type}{$name}{__KEY__}=$name"; + $cmd = "sudo chtab $$config_ref{table}{$type}{$name}{__KEY__}=$name"; foreach my $attr (keys %{ $$config_ref{table}{$type}{$name} }) { if ($attr ne '__KEY__') { $cmd = $cmd . " $type.$attr=$$config_ref{table}{$type}{$name}{$attr}"; @@ -1605,7 +1605,11 @@ sub setup_env_by_configure_file { if ($::RUNCMD_RC != 0) { $$error_ref = "Failed3 to run $cmd OUTPUT: @output"; print Dumper \@output; - my @output2 = &runcmd("lsdef -t site clustersite -i domain -c"); + print "MG Running verification lsdef"; + my @output2 = &runcmd("sudo lsdef -t site clustersite -i domain -c"); + print "MG_LSDEF:\n " . Dumper \@output2; + print "MG Running verification tabdump"; + my @output2 = &runcmd("sudo tabdump site"); print "MG_LSDEF:\n " . Dumper \@output2; return 1; } From 7a103ad705d24da13bc5b6c33b4f36889174809b Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 13 Jul 2022 15:46:51 -0400 Subject: [PATCH 14/40] Debug command output13 --- xCAT-test/xcattest | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index 18557ae69..571172a52 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -174,12 +174,12 @@ if($search_expression){ log_this($running_log_fd, "$error"); to_exit(1); } - if($xcatdebug){ + #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); @@ -1577,7 +1577,7 @@ sub setup_env_by_configure_file { if (exists $$config_ref{object}) { foreach my $type (keys %{ $$config_ref{object} }) { foreach my $name (keys %{ $$config_ref{object}{$type} }) { - $cmd = "chdef -t $type -o $name"; + $cmd = "sudo /opt/xcat/bin/chdef -t $type -o $name"; foreach my $attr (keys %{ $$config_ref{object}{$type}{$name} }) { $cmd = $cmd . " $attr=$$config_ref{object}{$type}{$name}{$attr}"; } @@ -1594,7 +1594,7 @@ sub setup_env_by_configure_file { if (exists $$config_ref{table}) { foreach my $type (keys %{ $$config_ref{table} }) { foreach my $name (keys %{ $$config_ref{table}{$type} }) { - $cmd = "sudo chtab $$config_ref{table}{$type}{$name}{__KEY__}=$name"; + $cmd = "sudo /opt/xcat/sbin/chtab $$config_ref{table}{$type}{$name}{__KEY__}=$name"; foreach my $attr (keys %{ $$config_ref{table}{$type}{$name} }) { if ($attr ne '__KEY__') { $cmd = $cmd . " $type.$attr=$$config_ref{table}{$type}{$name}{$attr}"; @@ -2128,7 +2128,7 @@ sub scan_existed_labels { my @labels = (); if ($line =~ /^start\s*:\s*(.*)/) { - $current_case_name = $1; + $current_case_name = $1; 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)); From 802567ad52b9843a7f47307caac96412f882ae18 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 13 Jul 2022 16:28:26 -0400 Subject: [PATCH 15/40] Debug command output14 --- github_action_xcat_test.pl | 4 +++- xCAT-test/xcattest | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index 6187f5d9b..a04e66075 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -344,6 +344,8 @@ sub install_xcat{ print "\n------Config xcat and verify xcat is working correctly-----\n"; @cmds = ("sudo -s /opt/xcat/share/xcat/scripts/setup-local-client.sh -f githubaction", "sudo -s /opt/xcat/sbin/chtab priority=1.1 policy.name=githubaction policy.rule=allow", + "sed -i '1i set -x' /etc/profile.d/xcat.sh ", + "cat /etc/profile.d/xcat.sh ", "/etc/profile.d/xcat.sh ", "sudo /opt/xcat/sbin/tabdump policy", "sudo /opt/xcat/sbin/tabdump site", @@ -477,7 +479,7 @@ sub run_fast_regression_test{ @output = runcmd("cat $conf_file"); print Dumper \@output; - $cmd = "sudo /opt/xcat/bin/xcattest -s \"ci_test\" -l | grep chdef_t"; + $cmd = "sudo /opt/xcat/bin/xcattest -s \"ci_test\" -l"; my @caseslist = runcmd("$cmd"); if($::RUNCMD_RC){ print RED "[run_fast_regression_test] $cmd ....[Failed]\n"; diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index 571172a52..3bc142d8d 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -1609,8 +1609,8 @@ sub setup_env_by_configure_file { my @output2 = &runcmd("sudo lsdef -t site clustersite -i domain -c"); print "MG_LSDEF:\n " . Dumper \@output2; print "MG Running verification tabdump"; - my @output2 = &runcmd("sudo tabdump site"); - print "MG_LSDEF:\n " . Dumper \@output2; + my @output3 = &runcmd("sudo tabdump site"); + print "MG_LSDEF:\n " . Dumper \@output3; return 1; } } From f5ac1fece8aac652b40c1f32668ccb89a70c7edb Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 13 Jul 2022 16:43:38 -0400 Subject: [PATCH 16/40] Debug command output15 --- github_action_xcat_test.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index a04e66075..b0040cc88 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -344,9 +344,10 @@ sub install_xcat{ print "\n------Config xcat and verify xcat is working correctly-----\n"; @cmds = ("sudo -s /opt/xcat/share/xcat/scripts/setup-local-client.sh -f githubaction", "sudo -s /opt/xcat/sbin/chtab priority=1.1 policy.name=githubaction policy.rule=allow", - "sed -i '1i set -x' /etc/profile.d/xcat.sh ", + "sudo sed -i '1i set -x' /etc/profile.d/xcat.sh ", "cat /etc/profile.d/xcat.sh ", "/etc/profile.d/xcat.sh ", + "echo \$PATH", "sudo /opt/xcat/sbin/tabdump policy", "sudo /opt/xcat/sbin/tabdump site", "sudo /opt/xcat/bin/lsxcatd -a", @@ -376,7 +377,7 @@ sub install_xcat{ } if($ret){ - $check_result_str .= "> **INSTALL XCAT ERROR** : Please click ``Details`` label in ``Merge pull request`` box for detailed information"; + $check_result_str .= "> **INSTALL XCAT ERROR** : Please click ``Details`` label in ``Merge pull request`` box for detailed information\n"; print $check_result_str; return 1; } From f5ee7934c7829815725da81065fbd863677973af Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 09:33:07 -0400 Subject: [PATCH 17/40] Debug command output16 --- github_action_xcat_test.pl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index b0040cc88..eff43cce3 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -346,11 +346,12 @@ sub install_xcat{ "sudo -s /opt/xcat/sbin/chtab priority=1.1 policy.name=githubaction policy.rule=allow", "sudo sed -i '1i set -x' /etc/profile.d/xcat.sh ", "cat /etc/profile.d/xcat.sh ", - "/etc/profile.d/xcat.sh ", "echo \$PATH", - "sudo /opt/xcat/sbin/tabdump policy", - "sudo /opt/xcat/sbin/tabdump site", - "sudo /opt/xcat/bin/lsxcatd -a", + "source /etc/profile.d/xcat.sh ", + "echo \$PATH", + "sudo tabdump policy", + "sudo tabdump site", + "sudo lsxcatd -a", "ls /opt/xcat/sbin", "sudo service xcatd status"); my $ret = 0; @@ -385,7 +386,9 @@ sub install_xcat{ $check_result_str .= "> **INSTALL XCAT SUCCESSFUL**"; print $check_result_str; } - return 0; + # MG + return 1; + # return 0; } From 4cde750b3f85f277d108fcceaf9959178303f798 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 09:45:05 -0400 Subject: [PATCH 18/40] Debug command output17 --- github_action_xcat_test.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index eff43cce3..824009dee 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -347,7 +347,7 @@ sub install_xcat{ "sudo sed -i '1i set -x' /etc/profile.d/xcat.sh ", "cat /etc/profile.d/xcat.sh ", "echo \$PATH", - "source /etc/profile.d/xcat.sh ", + "sudo source /etc/profile.d/xcat.sh ", "echo \$PATH", "sudo tabdump policy", "sudo tabdump site", From d316e205cf5602fb9583fd78a13720f6e7ff2ef3 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 10:02:52 -0400 Subject: [PATCH 19/40] Debug command output18 --- github_action_xcat_test.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index 824009dee..466bda32a 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -344,10 +344,11 @@ sub install_xcat{ print "\n------Config xcat and verify xcat is working correctly-----\n"; @cmds = ("sudo -s /opt/xcat/share/xcat/scripts/setup-local-client.sh -f githubaction", "sudo -s /opt/xcat/sbin/chtab priority=1.1 policy.name=githubaction policy.rule=allow", + "sudo sed -i '1i #!/bin/bash' /etc/profile.d/xcat.sh ", "sudo sed -i '1i set -x' /etc/profile.d/xcat.sh ", - "cat /etc/profile.d/xcat.sh ", + "cat /etc/profile.d/xcat.sh", "echo \$PATH", - "sudo source /etc/profile.d/xcat.sh ", + "/etc/profile.d/xcat.sh", "echo \$PATH", "sudo tabdump policy", "sudo tabdump site", From b0a32dd87e0573e5290074e7df95ff11d3a80a17 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 10:18:33 -0400 Subject: [PATCH 20/40] Debug command output19 --- github_action_xcat_test.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index 466bda32a..9aadd0903 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -344,8 +344,9 @@ sub install_xcat{ print "\n------Config xcat and verify xcat is working correctly-----\n"; @cmds = ("sudo -s /opt/xcat/share/xcat/scripts/setup-local-client.sh -f githubaction", "sudo -s /opt/xcat/sbin/chtab priority=1.1 policy.name=githubaction policy.rule=allow", - "sudo sed -i '1i #!/bin/bash' /etc/profile.d/xcat.sh ", "sudo sed -i '1i set -x' /etc/profile.d/xcat.sh ", + "sudo sed -i '1i #!/bin/bash' /etc/profile.d/xcat.sh ", + "sudo echo 'export PATH' >> /etc/profile.d/xcat.sh ", "cat /etc/profile.d/xcat.sh", "echo \$PATH", "/etc/profile.d/xcat.sh", From 8af1d7a302428b2808ef3d0f03961c0609c61694 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 10:31:57 -0400 Subject: [PATCH 21/40] Debug command output20 --- github_action_xcat_test.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index 9aadd0903..b8af79ea5 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -346,7 +346,7 @@ sub install_xcat{ "sudo -s /opt/xcat/sbin/chtab priority=1.1 policy.name=githubaction policy.rule=allow", "sudo sed -i '1i set -x' /etc/profile.d/xcat.sh ", "sudo sed -i '1i #!/bin/bash' /etc/profile.d/xcat.sh ", - "sudo echo 'export PATH' >> /etc/profile.d/xcat.sh ", + "sudo sed -i '\$aexport PATH' /etc/profile.d/xcat.sh ", "cat /etc/profile.d/xcat.sh", "echo \$PATH", "/etc/profile.d/xcat.sh", From 676d8dad4c34881bbf2993203ecd9071ffd28398 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 10:49:36 -0400 Subject: [PATCH 22/40] Debug command output21 --- github_action_xcat_test.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index b8af79ea5..8b1fe5b5c 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -346,10 +346,9 @@ sub install_xcat{ "sudo -s /opt/xcat/sbin/chtab priority=1.1 policy.name=githubaction policy.rule=allow", "sudo sed -i '1i set -x' /etc/profile.d/xcat.sh ", "sudo sed -i '1i #!/bin/bash' /etc/profile.d/xcat.sh ", - "sudo sed -i '\$aexport PATH' /etc/profile.d/xcat.sh ", "cat /etc/profile.d/xcat.sh", "echo \$PATH", - "/etc/profile.d/xcat.sh", + "/etc/profile.d/xcat.sh && export PATH", "echo \$PATH", "sudo tabdump policy", "sudo tabdump site", From 1a004cc223ad03d7f4dd0c12025f12142882d0ba Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 11:11:35 -0400 Subject: [PATCH 23/40] Debug command output22 --- github_action_xcat_test.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index 8b1fe5b5c..de239c54e 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -350,6 +350,8 @@ sub install_xcat{ "echo \$PATH", "/etc/profile.d/xcat.sh && export PATH", "echo \$PATH", + "export PATH=/opt/xcat/bin:/opt/xcat/sbin/:\$PATH" + "echo \$PATH", "sudo tabdump policy", "sudo tabdump site", "sudo lsxcatd -a", From d7566f900e43ee9cb2e1376fac9c011f5eb27ffe Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 11:31:05 -0400 Subject: [PATCH 24/40] Debug command output23 --- github_action_xcat_test.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index de239c54e..ce185015a 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -350,7 +350,7 @@ sub install_xcat{ "echo \$PATH", "/etc/profile.d/xcat.sh && export PATH", "echo \$PATH", - "export PATH=/opt/xcat/bin:/opt/xcat/sbin/:\$PATH" + "export PATH=/opt/xcat/bin:/opt/xcat/sbin/:\$PATH", "echo \$PATH", "sudo tabdump policy", "sudo tabdump site", From 663bd294f9ea06d4dfd311544e0c208c825fd87e Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 11:49:40 -0400 Subject: [PATCH 25/40] Debug command output24 --- .github/workflows/xcat_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/xcat_test.yml b/.github/workflows/xcat_test.yml index 781934c5e..2fed8e673 100644 --- a/.github/workflows/xcat_test.yml +++ b/.github/workflows/xcat_test.yml @@ -7,4 +7,5 @@ jobs: steps: - uses: actions/checkout@v3 - run: sudo apt-get install -y fakeroot reprepro devscripts debhelper libcapture-tiny-perl libjson-perl libsoap-lite-perl libdbi-perl libcgi-pm-perl quilt openssh-server dpkg looptools genometools software-properties-common + - run: echo "/opt/xcat/bin:/opt/xcat/sbin" >> $GITHUB_PATH - run: perl github_action_xcat_test.pl From 29c85cf0994df779f62a7ccc3e6ab5372b20cc58 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 12:05:22 -0400 Subject: [PATCH 26/40] Debug command output25 --- .github/workflows/xcat_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/xcat_test.yml b/.github/workflows/xcat_test.yml index 2fed8e673..0c151ae90 100644 --- a/.github/workflows/xcat_test.yml +++ b/.github/workflows/xcat_test.yml @@ -7,5 +7,5 @@ jobs: steps: - uses: actions/checkout@v3 - run: sudo apt-get install -y fakeroot reprepro devscripts debhelper libcapture-tiny-perl libjson-perl libsoap-lite-perl libdbi-perl libcgi-pm-perl quilt openssh-server dpkg looptools genometools software-properties-common - - run: echo "/opt/xcat/bin:/opt/xcat/sbin" >> $GITHUB_PATH + - run: echo "$GITHUB_WORKSPACE/opt/xcat/bin:$GITHUB_WORKSPACE/opt/xcat/sbin" >> $GITHUB_PATH - run: perl github_action_xcat_test.pl From 2029ce38f2c63475c2a883c8029fdab953a0da0b Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 12:31:21 -0400 Subject: [PATCH 27/40] Debug command output26 --- .github/workflows/xcat_test.yml | 1 + github_action_xcat_test.pl | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/xcat_test.yml b/.github/workflows/xcat_test.yml index 0c151ae90..573ec75fa 100644 --- a/.github/workflows/xcat_test.yml +++ b/.github/workflows/xcat_test.yml @@ -8,4 +8,5 @@ jobs: - uses: actions/checkout@v3 - run: sudo apt-get install -y fakeroot reprepro devscripts debhelper libcapture-tiny-perl libjson-perl libsoap-lite-perl libdbi-perl libcgi-pm-perl quilt openssh-server dpkg looptools genometools software-properties-common - run: echo "$GITHUB_WORKSPACE/opt/xcat/bin:$GITHUB_WORKSPACE/opt/xcat/sbin" >> $GITHUB_PATH + - run: echo "/opt/xcat/bin:/opt/xcat/sbin" >> $GITHUB_PATH - run: perl github_action_xcat_test.pl diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index ce185015a..22b2589c0 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -344,17 +344,17 @@ sub install_xcat{ print "\n------Config xcat and verify xcat is working correctly-----\n"; @cmds = ("sudo -s /opt/xcat/share/xcat/scripts/setup-local-client.sh -f githubaction", "sudo -s /opt/xcat/sbin/chtab priority=1.1 policy.name=githubaction policy.rule=allow", - "sudo sed -i '1i set -x' /etc/profile.d/xcat.sh ", - "sudo sed -i '1i #!/bin/bash' /etc/profile.d/xcat.sh ", - "cat /etc/profile.d/xcat.sh", + #"sudo sed -i '1i set -x' /etc/profile.d/xcat.sh ", + #"sudo sed -i '1i #!/bin/bash' /etc/profile.d/xcat.sh ", + #"cat /etc/profile.d/xcat.sh", + #"echo \$PATH", + #"/etc/profile.d/xcat.sh && export PATH", + #"echo \$PATH", + #"export PATH=/opt/xcat/bin:/opt/xcat/sbin/:\$PATH", "echo \$PATH", - "/etc/profile.d/xcat.sh && export PATH", - "echo \$PATH", - "export PATH=/opt/xcat/bin:/opt/xcat/sbin/:\$PATH", - "echo \$PATH", - "sudo tabdump policy", + "tabdump policy", "sudo tabdump site", - "sudo lsxcatd -a", + "lsxcatd -a", "ls /opt/xcat/sbin", "sudo service xcatd status"); my $ret = 0; From 8953e4ab862991c87dd98124189ea71018d5c47a Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 12:48:24 -0400 Subject: [PATCH 28/40] Debug command output27 --- github_action_xcat_test.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index 22b2589c0..f3d818aa5 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -342,8 +342,8 @@ sub install_xcat{ print "[install_xcat] $cmd ....[Pass]\n"; print "\n------Config xcat and verify xcat is working correctly-----\n"; - @cmds = ("sudo -s /opt/xcat/share/xcat/scripts/setup-local-client.sh -f githubaction", - "sudo -s /opt/xcat/sbin/chtab priority=1.1 policy.name=githubaction policy.rule=allow", + @cmds = (#"sudo -s /opt/xcat/share/xcat/scripts/setup-local-client.sh -f githubaction", + #"sudo -s /opt/xcat/sbin/chtab priority=1.1 policy.name=githubaction policy.rule=allow", #"sudo sed -i '1i set -x' /etc/profile.d/xcat.sh ", #"sudo sed -i '1i #!/bin/bash' /etc/profile.d/xcat.sh ", #"cat /etc/profile.d/xcat.sh", From 8832ae6c9df729316ecc4e774f8c97624cae9b76 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 13:05:56 -0400 Subject: [PATCH 29/40] Debug command output28 --- github_action_xcat_test.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index f3d818aa5..d4abb8bc5 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -342,7 +342,7 @@ sub install_xcat{ print "[install_xcat] $cmd ....[Pass]\n"; print "\n------Config xcat and verify xcat is working correctly-----\n"; - @cmds = (#"sudo -s /opt/xcat/share/xcat/scripts/setup-local-client.sh -f githubaction", + @cmds = ("sudo -s /opt/xcat/share/xcat/scripts/setup-local-client.sh -f", #"sudo -s /opt/xcat/sbin/chtab priority=1.1 policy.name=githubaction policy.rule=allow", #"sudo sed -i '1i set -x' /etc/profile.d/xcat.sh ", #"sudo sed -i '1i #!/bin/bash' /etc/profile.d/xcat.sh ", @@ -352,7 +352,7 @@ sub install_xcat{ #"echo \$PATH", #"export PATH=/opt/xcat/bin:/opt/xcat/sbin/:\$PATH", "echo \$PATH", - "tabdump policy", + ". /etc/profile.d/xcat.sh && tabdump policy", "sudo tabdump site", "lsxcatd -a", "ls /opt/xcat/sbin", From 1e1aeff63b8abc890d8fc8386d1182c58a9f4032 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 13:17:11 -0400 Subject: [PATCH 30/40] Debug command output29 --- github_action_xcat_test.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index d4abb8bc5..e5a3f7676 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -342,7 +342,7 @@ sub install_xcat{ print "[install_xcat] $cmd ....[Pass]\n"; print "\n------Config xcat and verify xcat is working correctly-----\n"; - @cmds = ("sudo -s /opt/xcat/share/xcat/scripts/setup-local-client.sh -f", + @cmds = ("sudo -s /opt/xcat/share/xcat/scripts/setup-local-client.sh", #"sudo -s /opt/xcat/sbin/chtab priority=1.1 policy.name=githubaction policy.rule=allow", #"sudo sed -i '1i set -x' /etc/profile.d/xcat.sh ", #"sudo sed -i '1i #!/bin/bash' /etc/profile.d/xcat.sh ", @@ -352,7 +352,7 @@ sub install_xcat{ #"echo \$PATH", #"export PATH=/opt/xcat/bin:/opt/xcat/sbin/:\$PATH", "echo \$PATH", - ". /etc/profile.d/xcat.sh && tabdump policy", + ". /etc/profile.d/xcat.sh && sudo tabdump policy", "sudo tabdump site", "lsxcatd -a", "ls /opt/xcat/sbin", From 778294254aaab899990964ed84bda3975415ae2e Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 13:18:30 -0400 Subject: [PATCH 31/40] Debug command output30 --- github_action_xcat_test.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index e5a3f7676..6879d5eb0 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -343,6 +343,7 @@ sub install_xcat{ print "\n------Config xcat and verify xcat is working correctly-----\n"; @cmds = ("sudo -s /opt/xcat/share/xcat/scripts/setup-local-client.sh", + "cat /etc/passwd", #"sudo -s /opt/xcat/sbin/chtab priority=1.1 policy.name=githubaction policy.rule=allow", #"sudo sed -i '1i set -x' /etc/profile.d/xcat.sh ", #"sudo sed -i '1i #!/bin/bash' /etc/profile.d/xcat.sh ", From c1a059ac907203de0c7575af2d33e6ddc2665954 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 13:30:35 -0400 Subject: [PATCH 32/40] Debug command output31 --- github_action_xcat_test.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index 6879d5eb0..846ea2f99 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -342,9 +342,9 @@ sub install_xcat{ print "[install_xcat] $cmd ....[Pass]\n"; print "\n------Config xcat and verify xcat is working correctly-----\n"; - @cmds = ("sudo -s /opt/xcat/share/xcat/scripts/setup-local-client.sh", + @cmds = ("sudo -s /opt/xcat/share/xcat/scripts/setup-local-client.sh -f runner", "cat /etc/passwd", - #"sudo -s /opt/xcat/sbin/chtab priority=1.1 policy.name=githubaction policy.rule=allow", + "sudo -s /opt/xcat/sbin/chtab priority=1.1 policy.name=runner policy.rule=allow", #"sudo sed -i '1i set -x' /etc/profile.d/xcat.sh ", #"sudo sed -i '1i #!/bin/bash' /etc/profile.d/xcat.sh ", #"cat /etc/profile.d/xcat.sh", From e47f12a833894c795ff6e4e81d858bdbed6be41a Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 13:44:31 -0400 Subject: [PATCH 33/40] Debug command output32 --- github_action_xcat_test.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index 846ea2f99..6550da50b 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -353,11 +353,11 @@ sub install_xcat{ #"echo \$PATH", #"export PATH=/opt/xcat/bin:/opt/xcat/sbin/:\$PATH", "echo \$PATH", - ". /etc/profile.d/xcat.sh && sudo tabdump policy", + ". /etc/profile.d/xcat.sh && tabdump policy", "sudo tabdump site", "lsxcatd -a", "ls /opt/xcat/sbin", - "sudo service xcatd status"); + "service xcatd status"); my $ret = 0; foreach my $cmd (@cmds){ print "\n[install_xcat] running $cmd.....\n"; From c5990db071d6963b6d6710c69a78ca98ca5b2fce Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 13:55:45 -0400 Subject: [PATCH 34/40] Debug command output33 --- github_action_xcat_test.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index 6550da50b..ae699cbf3 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -343,7 +343,6 @@ sub install_xcat{ print "\n------Config xcat and verify xcat is working correctly-----\n"; @cmds = ("sudo -s /opt/xcat/share/xcat/scripts/setup-local-client.sh -f runner", - "cat /etc/passwd", "sudo -s /opt/xcat/sbin/chtab priority=1.1 policy.name=runner policy.rule=allow", #"sudo sed -i '1i set -x' /etc/profile.d/xcat.sh ", #"sudo sed -i '1i #!/bin/bash' /etc/profile.d/xcat.sh ", @@ -354,7 +353,7 @@ sub install_xcat{ #"export PATH=/opt/xcat/bin:/opt/xcat/sbin/:\$PATH", "echo \$PATH", ". /etc/profile.d/xcat.sh && tabdump policy", - "sudo tabdump site", + ". /etc/profile.d/xcat.sh && sudo tabdump site", "lsxcatd -a", "ls /opt/xcat/sbin", "service xcatd status"); From 59ce93159300439224d734e796c77f1c534fbf8e Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 14:06:05 -0400 Subject: [PATCH 35/40] Debug command output34 --- .github/workflows/xcat_test.yml | 2 -- github_action_xcat_test.pl | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/xcat_test.yml b/.github/workflows/xcat_test.yml index 573ec75fa..781934c5e 100644 --- a/.github/workflows/xcat_test.yml +++ b/.github/workflows/xcat_test.yml @@ -7,6 +7,4 @@ jobs: steps: - uses: actions/checkout@v3 - run: sudo apt-get install -y fakeroot reprepro devscripts debhelper libcapture-tiny-perl libjson-perl libsoap-lite-perl libdbi-perl libcgi-pm-perl quilt openssh-server dpkg looptools genometools software-properties-common - - run: echo "$GITHUB_WORKSPACE/opt/xcat/bin:$GITHUB_WORKSPACE/opt/xcat/sbin" >> $GITHUB_PATH - - run: echo "/opt/xcat/bin:/opt/xcat/sbin" >> $GITHUB_PATH - run: perl github_action_xcat_test.pl diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index ae699cbf3..01a27fa77 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -353,7 +353,7 @@ sub install_xcat{ #"export PATH=/opt/xcat/bin:/opt/xcat/sbin/:\$PATH", "echo \$PATH", ". /etc/profile.d/xcat.sh && tabdump policy", - ". /etc/profile.d/xcat.sh && sudo tabdump site", + ". /etc/profile.d/xcat.sh && tabdump site", "lsxcatd -a", "ls /opt/xcat/sbin", "service xcatd status"); From 4764457cf291fd1feb6476726065ed5dd18ed7bf Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 14:20:41 -0400 Subject: [PATCH 36/40] Debug command output35 --- github_action_xcat_test.pl | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index 01a27fa77..9cdb18282 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -354,7 +354,7 @@ sub install_xcat{ "echo \$PATH", ". /etc/profile.d/xcat.sh && tabdump policy", ". /etc/profile.d/xcat.sh && tabdump site", - "lsxcatd -a", + ". /etc/profile.d/xcat.sh && lsxcatd -a", "ls /opt/xcat/sbin", "service xcatd status"); my $ret = 0; @@ -389,9 +389,7 @@ sub install_xcat{ $check_result_str .= "> **INSTALL XCAT SUCCESSFUL**"; print $check_result_str; } - # MG - return 1; - # return 0; + return 0; } @@ -486,7 +484,7 @@ sub run_fast_regression_test{ @output = runcmd("cat $conf_file"); print Dumper \@output; - $cmd = "sudo /opt/xcat/bin/xcattest -s \"ci_test\" -l"; + $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"; @@ -505,10 +503,10 @@ sub run_fast_regression_test{ my $failnum = 0; foreach my $case (@caseslist){ ++$x; - $cmd = "sudo /opt/xcat/bin/xcattest -f $conf_file -t $case"; + $cmd = "sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -f $conf_file -t $case'"; print "[run_fast_regression_test] run $x: $cmd\n"; @output = runcmd("$cmd"); - print Dumper \@output; + #print Dumper \@output; for(my $i = $#output; $i>-1; --$i){ if($output[$i] =~ /------END::(.+)::Failed/){ push @failcase, $1; From f2627be5d3acd13a573e2e0d2cdaccf060fb3f83 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 15:13:53 -0400 Subject: [PATCH 37/40] Debug command output36 --- github_action_xcat_test.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index 9cdb18282..3601fbde2 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -494,6 +494,7 @@ sub run_fast_regression_test{ }else{ print "[run_fast_regression_test] $cmd .....:\n"; print Dumper \@caseslist; + return 1; } my $casenum = @caseslist; From 67be19e97d6066d4ea4096949f850e9bcde4b1e5 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 15:31:16 -0400 Subject: [PATCH 38/40] Debug command output37 --- xCAT-test/xcattest | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index 3bc142d8d..d3469fdf2 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -1577,7 +1577,7 @@ sub setup_env_by_configure_file { if (exists $$config_ref{object}) { foreach my $type (keys %{ $$config_ref{object} }) { foreach my $name (keys %{ $$config_ref{object}{$type} }) { - $cmd = "sudo /opt/xcat/bin/chdef -t $type -o $name"; + $cmd = "chdef -t $type -o $name"; foreach my $attr (keys %{ $$config_ref{object}{$type}{$name} }) { $cmd = $cmd . " $attr=$$config_ref{object}{$type}{$name}{$attr}"; } @@ -1594,23 +1594,18 @@ sub setup_env_by_configure_file { if (exists $$config_ref{table}) { foreach my $type (keys %{ $$config_ref{table} }) { foreach my $name (keys %{ $$config_ref{table}{$type} }) { - $cmd = "sudo /opt/xcat/sbin/chtab $$config_ref{table}{$type}{$name}{__KEY__}=$name"; + $cmd = "chtab $$config_ref{table}{$type}{$name}{__KEY__}=$name"; foreach my $attr (keys %{ $$config_ref{table}{$type}{$name} }) { if ($attr ne '__KEY__') { $cmd = $cmd . " $type.$attr=$$config_ref{table}{$type}{$name}{$attr}"; } } log_this($running_log_fd, "$cmd"); - my @output = &runcmd($cmd); + #my @output = &runcmd($cmd); + &runcmd($cmd); if ($::RUNCMD_RC != 0) { - $$error_ref = "Failed3 to run $cmd OUTPUT: @output"; - print Dumper \@output; - print "MG Running verification lsdef"; - my @output2 = &runcmd("sudo lsdef -t site clustersite -i domain -c"); - print "MG_LSDEF:\n " . Dumper \@output2; - print "MG Running verification tabdump"; - my @output3 = &runcmd("sudo tabdump site"); - print "MG_LSDEF:\n " . Dumper \@output3; + #$$error_ref = "MG Failed3 to run $cmd OUTPUT: @output"; + $$error_ref = "Failed to run $cmd"; return 1; } } @@ -1700,7 +1695,7 @@ sub runcmd $::RUNCMD_RC = $rc; print " RUNCMD_RC=$::RUNCMD_RC\n"; } - print "MG3 " . Dumper $outref; + #print "MG3 " . Dumper $outref; chomp(@$outref); return @$outref; From 47ed0d3650811e3d96f4fa493d7288b1036cf990 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 15:47:11 -0400 Subject: [PATCH 39/40] Debug command output38 --- xCAT-test/xcattest | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index d3469fdf2..cac3ed4ad 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -174,12 +174,12 @@ if($search_expression){ log_this($running_log_fd, "$error"); to_exit(1); } - #if($xcatdebug){ + 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); @@ -1565,11 +1565,9 @@ sub setup_env_by_configure_file { my $cmd = undef; foreach $cmd (@{ $$config_ref{script_prev} }) { log_this($running_log_fd, "$cmd"); - #MG - my @output = &runcmd($cmd); + &runcmd($cmd); if ($::RUNCMD_RC != 0) { - $$error_ref = "Failed1 to run $cmd OUTPUT: @output"; - log_this($running_log_fd, "$cmd", "OUTPUT ", @output); + $$error_ref = "Failed to run $cmd"; return 1; } } @@ -1582,9 +1580,9 @@ sub setup_env_by_configure_file { $cmd = $cmd . " $attr=$$config_ref{object}{$type}{$name}{$attr}"; } log_this($running_log_fd, "$cmd"); - my @output = runcmd($cmd); + runcmd($cmd); if ($::RUNCMD_RC != 0) { - $$error_ref = "Failed2 to run $cmd"; + $$error_ref = "Failed to run $cmd"; return 1; } } @@ -1601,10 +1599,8 @@ sub setup_env_by_configure_file { } } log_this($running_log_fd, "$cmd"); - #my @output = &runcmd($cmd); &runcmd($cmd); if ($::RUNCMD_RC != 0) { - #$$error_ref = "MG Failed3 to run $cmd OUTPUT: @output"; $$error_ref = "Failed to run $cmd"; return 1; } @@ -1690,12 +1686,9 @@ sub runcmd if ($?) { $rc = $?; - print "MG rc=$rc"; $rc = $rc >> 8; $::RUNCMD_RC = $rc; - print " RUNCMD_RC=$::RUNCMD_RC\n"; } - #print "MG3 " . Dumper $outref; chomp(@$outref); return @$outref; From 071c6f1c2af4a4d9f09bd8ccc9c2c0a4c9cf154a Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 14 Jul 2022 16:13:42 -0400 Subject: [PATCH 40/40] Debug command output39 --- github_action_xcat_test.pl | 9 --------- 1 file changed, 9 deletions(-) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index 3601fbde2..e0b53e273 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -344,14 +344,6 @@ sub install_xcat{ print "\n------Config xcat and verify xcat is working correctly-----\n"; @cmds = ("sudo -s /opt/xcat/share/xcat/scripts/setup-local-client.sh -f runner", "sudo -s /opt/xcat/sbin/chtab priority=1.1 policy.name=runner policy.rule=allow", - #"sudo sed -i '1i set -x' /etc/profile.d/xcat.sh ", - #"sudo sed -i '1i #!/bin/bash' /etc/profile.d/xcat.sh ", - #"cat /etc/profile.d/xcat.sh", - #"echo \$PATH", - #"/etc/profile.d/xcat.sh && export PATH", - #"echo \$PATH", - #"export PATH=/opt/xcat/bin:/opt/xcat/sbin/:\$PATH", - "echo \$PATH", ". /etc/profile.d/xcat.sh && tabdump policy", ". /etc/profile.d/xcat.sh && tabdump site", ". /etc/profile.d/xcat.sh && lsxcatd -a", @@ -494,7 +486,6 @@ sub run_fast_regression_test{ }else{ print "[run_fast_regression_test] $cmd .....:\n"; print Dumper \@caseslist; - return 1; } my $casenum = @caseslist;