A good bug report has some very specific qualities, so please read over our short document on reporting bugs before submitting a bug report.
To ask a question, go ahead and ignore this.
$ etcdctl version
etcdctl version: 3.1.3
API version: 3.1
$ etcdctl --endpoints=[xxxx:2379] --cacert=/etc/ssl/etcd/ca.pem --cert=/etc/ssl/etcd/client.pem --key=/etc/ssl/etcd/client-key.pem member list
2017-03-20 16:14:25.882335 I | warning: ignoring ServerName for user-provided CA for backwards compatibility is deprecated
145b401ad8709f51, started, node1, http://xxxx:2380, https://xxxx:2379
$ etcdctl --cacert=/etc/ssl/etcd/ca.pem --cert=/etc/ssl/etcd/client.pem --key=/etc/ssl/etcd/client-key.pem member list
2017-03-20 16:25:39.175197 I | warning: ignoring ServerName for user-provided CA for backwards compatibility is deprecated
Error: grpc: timed out when dialing
This is a list member command, but it must specify endpoints,this is obviously unreasonable.Have any methods?
This is my configure.
$ cat /etc/etcd/etcd.conf
ETCD_DATA_DIR="/var/lib/etcd/default.etcd"
ETCD_LISTEN_PEER_URLS="https://xxxx:2380"
ETCD_LISTEN_CLIENT_URLS="https://xxxx:2379,https://xxxx:4001"
ETCD_INITIAL_ADVERTISE_PEER_URLS="https://xxxx:2380"
ETCD_ADVERTISE_CLIENT_URLS="https://xxxx:2379"
ETCD_NAME="node1"
ETCD_INITIAL_CLUSTER="node1=https://xxxx:2380"
ETCD_INITIAL_CLUSTER_STATE="existing"
ETCD_CERT_FILE="/etc/ssl/etcd/server.pem"
ETCD_KEY_FILE="/etc/ssl/etcd/server-key.pem"
ETCD_TRUSTED_CA_FILE="/etc/ssl/etcd/ca.pem"
ETCD_CLIENT_CERT_AUTH="true"
ETCD_PEER_CERT_FILE="/etc/ssl/etcd/member1.pem"
ETCD_PEER_KEY_FILE="/etc/ssl/etcd/member1-key.pem"
ETCD_PEER_TRUSTED_CA_FILE="/etc/ssl/etcd/ca.pem"
ETCD_PEER_CLIENT_CERT_AUTH="true"
This is a list member command, but it must specify endpoints,this is obviously unreasonable.Have any methods?
As I understand you are saying that how can a member list command expect the members to be mentioned as endpoints, rather than giving the output of member details.
etcdctl is just a client of etcd and like any other client it needs to know the location (endpoints) where etcd cluster is running. It is exppecting that the gRPC endpoints be specified as an argument.
Coming to your argument about member list. etctctl is expecting an endpoint to get members detail.
You have to provide atleast 1 endpoint from your cluster and it gives you memberId, status, name, peer-addrs and client-addrs of all the members.
[root@node-01 etcd]$ ./etcdctl --endpoints=https://node-01.example.com:2379 --cert=/cfssl/member1.pem --key=/cfssl/member1-key.pem --cacert=/cfssl/ca.pem member list --write-out=simple
2017-03-20 14:56:06.250102 I | warning: ignoring ServerName for user-provided CA for backwards compatibility is deprecated
684f2e4032b4dcc2, started, node03, https://node-03.example.com:2380, https://node-03.example.com:2379
ac463f989b4b89ae, started, node02, https://node-02.example.com:2380, https://node-02.example.com:2379
c8d81b0c5a97ef5f, started, node01, https://node-01.example.com:2380, https://node-01.example.com:2379
@strugglingyouth
member list is not taking an endpoint as argument and giving the ouput as an endpoint. It is actually reaching out to the member and getting the all the members detail.
It's worked.
What about endpoint health, I use command etcdctl --endpoints=https://1.1.1.1:2379 --cacert=/etc/ssl/etcd/ca.pem --cert=/etc/ssl/etcd/client.pem --key=/etc/ssl/etcd/client-key.pem endpoint health --write-out=simple
output as below:
2017-03-21 14:20:02.260393 I | warning: ignoring ServerName for user-provided CA for backwards compatibility is deprecated
https://1.1.1.1:2379 is healthy: successfully committed proposal: took = 1.051668ms
Indeed, I want output all of my cluster health info. Thanks!
The endpoint health and endpoint status just returns the detail of only the endpoint being specified.
I'm not sure if it is by design or a bug.
Though I agree that the use use case of individual endpoint status and health exists but the v2 behavior of cluster-health is not found in v3 etcdctl and is a valid usecase too.
@heyiysanyhony ?
@heyitsanthony ?
@raoofm
There is no more cluster healthy. The output of cluster healthy can be very misleading. It is not possible to determine the cluster healthy from the view of a single client machine. It is impossible to determine if the client machine itself has an issue or the cluster has an issue. Instead, we provide end point information. It is up to the users to interpret the result.
Most helpful comment
@strugglingyouth
member list is not taking an endpoint as argument and giving the ouput as an endpoint. It is actually reaching out to the member and getting the all the members detail.