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

marking consolidatable log messages are duplicated due to read-after-write inconsistency #2002

Open
jonathan-innis opened this issue Feb 17, 2025 · 3 comments · May be fixed by #2018
Open
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@jonathan-innis
Copy link
Member

Description

Observed Behavior:

{"level":"DEBUG","time":"2025-02-17T17:23:51.179Z","logger":"controller","caller":"disruption/controller.go:99","message":"marking consolidatable","commit":"a79abac","controller":"nodeclaim.disruption","controllerGroup":"karpenter.sh","controllerKind":"NodeClaim","NodeClaim":{"name":"default-pwzrz"},"namespace":"","name":"default-pwzrz","reconcileID":"05fd3c4d-cad7-4979-862f-de6cee15988e","Node":{"name":"ip-192-168-106-221.us-west-2.compute.internal"}}
{"level":"DEBUG","time":"2025-02-17T17:23:51.372Z","logger":"controller","caller":"disruption/controller.go:99","message":"marking consolidatable","commit":"a79abac","controller":"nodeclaim.disruption","controllerGroup":"karpenter.sh","controllerKind":"NodeClaim","NodeClaim":{"name":"default-pwzrz"},"namespace":"","name":"default-pwzrz","reconcileID":"957af1c8-0966-47ea-be7e-8ae2697ca4df","Node":{"name":"ip-192-168-106-221.us-west-2.compute.internal"}}

Karpenter will double-log that a status condition has transitioned for Consolidatable (the same probably applies to Drifted) because there is no read-after-write consistency so Karpenter needs enough time after it has mutated the object to actually see the cache update -- one way to resolve this is to do an event filter on status updates -- the other way to accomplish this is by adding an artificial sleep into the Reconcile to give the cache time to catch-up like here

Expected Behavior:

Karpenter should not produce the same log twice in a row.

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@jonathan-innis jonathan-innis added the kind/bug Categorizes issue or PR as related to a bug. label Feb 17, 2025
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Feb 17, 2025
@jonathan-innis
Copy link
Member Author

/help
/triage accepted
/good-first-issue

@k8s-ci-robot
Copy link
Contributor

@jonathan-innis:
This request has been marked as suitable for new contributors.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.

In response to this:

/help
/triage accepted
/good-first-issue

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 17, 2025
@flavono123
Copy link
Contributor

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants