Skip to content

Commit a1f1c4d

Browse files
Merge branch 'gh/fix-nodeset-reconcilation' into 'main'
Fix NodeSet Reconciliation See merge request SchedMD/slinky-dev/slurm-operator!380
2 parents 4651565 + 11824f3 commit a1f1c4d

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

internal/controller/nodeset/nodeset_sync.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,9 @@ func (r *NodeSetReconciler) syncSlurmDeadline(
578578
toUpdate.Annotations[slinkyv1beta1.AnnotationPodDeadline] = deadline.Format(time.RFC3339)
579579
}
580580
if err := r.Patch(ctx, toUpdate, client.StrategicMergeFrom(pod)); err != nil {
581+
if apierrors.IsNotFound(err) {
582+
return nil
583+
}
581584
return err
582585
}
583586

@@ -620,6 +623,9 @@ func (r *NodeSetReconciler) syncSlurmTopology(
620623
toUpdate := pod.DeepCopy()
621624
toUpdate.Annotations[slinkyv1beta1.AnnotationNodeTopologySpec] = topologyLine
622625
if err := r.Patch(ctx, toUpdate, client.StrategicMergeFrom(pod)); err != nil {
626+
if apierrors.IsNotFound(err) {
627+
return nil
628+
}
623629
logger.Error(err, "failed to patch pod annotations", "pod", klog.KObj(pod))
624630
return err
625631
}

internal/controller/nodeset/nodeset_sync_status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ func (r *NodeSetReconciler) updateNodeSetPodPDBLabels(
334334
logger.Error(err, "failed to patch pod labels for PDB", "pod", klog.KObj(toUpdate))
335335
return err
336336
}
337-
return r.Patch(ctx, toUpdate, client.StrategicMergeFrom(pod))
337+
return nil
338338
}
339339
if _, err := utils.SlowStartBatch(len(pods), utils.SlowStartInitialBatchSize, syncPodPDBLabelsFn); err != nil {
340340
return err

0 commit comments

Comments
 (0)