From f84a504ad9467e19fbbe196c5207a1f82b129508 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 25 Apr 2024 15:45:14 -0400 Subject: [PATCH] daemon: minor nit fixes --- pkg/daemon/update.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkg/daemon/update.go b/pkg/daemon/update.go index 403542ba01..ed96b68873 100644 --- a/pkg/daemon/update.go +++ b/pkg/daemon/update.go @@ -154,9 +154,15 @@ func (dn *Daemon) executeReloadServiceNodeDisruptionAction(serviceName string, r // If at any point an error occurs, we reboot the node so that node has correct configuration. func (dn *Daemon) performPostConfigChangeNodeDisruptionAction(postConfigChangeActions []opv1.NodeDisruptionPolicyStatusAction, configName string) error { - logSystem("Executing performPostConfigChangeNodeDisruptionAction(drain already complete/skipped) for config %s", configName) for _, action := range postConfigChangeActions { - logSystem("Executing postconfig action: %v for config %s", action.Type, configName) + + // Drain is already completed at this stage and essentially a no-op for this loop, so no need to log that. + if action.Type == opv1.DrainStatusAction { + continue + } else { + logSystem("Performing post config change action: %v for config %s", action.Type, configName) + } + if action.Type == opv1.RebootStatusAction { err := upgrademonitor.GenerateAndApplyMachineConfigNodes( &upgrademonitor.Condition{State: mcfgalphav1.MachineConfigNodeUpdatePostActionComplete, Reason: string(mcfgalphav1.MachineConfigNodeUpdateRebooted), Message: fmt.Sprintf("Node will reboot into config %s", configName)}, @@ -608,7 +614,7 @@ func calculatePostConfigChangeNodeDisruptionActionFromMCDiffs(diffSSH bool, diff for _, policyFile := range clusterPolicies.Files { klog.V(4).Infof("comparing policy path %s to diff path %s", policyFile.Path, diffPath) if policyFile.Path == diffPath { - klog.Infof("NodeDisruptionPolicy found for diff file %s!", diffPath) + klog.Infof("NodeDisruptionPolicy found for diff file %s", diffPath) actions = append(actions, policyFile.Actions...) pathFound = true break