-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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 Kubectl describe node missing event #106485
Conversation
Hi @aimuz. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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/test-infra repository. |
/assign @janetkuo |
/sig cli |
Can you please add a test that helps make clear why we need this and why this is the correct fix? |
6d2466d
to
dcc75eb
Compare
Test cases have been added |
/ok-to-test |
/kind bug |
/assign @eddiezane |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding a test. I apologize but I still don't understand this change. Can you please help me understand?
Type Reason Age From Message | ||
---- ------ ---- ---- ------- | ||
Normal 7y342d Node bar status is now: NodeHasNoDiskPressure | ||
Normal 7y342d (x2 over 7y342d) Node bar status is now: NodeReady |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test now fails because the date is different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test now fails because the date is different.
I reworked the test cases
This test case is to test that both I will fix this test case so that it can be tested at any time |
I have trouble understanding the problem being solved and the impact of the fix. Is it easy to demonstrate via a test case? |
/assign |
a08fbb4
to
e1bc590
Compare
// there are two UIDs for host events: | ||
// controller use node.uid | ||
// kubelet use node.name | ||
ref.UID = "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the discrepancy is in the kubelet which is injecting name into UID that should be fixed on the kubelet side of things. What I'm willing to accept on the kubectl side of things are 2 searchEvents
calls one using UID and other using name such that we'll scrape both events and leave a TODO here pointing to issue against kubelet, such that we'll be able to remove the workaround after kubelet is fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@soltysh
I have a question, by what field are the events sorted, as the merge needs to combine them and reorder them, is it the creation time field?
Kubectl describe node ignores the node events created by the controller kubernetes#106475
/test pull-kubernetes-integration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
/triage accepted
/priority backlog
// there are two UIDs for host events: | ||
// controller use node.uid | ||
// kubelet use node.name | ||
// TODO: Uniform use of UID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: would be nice to point to a specific issue number tracking this problem.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aimuz, soltysh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Kubectl describe node ignores the node events created by the controller
#106475
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: