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

endpoint health/status doesn't show all etcd members' values #8115

Closed
armstrongli opened this issue Jun 16, 2017 · 6 comments
Closed

endpoint health/status doesn't show all etcd members' values #8115

armstrongli opened this issue Jun 16, 2017 · 6 comments

Comments

@armstrongli
Copy link

In ETCD v2, the cluster health will show all the etcd members' health status. And in ETCD v3, the etcdctl can't show all the members' status.

After reading the source code of the endpoint command, it only connect to the endpoints configured in the command argument. It's very inconvenient to catch all members' status.

func epStatusCommandFunc(cmd *cobra.Command, args []string) {
	c := mustClientFromCmd(cmd)

	statusList := []epStatus{}
	var err error
	for _, ep := range c.Endpoints() {
		ctx, cancel := commandCtx(cmd)
		resp, serr := c.Status(ctx, ep)
		cancel()
		if serr != nil {
			err = serr
			fmt.Fprintf(os.Stderr, "Failed to get the status of endpoint %s (%v)\n", ep, serr)
			continue
		}
		statusList = append(statusList, epStatus{Ep: ep, Resp: resp})
	}

	display.EndpointStatus(statusList)

	if err != nil {
		os.Exit(ExitError)
	}
}
@xiang90
Copy link
Contributor

xiang90 commented Jun 16, 2017

this is by design. it is under endpoint, not cluster anymore, which means it only cares about the endpoint you provide.

a cluster level ping is usually broken by design for various reasons. we do not want to go that route again.

@xiang90 xiang90 closed this as completed Jun 16, 2017
@armstrongli
Copy link
Author

@xiang90 Here is what I do to make it:
armstrongli@0c7034c

@armstrongli
Copy link
Author

If the endpoint which is being checked is not in the soft balancer, the ping will be failure. I haven't check the root cause.

@armstrongli
Copy link
Author

I'll commit the PR first.
#8116

If it's design level, I hope add one cluster sub-command to support that.

@xiang90
Copy link
Contributor

xiang90 commented Jun 16, 2017

Cluster level command is too easy to be confusing. please open an issue for discussion before implement it.

@armstrongli
Copy link
Author

@xiang90 I created one issue here: #8117

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants