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

include object fieldpath in event key #47973

Merged

Conversation

sjenning
Copy link
Contributor

Fixes #47692

#47462 exposed a bug where getEventKey() only keys on event fields that are common at the pod level. Events generated by different containers in the same pod will yield identical event keys. This results in events with the same message from different containers in a pod being aggregated in error.

This wasn't a problem before as the event message contained container specific information and thus didn't produce the same event key.

@derekwaynecarr @dhilipkumars @dchen1107

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 23, 2017
@pmorie
Copy link
Member

pmorie commented Jun 23, 2017

looking

@k8s-github-robot k8s-github-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. release-note-label-needed labels Jun 23, 2017
@pmorie
Copy link
Member

pmorie commented Jun 23, 2017

Do we have a reproducer that we can point to to say that this fully resolves #47692 ?

Copy link
Member

@derekwaynecarr derekwaynecarr left a comment

Choose a reason for hiding this comment

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

This makes sense from the reproducer. I can't manually verify at the moment.

@@ -49,6 +49,7 @@ func getEventKey(event *v1.Event) string {
event.InvolvedObject.Kind,
event.InvolvedObject.Namespace,
event.InvolvedObject.Name,
event.InvolvedObject.FieldPath,
Copy link
Member

Choose a reason for hiding this comment

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

this makes sense. aggregator bumped the count since the message didn't vary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

correct

@sjenning
Copy link
Contributor Author

@pmorie yes, there is a reproducer pod in the issue that works every time.

#47692 (comment)

I'm writing a test case now.

@sjenning sjenning force-pushed the include-obj-fieldpath-event-key branch from b1601a7 to fbcb056 Compare June 23, 2017 18:26
@sjenning
Copy link
Contributor Author

test case added. ready for review/approval.

@k8s-github-robot k8s-github-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 23, 2017
@sjenning
Copy link
Contributor Author

/test pull-kubernetes-e2e-gce-etcd3

@eparis
Copy link
Contributor

eparis commented Jun 23, 2017

/assign
/lgtm
/release-note-none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed release-note-label-needed labels Jun 23, 2017
@deads2k
Copy link
Contributor

deads2k commented Jun 23, 2017

/approve

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, eparis, sjenning

Associated issue: 47692

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 23, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, eparis, sjenning

Associated issue: 47692

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

2 similar comments
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, eparis, sjenning

Associated issue: 47692

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, eparis, sjenning

Associated issue: 47692

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@dchen1107 dchen1107 added this to the v1.7 milestone Jun 24, 2017
@dchen1107 dchen1107 added cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. cherrypick-candidate labels Jun 24, 2017
@dchen1107
Copy link
Member

/lgtm

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dchen1107, deads2k, eparis, sjenning

Associated issue: 47692

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@dchen1107
Copy link
Member

@sjenning could you please create a cherrypick pr for this. Thanks!

@sjenning
Copy link
Contributor Author

@dchen1107 I can. Not sure we need to though. #47462 that exposed this bug by removing container-specific information from the event message was not cherry picked to 1.6. Do you still want me to cherry-pick this?

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit aee3c5a into kubernetes:master Jun 24, 2017
@eparis
Copy link
Contributor

eparis commented Jun 24, 2017

@sjenning I think she means a pick to 1.7 since it already forked and master is now 1.8.

@sjenning
Copy link
Contributor Author

@eparis ah yes, that makes more sense. Didn't realize 1.7 had been forked already.

k8s-github-robot pushed a commit that referenced this pull request Jun 26, 2017
…ey-1.7

Automatic merge from submit-queue

include object fieldpath in event key

1.7 cherry-pick for #47973

@eparis @dchen1107 @derekwaynecarr @pmorie @deads2k
@k8s-cherrypick-bot
Copy link

Commit found in the "release-1.7" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet