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

Spurious Deferred node password secret validation failed: secrets "NODENAME" already exists when restarting servers #11354

Open
brandond opened this issue Nov 22, 2024 · 0 comments
Labels
kind/bug Something isn't working

Comments

@brandond
Copy link
Member

brandond commented Nov 22, 2024

Environmental Info:
K3s Version:
n/a

Node(s) CPU architecture, OS, and Version:
n/a

Cluster Configuration:
n/a

Describe the bug:

When restarting a server node, deferred node password secret validation may attempt to get the node password secret from an unsynchronized secret cache. When the secret is not found, it attempts to create it, but then gets an "already exists" error because it does exist, it's just not cached yet.

I1029 16:34:55.939401 1734 event.go:307] "Event occurred" object="node-az-3" fieldPath="" kind="Node" apiVersion="" type="Warning" reason="NodePasswordValidationFailed" message="Deferred node password secret validation failed: secrets \"node-az-3.node-password.rke2\" already exists"

Steps To Reproduce:
Restart K3s on a node with many secrets.

Expected behavior:
Secret is found and validated

Actual behavior:
Server log and event indicating node password secret already exists

Additional context / logs:
We should confirm that we aren't caching too many secrets here just to ensure that the node password secrets are available. If we still want to use a cache here, we should validate that it is synchronized before trying to read from it.

secret, err := secretClient.Cache().Get(metav1.NamespaceSystem, name)

@brandond brandond self-assigned this Nov 22, 2024
@brandond brandond removed their assignment Nov 22, 2024
@brandond brandond added this to the 2024-12 Release Cycle milestone Nov 22, 2024
@brandond brandond added the kind/bug Something isn't working label Nov 22, 2024
@brandond brandond moved this from New to Accepted in K3s Development Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
Status: Accepted
Development

No branches or pull requests

1 participant