2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-23 02:42:17 +00:00

fix(destiny): preserve enactment when other nodes have completed

This commit is contained in:
Vinícius Ferrão
2026-10-21 16:46:20 -03:00
parent 9b47f76ca2
commit d83bf58d9e
+7 -4
View File
@@ -830,9 +830,11 @@ sub nextdestiny {
my $node;
my $noupdate_flag = 0;
my @enactnodes;
$chaintab = xCAT::Table->new('chain');
my $chainents = $chaintab->getNodesAttribs(\@nodes, [qw(currstate currchain chain)]);
foreach $node (@nodes) {
my $enact = 1;
unless ($chaintab) {
syslog("local4|err", "ERROR: $node requested destiny update, no chain table");
return; #nothing to do...
@@ -857,7 +859,7 @@ sub nextdestiny {
unless ($ref->{currchain} eq 'boot') {
$ref->{currchain} = 'standby';
}
$callnodeset = 0;
$enact = 0;
}
}
my @chain = split /[,;]/, $ref->{currchain};
@@ -876,12 +878,13 @@ sub nextdestiny {
{
my @items = split /[:]/, $ref->{currstate};
$requ{arg} = \@items;
$noupdate_flag = 1;
$noupdate_flag = 1 if $enact;
}
setdestiny(\%requ, $flag + 1);
push @enactnodes, $node if $enact;
}
if ($callnodeset) {
if ($callnodeset and @enactnodes) {
my $args;
if ($noupdate_flag)
{
@@ -892,7 +895,7 @@ sub nextdestiny {
$args = ['enact'];
}
$subreq->({ command => ['nodeset'],
node => \@nodes,
node => \@enactnodes,
arg => $args });
}