From f6f27d32d16ca251b285cc36771fa09954589c48 Mon Sep 17 00:00:00 2001 From: Chao Chen Date: Tue, 9 Nov 2021 10:17:11 -0800 Subject: [PATCH 1/2] server/etcdserver/api/etcdhttp: exclude the same alarm type activated by multiple peers --- server/etcdserver/api/etcdhttp/metrics.go | 7 +------ server/etcdserver/api/etcdhttp/metrics_test.go | 6 ++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/server/etcdserver/api/etcdhttp/metrics.go b/server/etcdserver/api/etcdhttp/metrics.go index a9f278081d9..659ab806708 100644 --- a/server/etcdserver/api/etcdhttp/metrics.go +++ b/server/etcdserver/api/etcdhttp/metrics.go @@ -138,8 +138,7 @@ func checkHealth(lg *zap.Logger, srv etcdserver.ServerV2, excludedAlarms AlarmSe for _, v := range as { alarmName := v.Alarm.String() if _, found := excludedAlarms[alarmName]; found { - lg.Debug("/health excluded alarm", zap.String("alarm", alarmName)) - delete(excludedAlarms, alarmName) + lg.Debug("/health excluded alarm", zap.String("alarm", v.String())) continue } @@ -157,10 +156,6 @@ func checkHealth(lg *zap.Logger, srv etcdserver.ServerV2, excludedAlarms AlarmSe } } - if len(excludedAlarms) > 0 { - lg.Warn("fail exclude alarms from health check", zap.String("exclude alarms", fmt.Sprintf("%+v", excludedAlarms))) - } - if uint64(srv.Leader()) == raft.None { h.Health = "false" h.Reason = "RAFT NO LEADER" diff --git a/server/etcdserver/api/etcdhttp/metrics_test.go b/server/etcdserver/api/etcdhttp/metrics_test.go index fbafddff68d..859bdf495b3 100644 --- a/server/etcdserver/api/etcdhttp/metrics_test.go +++ b/server/etcdserver/api/etcdhttp/metrics_test.go @@ -77,6 +77,12 @@ func TestHealthHandler(t *testing.T) { http.StatusOK, "true", }, + { + []*pb.AlarmMember{{MemberID: uint64(1), Alarm: pb.AlarmType_NOSPACE}, {MemberID: uint64(2), Alarm: pb.AlarmType_NOSPACE}, {MemberID: uint64(3), Alarm: pb.AlarmType_NOSPACE}}, + "/health?exclude=NOSPACE", + http.StatusOK, + "true", + }, { []*pb.AlarmMember{{MemberID: uint64(0), Alarm: pb.AlarmType_NOSPACE}, {MemberID: uint64(1), Alarm: pb.AlarmType_CORRUPT}}, "/health?exclude=NOSPACE", From d6161ec3871ddaaa57ce9a5cbf76889316784a00 Mon Sep 17 00:00:00 2001 From: Chao Chen Date: Fri, 12 Nov 2021 14:34:33 -0800 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG-3.4.md | 11 ++++++++++- CHANGELOG-3.5.md | 9 +++++++++ CHANGELOG-3.6.md | 1 + 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-3.4.md b/CHANGELOG-3.4.md index f1a1ba25bd6..4612d891062 100644 --- a/CHANGELOG-3.4.md +++ b/CHANGELOG-3.4.md @@ -5,12 +5,21 @@ Previous change logs can be found at [CHANGELOG-3.3](https://github.com/etcd-io/ The minimum recommended etcd versions to run in **production** are 3.2.28+, 3.3.18+, 3.4.2+, and 3.5.1+. -See [code changes](https://github.com/etcd-io/etcd/compare/v3.4.17...v3.4.18) and [v3.4 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_4/) for any breaking changes. +
+ +## v3.4.19 (TODO) + +See [code changes](https://github.com/etcd-io/etcd/compare/v3.4.18...v3.4.19) and [v3.4 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_4/) for any breaking changes. + +### etcd server +- Fix [exclude the same alarm type activated by multiple peers](https://github.com/etcd-io/etcd/pull/13475).
## v3.4.18 (2021-10-15) +See [code changes](https://github.com/etcd-io/etcd/compare/v3.4.17...v3.4.18) and [v3.4 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_4/) for any breaking changes. + ### Metrics, Monitoring See [List of metrics](https://etcd.io/docs/latest/metrics/) for all metrics per release. diff --git a/CHANGELOG-3.5.md b/CHANGELOG-3.5.md index 78015a50160..3de30512eb5 100644 --- a/CHANGELOG-3.5.md +++ b/CHANGELOG-3.5.md @@ -6,6 +6,15 @@ Previous change logs can be found at [CHANGELOG-3.4](https://github.com/etcd-io/ The minimum recommended etcd versions to run in **production** are 3.2.28+, 3.3.18+, 3.4.2+, and 3.5.1+. +
+ +## [v3.5.2](https://github.com/etcd-io/etcd/releases/tag/v3.5.2) (TODO) + +See [code changes](https://github.com/etcd-io/etcd/compare/v3.5.1...v3.5.2) and [v3.5 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_5/) for any breaking changes. + +### etcd server +- Fix [exclude the same alarm type activated by multiple peers](https://github.com/etcd-io/etcd/pull/13476). +
## [v3.5.1](https://github.com/etcd-io/etcd/releases/tag/v3.5.1) (2021-10-15) diff --git a/CHANGELOG-3.6.md b/CHANGELOG-3.6.md index f792d3a132d..5e07703993b 100644 --- a/CHANGELOG-3.6.md +++ b/CHANGELOG-3.6.md @@ -33,6 +33,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0...v3.6.0). - Add [`etcd --log-format`](https://github.com/etcd-io/etcd/pull/13339) flag to support log format. - Fix [non mutating requests pass through quotaKVServer when NOSPACE](https://github.com/etcd-io/etcd/pull/13435) +- Fix [exclude the same alarm type activated by multiple peers](https://github.com/etcd-io/etcd/pull/13467). ### tools/benchmark