Skip to content

Commit 40a725a

Browse files
TheoBrigittekalleep
authored andcommitted
Fix mimir.rules.kubernetes panic on non-leader debug info retrieval (#3451)
* Fix mimir.rules.kubernetes to only return eventProcessor state if it exists
1 parent 10b6f3a commit 40a725a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ v1.8.3
1212

1313
### Bugfixes
1414

15+
- Fix `mimir.rules.kubernetes` panic on non-leader debug info retrieval (@TheoBrigitte)
16+
1517
- Fix `loki.source.file` race condition that often lead to panic when using `decompression`. (@kalleep)
1618

1719
v1.8.2

internal/component/mimir/rules/kubernetes/debug.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ type DebugMimirNamespace struct {
2323
func (c *Component) DebugInfo() interface{} {
2424
var output DebugInfo
2525

26+
if c.eventProcessor == nil {
27+
return output
28+
}
29+
2630
currentState := c.eventProcessor.getMimirState()
2731
for namespace := range currentState {
2832
if !isManagedMimirNamespace(c.args.MimirNameSpacePrefix, namespace) {

0 commit comments

Comments
 (0)