-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exposes alarm/health information in "etcdctl endpoint status" #9206
Conversation
etcdserver/api/v3rpc/maintenance.go
Outdated
@@ -38,6 +39,7 @@ type BackendGetter interface { | |||
} | |||
|
|||
type Alarmer interface { | |||
Alarms() []*pb.AlarmMember |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we document this public interface? I know there are existing undocumented methods, but we do need to improve the codebase in general :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. This is an existing interface that I just added to this Alarmer interface. Will document it.
@@ -2177,7 +2184,7 @@ | |||
"format": "uint64" | |||
}, | |||
"raftAppliedIndex": { | |||
"description": "appliedIndex is the current raft applied index of the responding member.", | |||
"description": "raftAppliedIndex is the current raft applied index of the responding member.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we fix this in a separate pr? thanks. i want to keep the commit as clean as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't notice this change. Will have a subsequent PR for this. Not sure why this didn't get updated in the last PR when I did the proto gen.
etcdserver/api/v3rpc/maintenance.go
Outdated
@@ -38,6 +39,9 @@ type BackendGetter interface { | |||
} | |||
|
|||
type Alarmer interface { | |||
//Alarms is implemented in Server interface located in etcdserver/server.go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put a space between //
and Alarms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
etcdserver/etcdserverpb/rpc.proto
Outdated
@@ -909,6 +909,8 @@ message StatusResponse { | |||
uint64 raftTerm = 6; | |||
// raftAppliedIndex is the current raft applied index of the responding member. | |||
uint64 raftAppliedIndex = 7; | |||
// errors contains alarm/health information and status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a dot .
at the end of the sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
defer to @gyuho |
Codecov Report
@@ Coverage Diff @@
## master #9206 +/- ##
==========================================
+ Coverage 75.87% 75.91% +0.04%
==========================================
Files 363 363
Lines 30161 30169 +8
==========================================
+ Hits 22884 22903 +19
+ Misses 5670 5661 -9
+ Partials 1607 1605 -2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm after fixing typos. Thanks!
etcdserver/api/v3rpc/maintenance.go
Outdated
@@ -38,6 +39,9 @@ type BackendGetter interface { | |||
} | |||
|
|||
type Alarmer interface { | |||
// Alarms is implemented in Server interface located in etcdserver/server.go | |||
// It returns the a list of alarms present in the AlarmStore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/the a/a/
?
Update to remove raftIndex and document the Alarms() interface Fix formatting Fix typo
@gyuho fixed the typo |
/cc @liggitt we decided to keep /heath simple and not break the pervious format. the more complicated fields are moved to a gRPC service, where versioning/compatibility is easier to deal with. just for your information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm thanks!
Implements alarm/health information in "etcdctl endpoint status"
Addresses issue #9163
Tested on a local cluster. Provided mock errors to ensure formatting is correct.