Commit Graph

524 Commits (93ae5d2f5b75d25405b651721f06c5e808cd6465)

Author SHA1 Message Date
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
Xiang Li 7bbdad9068 etcdctl: support healthy checking 2015-02-09 14:35:24 -08:00
Yicheng Qin 599e821309 etcdctl/upgrade: use peer flags for peer transport 2015-02-04 21:49:42 -08:00
Barak Michener 37e8d608b3 add documentation link and describe the 404/500 errors better 2015-01-30 19:41:44 -05:00
Barak Michener c66176b538 etcdctl: give more helpful suggestions on removal 2015-01-30 19:23:19 -05:00
Yicheng Qin e966e565c4 etcdctl/backup_command: handle datadir with missed snapshot mark
This helps to recover from the data dir created in v2.0.0-rc1.
2015-01-29 13:32:59 -08:00
Yicheng Qin d0af96d558 etcdctl/backup_command: save snapshot mark in new wal 2015-01-29 12:35:39 -08:00
Brandon Philips 7167cd6ccd Merge pull request #2149 from vdemedes/patch-1
Update README.md
2015-01-27 16:09:20 -08:00
Xiang Li 4c33d12bf8 Merge pull request #2132 from xiang90/ctl
etcdctl: support upgrade
2015-01-27 14:18:16 -08:00
Jonathan Boulle f1ed69e883 *: switch to line comments for copyright
Build tags are not compatible with block comments.
Also adds copyright header to a few places it was missing.
2015-01-26 09:53:30 -08:00
Vadim b2acb12c8e Update README.md
Example output of `$ etcdctl exec-watch` command was wrong and showing non-existing ETCD_VALUE, ETCD_KEY, etc keys. Submitting a PR, which updates those examples with correct keys (ETCD_WATCH_VALUE, ETCD_WATCH_KEY, etc).
2015-01-25 14:10:08 +01:00
Xiang Li c658e9a3e9 etcdctl: support upgrade 2015-01-22 15:51:45 -08:00
Yicheng Qin 37dde76cd5 *: remove consistent-get related stuffs 2015-01-15 22:21:53 -08:00
Yicheng Qin 07a69430c1 *: move etcdserver/idutil -> pkg/idutil 2015-01-13 11:54:51 -08:00
Yicheng Qin 84f62f21ee wal: record and check snapshot 2015-01-06 16:27:40 -08:00
Yicheng Qin 05c921229e etcdserver: add id generator 2014-12-29 13:03:04 -08:00
José Luis Salvador Rufo 910198d117 etcdctl: add environment support to certs args 2014-12-16 16:18:36 +01:00
Xiang Li 53bf7e4b5e wal: rename openAtIndex -> open; OpenAtIndexUntilUsing -> openNotInUse 2014-12-14 19:33:06 -08:00
Xiang Li f538cba272 *: do not backup files still in use 2014-12-14 19:27:22 -08:00
Yicheng Qin 7e6e305c4f Merge branch 'log_interface'
Conflicts:
	raft/raft.go
2014-11-25 14:22:11 -08:00
Owen Smith dbb6a75e3f backup: Ensure dest snapshot dir always exists
Otherwise the SaveSnap operation fails
2014-11-25 16:57:18 +00:00
Owen Smith 9974bf0291 backup: Add fatal if dest snapshot failed
Errors are currently silently swallowed
2014-11-25 14:08:20 +00:00
Ben Darnell 0d680d0e6b Merge remote-tracking branch 'coreos/master' into merge
* coreos/master:
  rafthttp: fix import
  raft: should not decrease match and next when handling out of order msgAppResp
  Fix migration to allow snapshots to have the right IDs
  add snapshotted integration test
  fix test import loop
  fix import loop, add set to types, and fix comments
  etcdserver: autodetect v0.4 WALs and upgrade them to v0.5 automatically
  wal: add a bench for write entry
  rafthttp: add streaming server and client
  dep: use vendored imports in codegangsta/cli
  dep: bump golang.org/x/net/context

Conflicts:
	etcdserver/server.go
	etcdserver/server_test.go
	migrate/snapshot.go
2014-11-21 15:40:11 -05:00
Brian Waldon 9a728a127a dep: bump golang.org/x/net/context
Move from code.google.com/p/go.net/context to
golang.org/x/net/context before bumping to latest.
2014-11-20 10:19:12 -08:00
Ben Darnell 355ee4f393 raft: Integrate snapshots into the raft.Storage interface.
Compaction is now treated as an implementation detail of Storage
implementations; Node.Compact() and related functionality have been
removed. Ready.Snapshot is now used only for incoming snapshots.

A return value has been added to ApplyConfChange to allow applications
to track the node information that must be stored in the snapshot.

raftpb.Snapshot has been split into Snapshot and SnapshotMetadata, to
allow the full snapshot data to be read from disk only when needed.

raft.Storage has new methods Snapshot, ApplySnapshot, HardState, and
SetHardState. The Snapshot and HardState parameters have been removed
from RestartNode() and will now be loaded from Storage instead.
The only remaining difference between StartNode and RestartNode is that
the former bootstraps an initial list of Peers.
2014-11-19 16:40:26 -05:00
Xiang Li 78865aa7f7 Merge pull request #1657 from xiangli-cmu/backup
*: add ctl backup support
2014-11-07 13:30:54 -08:00
Xiang Li 0d541e6338 *: add ctl backup support 2014-11-07 13:27:44 -08:00
Brian Waldon 2d942e970b etcdctl: add --ca-file, --cert-file, --key-file flags 2014-11-06 12:50:38 -08:00
Brian Waldon f4ea274555 etcdctl: centralize getEndpoints logic 2014-11-06 10:54:59 -08:00
Jonathan Boulle f7434b55e5 *: add copyright header to remaining files 2014-11-03 23:29:15 -08:00
Brian Waldon f0760d6246 client: elevate context to caller of MembersAPI 2014-10-31 17:27:42 -07:00
Brian Waldon b47631b38f etcdctl: respect --no-sync in member subcommands 2014-10-31 17:25:05 -07:00
Brian Waldon 22b86684f0 etcdctl: sync before running member subcommands 2014-10-31 17:25:05 -07:00
Brian Waldon f6e8b677cf client: pass httpActionDo into NewMembersAPI 2014-10-31 17:25:05 -07:00
Brian Waldon f35130a0ed etcdctl: clean up formatting of member add 2014-10-31 15:37:08 -07:00
Brandon Philips 6b4485d1ae etcdctl: take a name and print out the initial cluster
To help the user lets print out the configuration that they will need to give
to their new member:

$ etcdctl member add infra4 http://localhost:7004
added member 9bf1b35fc7761a23 to cluster
ETCD_NAME="infra4"
ETCD_INITIAL_CLUSTER="node2=http://localhost:7002,node3=http://localhost:7003,infra4=http://localhost:7004,node1=http://localhost:7001"

This is a little weird because the API doesn't take a name so the user gives us
a name and we just pass it on through.
2014-10-31 15:05:23 -07:00
Brandon Philips 8f3be206ed etcdctl: add help on the members subcommands 2014-10-31 14:50:23 -07:00
Brian Waldon f0c3385cfc etcdctl: wire up --peers for member commands 2014-10-31 12:21:15 -07:00
Brian Waldon 8b8b3efdaa client: accept slice of endpoints 2014-10-31 12:21:15 -07:00
Brian Waldon dee912f2fd etcdctl: break out mustNewMembersAPI 2014-10-31 12:21:08 -07:00
Brian Waldon bc62b05c7f etcdctl: break out getPeersFlagValue 2014-10-31 12:21:00 -07:00
Brian Waldon 64a12e9341 Merge pull request #1511 from coreos/set-watch-consistency-to-strong
etcdctl: Set watch consistency to STRONG
2014-10-30 16:52:50 -07:00
Brian Waldon d36a3e18d2 etcdctl: remove SetConsistency call
This call to SetConsistency is explicitly setting the default
value, so it's really unnecessary.
2014-10-30 13:45:59 -07:00
Brian Waldon 6087e2b2f6 Merge pull request #1509 from bcwaldon/etcdctl-102
etcdctl: add --sort flag to ls command
2014-10-30 13:33:37 -07:00
micahhausler 2be3f870cc etcdctl: Set watch consistency to STRONG 2014-10-29 18:11:05 -07:00
Pierre Phaneuf 97597eca03 etcdctl: add --sort flag to ls command
This is a port of coreos/etcdctl#102
2014-10-29 17:45:11 -07:00
Brian Waldon 243886edc8 etcdctl: add -p to ls command
This is a port of coreos/etcdctl#96
2014-10-29 17:42:21 -07:00
Brian Waldon f6e242aa01 etcdctl: impl members commands 2014-10-29 15:09:23 -07:00
Brian Waldon 1539d5c49c etcdctl: update to meet go vet 2014-10-22 17:52:40 -07:00
Brian Waldon 69842b344d etcdctl: reflect build script location in README.md 2014-10-22 17:52:40 -07:00
Brian Waldon 52e08720b7 etcdctl: remove build indicator from README.md 2014-10-22 17:52:40 -07:00
Brian Waldon 29ef918808 etcdctl: import from external repo 2014-10-22 17:52:40 -07:00