2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-05 19:15:13 +00:00

Comments from ertao

This commit is contained in:
Casandra Qiu
2019-01-02 14:02:00 -05:00
parent 530399d598
commit 378447afb9

View File

@@ -110,7 +110,7 @@ sub execute_dcp
if (!scalar(%resolved_targets))
{
my $rsp = {};
$rsp->{error}->[0] = "No hosts in node list 1";
$rsp->{error}->[0] = "DCP: No hosts in node list 1";
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK, 1);
return ++$result;
}
@@ -368,7 +368,7 @@ sub execute_dsh
if (!scalar(%resolved_targets))
{
my $rsp = {};
$rsp->{error}->[0] = " No hosts in node list 2";
$rsp->{error}->[0] = " DSH: No hosts in node list 2";
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK, 1);
return ++$result;
}
@@ -6300,6 +6300,7 @@ sub run_always_rsync_postscripts
my @hosts = @$hostnames;
my @newoutput = ();
my $dshparms;
foreach my $postsfile (@::alwayspostscripts) {
my $tmppostfile = $postsfile;
@@ -6319,24 +6320,23 @@ sub run_always_rsync_postscripts
my $index = 0;
my $key1_ref = $$options{'destDir_srcFile'}{$host}->{$key}->{$key1};
if (ref $key1_ref eq 'ARRAY') { #stored as ARRAY for same_dest_name
while (my $src_file =$$options{'destDir_srcFile'}{$host}->{$key}->{$key1}->[$index] ) {
while (my $src_file =$key1_ref->[$index] ) {
if ($src_file eq $tmppostfile) {
push(@{ $dshparms->{'postscripts'}{$postsfile} }, $host);
}
$index++;
}
} else { #stroed as hash table for diff_dest_name
my %src_hash = %{ $$options{'destDir_srcFile'}{$host}{$key}{$key1} };
foreach my $src_file (keys %src_hash) {
foreach my $src_file (keys %{$key1_ref}) {
if ($src_file eq $tmppostfile) {
push(@{ $dshparms->{'postscripts'}{$postsfile} }, $host);
}
}
}
}
}
}
}
} #end else
} #end if
} #end foreach key1
} #end foreach key
} #end foreach host
# now if we have postscripts to run, run xdsh
my $out;