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

Bug 1807140: jsonnet/rules.jsonnet: Add MultipleContainersOOMKilled alert #676

Merged
merged 2 commits into from Mar 5, 2020

Conversation

lilic
Copy link
Contributor

@lilic lilic commented Feb 25, 2020

cc @openshift/openshift-team-monitoring

/hold
Lets see if we need this adjusted first or if its fine like this. So far in 4.4 there were no alerts firing for this, but then we only have CI and nightlies and the OOM bug was fixed.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 25, 2020
@openshift-ci-robot
Copy link
Contributor

@lilic: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

jsonnet/rules.jsonnet: Add MultipleContainersOOMKilled alert

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.

1 similar comment
@openshift-ci-robot
Copy link
Contributor

@lilic: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

jsonnet/rules.jsonnet: Add MultipleContainersOOMKilled alert

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.

@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 25, 2020
message: 'Multiple containers were out of memory killed within the past 15 minutes.',
},
labels: {
severity: 'info',
Copy link
Contributor

Choose a reason for hiding this comment

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

Why info? OOM means we don't have enough memory in a cluster and it should be scaled, which in many cases is a manual action requiring human intervention and possibly a page. Can we raise it to warning?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, because this alert is not exact we do not want to do warning level, decided in the PR that was merged and offline conversations with the team. They are adding a proper metric in crio directly in 4.5 that will actually have the info we need on how many containers are being OOM and we will remove this alert and make it warning then. For now as this is good enough alert and its mainly used for us to get a ballpark on how often we see OOMs in the wild.

See #668 and #642 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

It's mostly because this is a heuristic, we assume that if a container restarted and it's last termination reason was an OOM, then all of those restarts were OOMs. If we truly knew that x amount of OOMs happened then I would agree to making this warning but with this heuristic I would be more careful.

@lilic lilic changed the title jsonnet/rules.jsonnet: Add MultipleContainersOOMKilled alert Bug 1807139: jsonnet/rules.jsonnet: Add MultipleContainersOOMKilled alert Feb 26, 2020
@openshift-ci-robot
Copy link
Contributor

@lilic: This pull request references Bugzilla bug 1807139, which is invalid:

  • expected the bug to target the "4.4.0" release, but it targets "4.5.0" instead
  • expected Bugzilla bug 1807139 to depend on a bug in one of the following states: MODIFIED, ON_QA, VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), but no dependents were found

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1807139: jsonnet/rules.jsonnet: Add MultipleContainersOOMKilled alert

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.

@openshift-ci-robot openshift-ci-robot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Feb 26, 2020
@lilic
Copy link
Contributor Author

lilic commented Feb 26, 2020

note: This lowers the limit, compared to master, to 3 containers OOMing. I tested and this is the rough guesstimate of my testing, we can always adjust later.
Screenshot 2020-02-26 at 12 58 27

Should be ready to be merged. @openshift/openshift-team-monitoring PTAL

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 26, 2020
@@ -196,6 +196,17 @@
severity: 'warning',
},
},
{
expr: 'sum(max by(namespace, container, pod) (increase(kube_pod_container_status_restarts_total[12m])) and max by(namespace, container, pod) (kube_pod_container_status_last_terminated_reason{reason="OOMKilled"}) == 1) > 5',
Copy link
Contributor

Choose a reason for hiding this comment

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

iirc 12min comes from some kube behavior right? Do we have some docs about this to link to for future Frederic to understand?

Copy link
Contributor Author

@lilic lilic Feb 26, 2020

Choose a reason for hiding this comment

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

ha :D yes this is the way kube restarts containers, no docs just a lot of testing with various numbers of timespans, so it eventually normalised the graph.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, that works for me .. no need for comment then

@lilic
Copy link
Contributor Author

lilic commented Feb 26, 2020

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@lilic: This pull request references Bugzilla bug 1807139, which is invalid:

  • expected the bug to target the "4.4.0" release, but it targets "4.5.0" instead
  • expected Bugzilla bug 1807139 to depend on a bug in one of the following states: MODIFIED, ON_QA, VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), but no dependents were found

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/bugzilla refresh

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.

@metalmatze
Copy link
Contributor

Looking at this without extra context is there a reason this isn't added to the kubernetes-mixin project first and then in here?
Is it the urgency of the Bugzilla? Doesn't seem to Openshift specific. 🤔

@lilic
Copy link
Contributor Author

lilic commented Feb 26, 2020

@metalmatze we will be adding the proper alert in the mixin project when the crio metric is available, see the metric in the PR linked in the previous PR that was merged into master, this PR is just backporting it :D This is a guess alert and not exact at all, we want to fully test it and just want to get an indication of how often these alerts fire, see discussion in this PR a bit above :) #676 (comment) and its also detailed in the bugzilla linked and on slack. ;) I have created a jira ticket for that so we don't forget to remove this once the proper metric that tracks the number of OOM killed containers is added.

@brancz
Copy link
Contributor

brancz commented Feb 26, 2020

/lgtm
/retest

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 26, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

3 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 28, 2020
@s-urbaniak
Copy link
Contributor

@lilic this needs a rebase now

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Mar 2, 2020
@lilic lilic changed the title Bug 1807139: jsonnet/rules.jsonnet: Add MultipleContainersOOMKilled alert Bug 1807140: jsonnet/rules.jsonnet: Add MultipleContainersOOMKilled alert Mar 2, 2020
@openshift-ci-robot
Copy link
Contributor

@lilic: This pull request references Bugzilla bug 1807140, which is invalid:

  • expected dependent Bugzilla bug 1807139 to be in one of the following states: MODIFIED, ON_QA, VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), but it is NEW instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1807140: jsonnet/rules.jsonnet: Add MultipleContainersOOMKilled alert

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.

@lilic
Copy link
Contributor Author

lilic commented Mar 2, 2020

@smarterclayton to have this merged in 4.4 we need to have the dependant bugzilla in verified or modified state, you mentioned you will get it verified?

@smarterclayton
Copy link
Contributor

#668 was at 10, you need change master to 5 and then associate it with 1807139 and then once it merges this will merge (you don't need a verified PR in master, you just need a merged PR in master)

@lilic
Copy link
Contributor Author

lilic commented Mar 4, 2020

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@lilic: This pull request references Bugzilla bug 1807140, which is invalid:

  • expected dependent Bugzilla bug 1807139 to be in one of the following states: MODIFIED, ON_QA, VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), but it is POST instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/bugzilla refresh

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.

@lilic
Copy link
Contributor Author

lilic commented Mar 4, 2020

PR opened #690

@lilic
Copy link
Contributor Author

lilic commented Mar 5, 2020

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@lilic: This pull request references Bugzilla bug 1807140, which is invalid:

  • expected the bug to target the "4.4.0" release, but it targets "4.5.0" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/bugzilla refresh

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.

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 5, 2020
This triggers when multiple containers were killed within a certain
range.This alert is not 100% accurate, but it is the best we can
currently do, with the metrics we have.
@openshift-ci-robot openshift-ci-robot removed lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Mar 5, 2020
@lilic
Copy link
Contributor Author

lilic commented Mar 5, 2020

Had to rebase so lgtm was removed @openshift/openshift-team-monitoring PTAL

@lilic lilic changed the title Bug 1807140: jsonnet/rules.jsonnet: Add MultipleContainersOOMKilled alert Bug 1807140: jsonnet/rules.jsonnet: Add MultipleContainersOOMKilled alert Mar 5, 2020
@lilic
Copy link
Contributor Author

lilic commented Mar 5, 2020

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Mar 5, 2020
@openshift-ci-robot
Copy link
Contributor

@lilic: This pull request references Bugzilla bug 1807140, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

6 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.4.0) matches configured target release for branch (4.4.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
  • dependent bug Bugzilla bug 1807139 is in the state MODIFIED, which is one of the valid states (MODIFIED, ON_QA, VERIFIED, RELEASE_PENDING, CLOSED (ERRATA))
  • dependent Bugzilla bug 1807139 targets the "4.5.0" release, matching the expected (4.5.0) release
  • bug has dependents

In response to this:

/bugzilla refresh

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.

@openshift-ci-robot openshift-ci-robot removed the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Mar 5, 2020
@s-urbaniak
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 5, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brancz, lilic, s-urbaniak

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:
  • OWNERS [brancz,lilic,s-urbaniak]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 1e1fcac into openshift:release-4.4 Mar 5, 2020
@openshift-ci-robot
Copy link
Contributor

@lilic: All pull requests linked via external trackers have merged. Bugzilla bug 1807140 has been moved to the MODIFIED state.

In response to this:

Bug 1807140: jsonnet/rules.jsonnet: Add MultipleContainersOOMKilled alert

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.

@lilic lilic deleted the bring-alert-oom branch March 5, 2020 15:01
@rphillips
Copy link
Contributor

/cherry-pick release-4.3

@openshift-cherrypick-robot

@rphillips: #676 failed to apply on top of branch "release-4.3":

Applying: assets,pkg: Regenerate files
error: Failed to merge in the changes.
Using index info to reconstruct a base tree...
M	assets/prometheus-k8s/rules.yaml
M	pkg/manifests/bindata.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/manifests/bindata.go
CONFLICT (content): Merge conflict in pkg/manifests/bindata.go
Auto-merging assets/prometheus-k8s/rules.yaml
Patch failed at 0002 assets,pkg: Regenerate files

In response to this:

/cherry-pick release-4.3

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.

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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. 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