Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add corresponding Machines to the worker queue when reconciling Machine Class #751

Open
rishabh-11 opened this issue Oct 12, 2022 · 2 comments
Labels
area/control-plane Control plane related kind/enhancement Enhancement, improvement, extension lifecycle/rotten Nobody worked on this for 12 months (final aging stage) needs/planning Needs (more) planning with other MCM maintainers priority/2 Priority (lower number equals higher priority)

Comments

@rishabh-11
Copy link
Contributor

How to categorize this issue?

/area control-plane
/kind enhancement
/priority 3

What would you like to be added:

In the current mcm, during machine class reconciliation, the corresponding machines are added to the reconciliation queue only if no finaliser is present on the machine class. Check out the below code for reference.

if class.DeletionTimestamp == nil && len(machines) > 0 {
// If deletionTimestamp is not set and at least one machine is referring this machineClass
if finalizers := sets.NewString(class.Finalizers...); !finalizers.Has(MCMFinalizerName) {
// Add machineClassFinalizer as if doesn't exist
err = c.addMachineClassFinalizers(ctx, class)
if err != nil {
return err
}
// Enqueue all machines once finalizer is added to machineClass
// This is to allow processing of such machines
for _, machine := range machines {
c.enqueueMachine(machine)
}
}
return nil
}

Instead, the machines should be added to the reconciliation queue regardless of whether the finalizer is present or not.

Why is this needed:

This above-mentioned behaviour is incorrect, as machines associated with a particular machine class should be reconciled when reconciling the corresponding machine class, regardless of whether the finalizer is present or not.

@rishabh-11 rishabh-11 added the kind/enhancement Enhancement, improvement, extension label Oct 12, 2022
@gardener-robot gardener-robot added area/control-plane Control plane related priority/3 Priority (lower number equals higher priority) labels Oct 12, 2022
@rishabh-11 rishabh-11 self-assigned this Oct 13, 2022
@himanshu-kun
Copy link
Contributor

The issue for which the current code path was introduced #560

@himanshu-kun
Copy link
Contributor

Post grooming decision

Earlier machineClass events , didn't lead to reconciliation of machines. After the above change talked abt in this issue, there was only one link created i.e. we reconcile the machines for a machineClass only when machineClass(not under deletion) didn't have a finalizer.
But now we think it would be better that we reconcile the corresponding machines for every update event of the machineClass. This is also inline with the changes we want as per #761 #635

@himanshu-kun himanshu-kun added priority/2 Priority (lower number equals higher priority) needs/planning Needs (more) planning with other MCM maintainers and removed priority/3 Priority (lower number equals higher priority) labels Feb 24, 2023
@gardener-robot gardener-robot added the lifecycle/stale Nobody worked on this for 6 months (will further age) label Nov 21, 2023
@gardener-robot gardener-robot added lifecycle/rotten Nobody worked on this for 12 months (final aging stage) and removed lifecycle/stale Nobody worked on this for 6 months (will further age) labels Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/control-plane Control plane related kind/enhancement Enhancement, improvement, extension lifecycle/rotten Nobody worked on this for 12 months (final aging stage) needs/planning Needs (more) planning with other MCM maintainers priority/2 Priority (lower number equals higher priority)
Projects
None yet
Development

No branches or pull requests

3 participants