Skip to content

Commit 143c55b

Browse files
committed
add bootstrap removed event from CEO
1 parent c0e422d commit 143c55b

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

pkg/monitor/monitorapi/types.go

+2
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,8 @@ const (
262262

263263
ReasonHighGeneration IntervalReason = "HighGeneration"
264264
ReasonInvalidGeneration IntervalReason = "GenerationViolation"
265+
266+
ReasonEtcdBootstrapRemoved IntervalReason = "EtcdBootstrapRemoved"
265267
)
266268

267269
type AnnotationKey string

pkg/monitortests/testframework/operatorloganalyzer/operator_log_scraper.go

+12-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ import (
44
"context"
55
"errors"
66
"fmt"
7-
"github.com/openshift/origin/pkg/monitortests/testframework/watchnamespaces"
87
"strings"
98
"time"
109

10+
"github.com/openshift/origin/pkg/monitortests/testframework/watchnamespaces"
11+
1112
"github.com/openshift/origin/pkg/monitor"
1213
"github.com/openshift/origin/pkg/monitor/monitorapi"
1314
"github.com/openshift/origin/pkg/monitortestframework"
@@ -207,6 +208,16 @@ func (g operatorLogHandler) HandleLogLine(logLine podaccess.LogLineContent) {
207208
).
208209
Build(logLine.Instant, logLine.Instant),
209210
)
211+
case strings.Contains(logLine.Line, "Removing bootstrap member"): // ceo removed bootstrap member
212+
g.recorder.AddIntervals(
213+
monitorapi.NewInterval(monitorapi.SourcePodLog, monitorapi.Info).
214+
Locator(logLine.Locator).
215+
Message(monitorapi.NewMessage().
216+
Reason(monitorapi.ReasonEtcdBootstrapRemoved).
217+
HumanMessage(logLine.Line),
218+
).
219+
Build(logLine.Instant, logLine.Instant),
220+
)
210221
}
211222

212223
}

0 commit comments

Comments
 (0)