101 Commits

Author SHA1 Message Date
Xiang Li
448ca20cdc etcdctl: fix exec watch command
The previous flag parsing has a small issue. It uses
`recursive == true` and `after-index == 0` to determine
if user specifies the sub flags. This is incorrect since
user can specify `after-index = 0`. Then the flag parsing
would be confused.

This commit explicitly find the `--` in the remaining args
and determine the key and cmdArgs accordingly.
2015-07-23 13:13:15 +08:00
Yicheng Qin
604709cad7 etcdctl: update -peers to default to use schema
Change its default value from `127.0.0.1:4001,127.0.0.1:2379` to
`http://127.0.0.1:4001,http://127.0.0.1:2379`

Adding HTTP schema makes its format consistent with etcd's xxx-urls
flags.
2015-07-21 12:53:21 -07:00
Mohammad Samman
43437e21f9 etcdctl: added domain discovery flag
provided a domain, will look up SRV records for etcd endpoints

Fixes #2636
2015-07-21 12:53:21 -07:00
Xiang Li
ee82ee05b4 etcdctl: support member update command 2015-07-21 12:53:20 -07:00
Xiang Li
9f9661f513 etcdctl: print out key and action when watching recursively 2015-07-21 12:53:20 -07:00
Xiang Li
87ef0f0b3e godep: remove go-etcd dependency 2015-07-21 12:53:20 -07:00
Xiang Li
071ad9f72b etcdctl: health use etcd/client 2015-07-21 12:53:20 -07:00
Xiang Li
0b1ddce889 etcdctl: import snap use etcd/client 2015-07-21 12:53:20 -07:00
Xiang Li
adeb101e04 etcdctl: remove old stuff 2015-07-21 12:53:20 -07:00
Xiang Li
759c156e3e etcdctl: exec_watch use etcd/client 2015-07-21 12:53:20 -07:00
Xiang Li
5b01b3877f etcdctl: watch use etcd/client 2015-07-21 12:53:20 -07:00
Xiang Li
b20c06348d etcdctl: ls use etcd/client 2015-07-21 12:53:19 -07:00
Xiang Li
ae1669de26 etcdctl: updatedir use etcd/client 2015-07-21 12:53:19 -07:00
Xiang Li
f12ae45c6a etcdctl: update use etcd/client 2015-07-21 12:53:19 -07:00
Xiang Li
58b19a7c1e etcdctl: rmdir use etcd/client 2015-07-21 12:53:19 -07:00
Xiang Li
9d7a8dd2b0 etcdctl: mk use etcd/client 2015-07-21 12:53:19 -07:00
Xiang Li
61befc7ce6 etcdctl: minor cleanup 2015-07-21 12:53:19 -07:00
Xiang Li
e3fcc450cf etcdctl: make rm use etcd/client 2015-07-21 12:53:19 -07:00
Xiang Li
9d9c3a7180 etcdctl: make setdir/mkdir use etcd/client 2015-07-21 12:53:19 -07:00
Xiang Li
db4b18aee3 etcdctl: make set command use etcd/client 2015-07-21 12:53:19 -07:00
Xiang Li
e9478ba630 etcdctl: make get command use etcd/client 2015-07-21 12:53:19 -07:00
Xiang Li
61e9b99edb Merge pull request #2417 from kelseyhightower/improve-etcdctl-ls-command-help
etcdctl: update the ls subcommand help to match behavior
2015-07-09 11:33:19 -06:00
Barak Michener
64ec8af91b *: Rename security to auth 2015-06-15 18:18:50 -04:00
Xiang Li
f59da0e453 *:fix point-in-time backup
Backup process should be able to read all WALs until io.EOF to
generate a point-in-time backup.

Our WAL file is append-only. And the backup process will lock all
files before start reading, which can prevent the gc routine from
removing any files in the middle.
2015-06-15 11:12:28 -07:00
Barak Michener
a4d1a5a6e5 *: Add security/auth support to etcdctl and etcd/client
add godep for speakeasy and auth entry parsing
add security_user to client
add role to client
add role commands
add auth support to etcdclient and etcdctl(member/user)
add enable/disable to etcdctl
better error messages, read/write/readwrite
Bump go-etcd to include codec changes, add new dependency
verify the error for revoke/add if nothing changed, remove security-merging prefix
2015-06-10 16:58:10 -04:00
Xiang Li
f0edf06b6d etcdctl: minor cleanup 2015-06-02 19:50:37 -07:00
Xiang Li
079e7c10a0 etcdctl: move format to format.go 2015-06-02 19:29:05 -07:00
Xiang Li
26682b663d etcdctl: cleanup etcdctl exit code 2015-06-02 19:01:41 -07:00
Yicheng Qin
3d8fe3b3ca etcdctl/cluster_health: improve output if failed to get leader stats
When failing to get leader stats, it said 'cluster is unhealthy' before.
This is confusing when it cannot get stats because advertised client urls
are set wrong and the cluster is healthy.
2015-05-14 18:52:10 -07:00
Brandon Philips
57270ec0b7 etcdctl: add extended as output format
extended wasn't documented in the help as one of the output formats, fix
this!
2015-04-21 10:22:58 -07:00
Jud White
d0f1bf9f8e README.md: change setDir -> setdir 2015-04-18 05:33:32 -05:00
Xiang Li
d3778b1286 etcdctl: backup tool should use the new layout 2015-04-14 11:49:54 -07:00
Xiang Li
c66777f80f Merge pull request #2640 from xiang90/import
etcdctl: refactor message in import command
2015-04-07 15:09:34 -07:00
Xiang Li
8c0b01d35b etcdctl: refactor message in import command 2015-04-07 15:08:07 -07:00
Xiang Li
74fd2b0536 Merge pull request #2638 from xiang90/import
etcdctl: import hidden keys
2015-04-07 12:53:18 -07:00
Xiang Li
2c647409b9 etcdctl: import hidden keys 2015-04-07 12:41:05 -07:00
Alex Crawford
d9ad6aa2a9 *: update to use IANA-assigned ports 2015-04-06 13:49:43 -07:00
Barak Michener
ad7a12066f etcdctl: fix import typos 2015-03-31 16:41:35 -04:00
Xiang Li
1024f587e0 etcdctl: main routine of import command should wait for goroutine existing 2015-03-31 11:55:19 -07:00
Xiang Li
8ac565bc38 etcdct: adopt new client port by default
etcdserver uses both 4001 and 2379 for serving client requests by
default. etcdctl supports both ports by default.
2015-03-31 09:56:42 -07:00
Xiang Li
84cf0843bf etcdctl: add migratesnap command 2015-03-27 19:23:38 -07:00
Xiang Li
45032480f1 *: remove upgrading related stuff 2015-03-27 15:28:00 -07:00
Xiang Li
b218fc67e4 etcdctl: mark unstarted member 2015-03-03 11:00:40 -08:00
Kelsey Hightower
b15806e189 etcdctl: update the ls subcommand help to match behavior
Currently the `etcdctl ls` subcommand help output is a bit misleading.
It mentions that using the `--recursive` flag will output all keys and
values for a given path:

    --recursive  returns all values for key and child keys

This is inaccurate. The `--recursive` will only output the key names
under the given path. Fix the issue by updating the help string for
the `--recursive` flag.

    --recursive  returns all key names recursively for the given path

Fixes #2379.
2015-03-03 06:25:22 -08:00
Brian Waldon
3b41b77cd7 client: ClientConfig -> Config 2015-02-28 10:22:51 -08:00
Brian Waldon
74fe28c5e0 client: exchange ClientConfig for SyncableHTTPClient 2015-02-28 10:22:50 -08:00
Xiang Li
9b6fcfffb6 *: replace our own metrics with codahale/metrics 2015-02-28 10:11:53 -08:00
James Pharaoh
05ecdbc617 etcdtcl: fix etcdctl cluster-health ignores SSL settings
etcdctl reconnects to the leader, but was not picking up ssl settings in this
case, which causes it to show unhealthy when this is not the case.

Fixes #2373
2015-02-25 13:19:07 +01:00
Barak Michener
92dca0af0f *: remove shadowing of variables from etcd and add travis test
We've been bitten by this enough times that I wrote a tool so that
it never happens again.
2015-02-17 16:31:42 -05:00
Xiang Li
f97a263a95 etcdctl: add default peerurl for upgrade subcmd 2015-02-10 15:13:12 -08:00