Skip to content
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

Merged
merged 1 commit into from
Jan 25, 2018
Merged

Exposes alarm/health information in "etcdctl endpoint status" #9206

merged 1 commit into from
Jan 25, 2018

Conversation

dvonthenen
Copy link

Implements alarm/health information in "etcdctl endpoint status"
Addresses issue #9163

Tested on a local cluster. Provided mock errors to ensure formatting is correct.

@@ -38,6 +39,7 @@ type BackendGetter interface {
}

type Alarmer interface {
Alarms() []*pb.AlarmMember
Copy link
Contributor

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 :)

Copy link
Author

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.",
Copy link
Contributor

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.

Copy link
Author

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.

@@ -38,6 +39,9 @@ type BackendGetter interface {
}

type Alarmer interface {
//Alarms is implemented in Server interface located in etcdserver/server.go
Copy link
Contributor

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -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
Copy link
Contributor

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@xiang90
Copy link
Contributor

xiang90 commented Jan 23, 2018

defer to @gyuho

@codecov-io
Copy link

codecov-io commented Jan 24, 2018

Codecov Report

Merging #9206 into master will increase coverage by 0.04%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
etcdctl/ctlv3/command/printer_fields.go 0% <0%> (ø) ⬆️
etcdctl/ctlv3/command/printer.go 44.33% <100%> (+0.53%) ⬆️
etcdserver/api/v3rpc/maintenance.go 77.88% <66.66%> (-0.69%) ⬇️
clientv3/namespace/watch.go 87.87% <0%> (-12.13%) ⬇️
etcdserver/api/v3rpc/lease.go 78.37% <0%> (-8.11%) ⬇️
etcdctl/ctlv3/command/lease_command.go 65.34% <0%> (-5.95%) ⬇️
etcdserver/api/v3rpc/watch.go 80.68% <0%> (-4.73%) ⬇️
integration/bridge.go 90.07% <0%> (-2.3%) ⬇️
rafthttp/msgappv2_codec.go 69.56% <0%> (-1.74%) ⬇️
rafthttp/peer.go 90.22% <0%> (-1.51%) ⬇️
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7331949...db822ed. Read the comment docs.

Copy link
Contributor

@gyuho gyuho left a 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!

@@ -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
Copy link
Contributor

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
@dvonthenen
Copy link
Author

@gyuho fixed the typo

@xiang90
Copy link
Contributor

xiang90 commented Jan 24, 2018

/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

Copy link
Contributor

@gyuho gyuho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thanks!

@gyuho gyuho merged commit 3fdaf4e into etcd-io:master Jan 25, 2018
@dvonthenen dvonthenen deleted the feature/issue9163 branch January 25, 2018 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants