Skip to content

Commit

Permalink
added observed generation
Browse files Browse the repository at this point in the history
  • Loading branch information
bdevcich committed Nov 1, 2023
1 parent 51c009c commit 0ddaf92
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions controllers/datamovementmanager_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ func (r *DataMovementManagerReconciler) removeLustreFileSystemsFinalizersIfNeces
// Now the DS does not have any lustre filesystems that are being deleted, verify that the
// daemonset's pods (i.e. dm worker pods) have restarted
d := ds.Status.DesiredNumberScheduled
if ds.Status.UpdatedNumberScheduled != d || ds.Status.NumberReady != d {
if ds.ObjectMeta.Generation != ds.Status.ObservedGeneration || ds.Status.UpdatedNumberScheduled != d || ds.Status.NumberReady != d {
// wait for pods to restart
log.Info("Requeue: wait for daemonset to restart pods after dropping lustrefilesystem volume",
"desired", d, "updated", ds.Status.UpdatedNumberScheduled, "ready", ds.Status.NumberReady)
Expand All @@ -414,8 +414,9 @@ func (r *DataMovementManagerReconciler) removeLustreFileSystemsFinalizersIfNeces
return nil, err
}
log.Info("Removed LustreFileSystem finalizer", "object", client.ObjectKeyFromObject(&lustre).String(), "namespace", manager.Namespace,
"daemonset metadata", ds.ObjectMeta,
"daemonset spec", ds.Spec,
"daemonset generation", ds.ObjectMeta.Generation,
"daemonset volumes", ds.Spec.Template.Spec.Volumes,
"daemonset volumeMounts", ds.Spec.Template.Spec.Containers[0].VolumeMounts,
"daemonset status", ds.Status,
)
}
Expand Down

0 comments on commit 0ddaf92

Please sign in to comment.