Skip to content

Commit

Permalink
add bootstrap removed event from CEO
Browse files Browse the repository at this point in the history
  • Loading branch information
vrutkovs committed Jan 28, 2025
1 parent c0e422d commit 143c55b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/monitor/monitorapi/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ const (

ReasonHighGeneration IntervalReason = "HighGeneration"
ReasonInvalidGeneration IntervalReason = "GenerationViolation"

ReasonEtcdBootstrapRemoved IntervalReason = "EtcdBootstrapRemoved"
)

type AnnotationKey string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"context"
"errors"
"fmt"
"github.com/openshift/origin/pkg/monitortests/testframework/watchnamespaces"
"strings"
"time"

"github.com/openshift/origin/pkg/monitortests/testframework/watchnamespaces"

"github.com/openshift/origin/pkg/monitor"
"github.com/openshift/origin/pkg/monitor/monitorapi"
"github.com/openshift/origin/pkg/monitortestframework"
Expand Down Expand Up @@ -207,6 +208,16 @@ func (g operatorLogHandler) HandleLogLine(logLine podaccess.LogLineContent) {
).
Build(logLine.Instant, logLine.Instant),
)
case strings.Contains(logLine.Line, "Removing bootstrap member"): // ceo removed bootstrap member
g.recorder.AddIntervals(
monitorapi.NewInterval(monitorapi.SourcePodLog, monitorapi.Info).
Locator(logLine.Locator).
Message(monitorapi.NewMessage().
Reason(monitorapi.ReasonEtcdBootstrapRemoved).
HumanMessage(logLine.Line),
).
Build(logLine.Instant, logLine.Instant),
)
}

}

0 comments on commit 143c55b

Please sign in to comment.