15 Commits

Author SHA1 Message Date
Gyuho Lee
f835a85965 ctlv3: support "write-out" for "endpoint health" command
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2019-06-03 17:01:54 -07:00
Hitoshi Mitake
6178c45066 etcdctl: don't ask password twice for etcdctl endpoint health --cluster
Current etcdctl endpoint health --cluster asks password twice if auth
is enabled. This is because the command creates two client instances:
one for the purpose of checking endpoint health and another for
getting cluster members with MemberList(). The latter client doesn't
need to be authenticated because MemberList() is a public RPC. This
commit makes the client with no authed one.

Fix https://github.com/coreos/etcd/issues/9094
2018-01-12 09:59:31 -08:00
yuleixiao
04940efcc2 etcdctl: add keep alive time/timeout in etcdctl
client can switch from fault node to normal when keep alive is timeout

Fixes #7941
2017-10-09 09:51:43 +08:00
Gyu-Ho Lee
5176b63fa0 ctlv3: add 'endpoint hashkv' command
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-08-05 18:17:06 -07:00
Dima Kurguzov
6603a77561 ctlv3: exit non-zero on unhealty ep command 2017-07-31 14:17:01 -07:00
Anthony Romano
1a2be432c5 etcdctl: --cluster flag using cluster endpoints for endpoint commands
Queries the cluster for endpoints to use for the endpoint commands.

Fixes #8117
2017-06-21 13:55:23 -07:00
Anthony Romano
00e00f16bb ctlv3: consider permission denied error to be healthy for endpoints
Relaxes the permission expectations for endpoint health by noting:
* permission denial on linearized reads is always through consensus
* endpoint health means consensus with the cluster through the endpoint

So, there's no need to require permission on a health check key in order
to know whether the endpoint is healthy.

Fixes #7057
2016-12-28 09:13:27 -08:00
Hitoshi Mitake
d585b43abe etcdctl, e2e: add --check-key option to endpoint health
This commit adds a new option --check-key to endpoint health command
for health checking with a custom key. It is mainly for avoiding
permission problem.
2016-10-14 11:39:46 +09:00
Hitoshi Mitake
644ec0ddef etcdctl, e2e: parse auth related options in endpoint health command
Partially fixes https://github.com/coreos/etcd/issues/6611
2016-10-09 20:34:09 +09:00
Gyu-Ho Lee
9b47ca5972 ctlv3: make flags, commands formats consistent
1. Capitalize first letter
2. Remove period at the end

(followed the pattern in linux coreutil man page)
2016-06-29 15:52:06 -07:00
Hitoshi Mitake
6259318521 *: attach auth token as a gRPC credential
This commit adds a functionality of attaching an auth token to gRPC
connection as a per RPC credential.

For doing this, this commit lets clientv3.Client.Dial() create a
dedicated gRPC connection for doing authentication. With the dedicated
connection, the client calls Authenticate() RPC and obtain its
token. The token is attached to the main gRPC connection with
grpc.WithPerRPCCredentials().

This commit also adds a new option --username to etcdctl (v3). With
this option, etcdctl attaches its auth token to the main gRPC
connection (currently it is not used at all).
2016-05-17 13:26:12 +09:00
Gyu-Ho Lee
c538e0f9a9 etcdctl: update LICENSE header 2016-05-12 20:51:39 -07:00
Gyu-Ho Lee
3e088b3b40 etcdctl/ctlv3: make 'table' printer configurable
Fix https://github.com/coreos/etcd/issues/5296.
2016-05-10 10:02:02 -07:00
Anthony Romano
f07350735d etcdctl: respect --write-out=json for endpoint status command 2016-04-13 17:04:31 -07:00
Xiang Li
ae9b251d99 etcdctl: move endpoint-heath and status into endpoint command 2016-04-12 16:30:26 -07:00