From d83bf58d9eb3a5c8b766d97e2a921a409b33cf78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Wed, 21 Oct 2026 16:46:20 -0300 Subject: [PATCH] fix(destiny): preserve enactment when other nodes have completed --- xCAT-server/lib/xcat/plugins/destiny.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/destiny.pm b/xCAT-server/lib/xcat/plugins/destiny.pm index f16f1cd3a5..8626899192 100644 --- a/xCAT-server/lib/xcat/plugins/destiny.pm +++ b/xCAT-server/lib/xcat/plugins/destiny.pm @@ -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 }); }