Repository navigation
[Backport release-1.6] fix(linstor): use severity warning in piraeus-datastore alerts - #4740
Open
europrinter (yankawai) wants to merge 3 commits into
Open
europrinter (yankawai) wants to merge 3 commits into
europrinter (yankawai) wants to merge 3 commits into
Conversation
…re alerts Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com> (cherry picked from commit 3ade16a)
Alerta refuses an alert whose severity is not in its alarm model, so a rule with such a label is dropped every time it fires and the alert never reaches anyone. Seven piraeus-datastore rules used warn and the keda at-max rule used info, and nothing in the tree caught either. The contract collects every PrometheusRule and VMRule document under packages, in alerts files and in chart templates, and fails on any alerting rule whose labels.severity is missing or not in the accepted list. Helm actions are stripped before parsing, so a templated rule is still checked, and a file that cannot be parsed fails the run instead of being skipped. Values are compared as whole words. none stays out of the list because the Alertmanager config routes it to a blackhole receiver. Vendored charts under packages/**/charts/** are out of scope because they are re-vendored rather than edited. Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com> Assisted-by: LLM (cherry picked from commit bd2cc0a)
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…rces The guard found rule files by an exact `kind: PrometheusRule` or `kind: VMRule` line, so a quoted kind or one followed by a comment took the file out of the check. A rule group whose rules all come from template actions is empty once those are stripped, so it passed with nothing checked. Discovery now accepts those spellings, and a rule document without groups, or a group without a visible alert or recording rule, fails the run the way a file that cannot be parsed does. Assisted-by: LLM Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com> (cherry picked from commit dc814f3)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Backport of the LINSTOR severity fix and its alert-rule guard from #3799 to
release-1.6, together with the guard's follow-up #4812. Seven piraeus-datastore rules usewarn, which the default Alerta alarm model does not accept, and they now usewarning. Alert names, expressions and thresholds stay unchanged.Cherry-picked
3ade16a380c9d03b83ff28ea02af3b800fdd1b0fandbd2cc0a749531433a237a9c8a6e21a6f21dee200with their authors and cherry-pick references. The KEDA severity commit from the same main PR is left out because the KEDA rule it fixes does not exist on release-1.6. The follow-up from #4812 is cherry-picked too. It makes the guard catch a quoted kind or a kind followed by a comment, and fail on a rule group it cannot see into once template actions are stripped.Validation
hack/alert-severity-contract.batspass withhack/cozytest.shon this branch. The wider discovery finds the same 39 rule files as before and no rule group comes out empty.release-1.6atda98ddc08without the fix, the same contract fails on exactly the sevenwarnrules corrected here.Screenshots
Not a UI change.
Downstream repositories
The file-level trigger map was checked against both changed files: a rule file under
packages/system/piraeus-operator/alerts/and a new test underhack/. No existing tool, make target, API schema, package, output resource or documented workflow is renamed or changed. No companion repository update is required.Release note