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

NotManagedByMCM annotation incorrectly added by MCM to Node #863

Closed
elankath opened this issue Oct 31, 2023 · 2 comments · Fixed by #866
Closed

NotManagedByMCM annotation incorrectly added by MCM to Node #863

elankath opened this issue Oct 31, 2023 · 2 comments · Fixed by #866
Assignees
Labels
area/quality Output qualification (tests, checks, scans, automation in general, etc.) related kind/bug Bug priority/2 Priority (lower number equals higher priority) status/closed Issue is closed (either delivered or triaged)

Comments

@elankath
Copy link
Contributor

elankath commented Oct 31, 2023

How to categorize this issue?

/area quality
/kind bug
/priority 2

What happened:
Node associated with machines that are managed by the machine-controller are being annotated with the NotManagedByMCM (node.machine.sapcloud.io/not-managed-by-mcm="1") annotation. This can occur plane migration when the Node creation time stamps predate the Machine creation time stamps after control plane migration.

kubectl get no -o custom-columns="NAME":.metadata.name,"CREATION":.metadata.creationTimestamp
NAME                                                        CREATION
shoot--di-xm8--dh-tt23jtpe4f2f-static-dynamic-76487-89zwb   2023-08-16T16:42:15Z
shoot--di-xm8--dh-tt23jtpe4f2f-system-57c59-g2f8q           2023-08-16T16:42:17Z
shoot--di-xm8--dh-tt23jtpe4f2f-system-57c59-k9jwh           2023-08-16T16:42:13Z
k get mc  -o custom-columns="NAME":.metadata.name,"CREATION":.metadata.creationTimestamp
NAME                                                        CREATION
shoot--di-xm8--dh-tt23jtpe4f2f-static-dynamic-76487-89zwb   2023-10-22T05:56:53Z
shoot--di-xm8--dh-tt23jtpe4f2f-system-57c59-g2f8q           2023-10-22T05:56:53Z
shoot--di-xm8--dh-tt23jtpe4f2f-system-57c59-k9jwh           2023-10-22T05:56:53Z

What you expected to happen:
Ideally, Nodes should not be incorrectly tagged with this annotation. If they have this annotation, the annotation must be removed. A proper fix is described at #774 . Unfortunately, the solution proposed there will take more time since now even gardener code shoot health check is relying on the process of this NotManagedByMCM annotation.

Solution Proposal

  1. In AnnotateNodesUnmanagedByMCM (invoked by the safety reconciler), remove annotation if the Node is already associated with Machine , yet has this annotation set.
  2. Fix needs vendoring and release in all providers.
  3. Current default period of safety reconciler job is 30m. Consider reducing to 5m after checking that all calls go through informer cache.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:
all mcm versions

  • Kubernetes version (use kubectl version): all
  • Cloud provider or hardware configuration: all
  • Others:

What you expected to happen:

@elankath elankath added the kind/bug Bug label Oct 31, 2023
@gardener-robot gardener-robot added area/quality Output qualification (tests, checks, scans, automation in general, etc.) related priority/2 Priority (lower number equals higher priority) labels Oct 31, 2023
@gardener-robot
Copy link

@elankath You have mentioned internal references in the public. Please check.

@elankath elankath self-assigned this Oct 31, 2023
@gardener-robot
Copy link

@elankath You have mentioned internal references in the public. Please check.

@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/quality Output qualification (tests, checks, scans, automation in general, etc.) related kind/bug Bug priority/2 Priority (lower number equals higher priority) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants