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

fix: fix node resolution cache for nodes in maintenance mode #890

Merged

Conversation

utkuozdemir
Copy link
Member

There was a problem with the node resolution (a.k.a. DNS) cache of the nodes. When a machine is in maintenance mode, there is a corresponding MachineStatus resource for it, but there isn't any ClusterMachineIdentity. Both of these types trigger updates in the node resolution cache. When a machine was never part of a cluster, the only source is MachineStatus, and the cache updates on it did not populate the machine ID in the cache. This caused the GRPC router to pick the wrong destination.

Furthermore, we did not remove the cluster and node name information from the cache when a machine was removed from a cluster. This caused the cache to contain obsolete cluster information, causing Talos GRPC proxy to not proxy the requests correctly after a machine was removed from a cluster.

Closes #888.

@utkuozdemir utkuozdemir force-pushed the fix-maintenance-node-resolution branch 3 times, most recently from 2e199c1 to 419c21d Compare January 30, 2025 14:51
Copy link
Member

@Unix4ever Unix4ever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should also test the transition unallocated -> allocated (unless we do that)

@utkuozdemir
Copy link
Member Author

Maybe we should also test the transition unallocated -> allocated (unless we do that)

Sure, will do.

There was a problem with the node resolution (a.k.a. DNS) cache of the nodes.
When a machine is in maintenance mode, there is a corresponding `MachineStatus` resource for it, but there isn't any `ClusterMachineIdentity`.
Both of these types trigger updates in the node resolution cache.
When a machine was never part of a cluster, the only source is `MachineStatus`, and the cache updates on it did not populate the machine ID in the cache.
This caused the GRPC router to pick the wrong destination.

Furthermore, we did not remove the cluster and node name information from the cache when a machine was removed from a cluster. This caused the cache to contain obsolete cluster information, causing Talos GRPC proxy to not proxy the requests correctly after a machine was removed from a cluster.

Co-authored-by: Artem Chernyshev <[email protected]>
Signed-off-by: Utku Ozdemir <[email protected]>
@utkuozdemir utkuozdemir force-pushed the fix-maintenance-node-resolution branch from 419c21d to 6f014b1 Compare January 31, 2025 07:38
@utkuozdemir
Copy link
Member Author

/m

@talos-bot talos-bot merged commit 6f014b1 into siderolabs:main Jan 31, 2025
22 checks passed
@utkuozdemir utkuozdemir deleted the fix-maintenance-node-resolution branch January 31, 2025 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] Bug: Upgrade Requests are Sent to the Wrong Machine
3 participants