mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 09:13:08 +00:00
update comments and format for $::NOSYNCFILE related code
This commit is contained in:
parent
9fbd3e21eb
commit
2cd7ff2983
@ -1358,30 +1358,30 @@ sub updatenode
|
||||
# if immediate return of status not requested (PCM), then update the DB here
|
||||
# in one transaction, otherwise it is updated in getdata callback and buildnodestatus
|
||||
if (!(defined($request->{status})) || ($request->{status} ne "yes")) {
|
||||
# update the node status, this is done when -F -S -P are run
|
||||
# make sure the nodes only appear in one array good or bad
|
||||
&cleanstatusarrays;
|
||||
# update the node status, this is done when -F -S -P are run
|
||||
# make sure the nodes only appear in one array good or bad
|
||||
&cleanstatusarrays;
|
||||
if(@::SUCCESSFULLNODES)
|
||||
{
|
||||
|
||||
my $stat="synced";
|
||||
xCAT::TableUtils->setUpdateStatus(\@::SUCCESSFULLNODES, $stat);
|
||||
my $stat="synced";
|
||||
xCAT::TableUtils->setUpdateStatus(\@::SUCCESSFULLNODES, $stat);
|
||||
|
||||
}
|
||||
if(@::FAILEDNODES)
|
||||
{
|
||||
|
||||
my $stat="failed";
|
||||
xCAT::TableUtils->setUpdateStatus(\@::FAILEDNODES, $stat);
|
||||
my $stat="failed";
|
||||
xCAT::TableUtils->setUpdateStatus(\@::FAILEDNODES, $stat);
|
||||
|
||||
}
|
||||
# -P -S are not run
|
||||
# -F is run, but there is no syncfiles
|
||||
if(!(@::SUCCESSFULLNODES || @::FAILEDNODES) && $::NOSYNCFILE)
|
||||
{
|
||||
my $stat="synced";
|
||||
xCAT::TableUtils->setUpdateStatus(\@$nodes,$stat);
|
||||
my $stat="synced";
|
||||
xCAT::TableUtils->setUpdateStatus(\@$nodes,$stat);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
# if site.precreatemypostscripts = not 1 or yes or undefined,
|
||||
# remove all the
|
||||
# node files in the noderange in /tftpboot/mypostscripts
|
||||
@ -1613,6 +1613,9 @@ sub updatenodesyncfiles
|
||||
my $localhostname = hostname();
|
||||
my %syncfile_node = ();
|
||||
my %syncfile_rootimage = ();
|
||||
|
||||
# $::NOSYNCFILE default value is 0
|
||||
# if there is no syncfiles, set $::NOSYNCFILE=1
|
||||
$::NOSYNCFILE=0;
|
||||
# if running -P or -S do not report or no status requested
|
||||
if ((defined($request->{status})) && ($request->{status} eq "yes")) { # status requested
|
||||
@ -1729,13 +1732,11 @@ sub updatenodesyncfiles
|
||||
}
|
||||
}
|
||||
else
|
||||
{ # no syncfiles defined
|
||||
{ # no syncfiles defined
|
||||
my $rsp = {};
|
||||
$rsp->{data}->[0] =
|
||||
"There were no syncfiles defined to process. File synchronization has completed.";
|
||||
$callback->($rsp);
|
||||
#my $stat="synced";
|
||||
#xCAT::TableUtils->setUpdateStatus(\@$nodes, $stat);
|
||||
$::NOSYNCFILE=1;
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user