43 Commits

Author SHA1 Message Date
Xiang Li
13f44e4b79 *: update generated proto code 2015-06-29 16:45:25 -07:00
Xiang Li
05e240b892 *: update protobuf 2015-03-25 10:14:35 -07:00
Yicheng Qin
02be882c8f migrate: remove starter code
It has been moved to github.com/coreos/etcd-starter.
2015-03-20 10:51:42 -07:00
Brandon Philips
86ee3e3452 migrate: detect version 2.0.1
Without this code a second start will crash:

```
$ ./bin/etcd -name foobar --data-dir=foobar
2015/03/18 18:06:28 starter: detect etcd version 2.0.1 in foobar
2015/03/18 18:06:28 starter: unhandled etcd version in foobar
panic: starter: unhandled etcd version in foobar

goroutine 1 [running]:
log.Panicf(0x594770, 0x25, 0x208927c70, 0x1, 0x1)
	/usr/local/go/src/log/log.go:314 +0xd0
github.com/coreos/etcd/migrate/starter.checkInternalVersion(0x20889a480, 0x0, 0x0)
	/Users/philips/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/migrate/starter/starter.go:160 +0xf2f
github.com/coreos/etcd/migrate/starter.StartDesiredVersion(0x20884a010, 0x3, 0x3)
	/Users/philips/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/migrate/starter/starter.go:77 +0x2a9
main.main()
	/Users/philips/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/main.go:46 +0x25e

goroutine 9 [syscall]:
os/signal.loop()
	/usr/local/go/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
	/usr/local/go/src/os/signal/signal_unix.go:27 +0x35
```
2015-03-18 18:09:46 -07:00
Brian Waldon
1c03df62a5 client: WaitIndex -> AfterIndex 2015-02-28 10:38:46 -08:00
Yicheng Qin
3fd9136740 migrate/starter: fix v2 data dir checking 2015-02-24 11:47:56 -08:00
Yicheng Qin
4228c703a7 Merge pull request #2341 from yichengq/326
migrate/starter: fix flag parsing
2015-02-19 11:02:07 -08:00
Yicheng Qin
10629c40e1 migrate/starter: fix flag parsing 2015-02-18 23:47:52 -08: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
Yicheng Qin
90b06f874d migrate/functional: fix go build failure 2015-02-17 10:35:30 -08:00
Barak Michener
fdebf2b109 fix parent references 2015-02-13 16:54:15 -05:00
Barak Michener
e9f4be498d migrate: decrease memory usage (only duplicate machines) 2015-02-13 15:26:54 -05:00
Barak Michener
02c52f175f migrate: stop deleting etcd 2015-02-12 19:35:33 -05:00
Yicheng Qin
d74e74d320 Merge pull request #2261 from yichengq/322
migrate: fix setting commit index from snapshot
2015-02-10 09:57:24 -08:00
Yicheng Qin
84dac75ed5 Merge pull request #2213 from yichengq/317
migrate/starter: fix --version output
2015-02-09 23:18:35 -08:00
Yicheng Qin
db88d9764c migrate: fix setting commit index from snapshot 2015-02-09 14:38:38 -08:00
Yicheng Qin
136e0b6e26 migrate/functional: add Upgrade TLS V1 cluster test 2015-02-04 21:49:42 -08:00
Yicheng Qin
1ce7f6e0d0 migrate/starter: fix --version output 2015-02-04 21:28:56 -08:00
Yicheng Qin
871e92ef73 pkg/osutil: add Unsetenv
go1.4 doesn't support static link well, so we stay in go1.3 for a while.
Implement Unsetenv in go1.3 way.
2015-02-04 10:29:20 -08:00
Yicheng Qin
d0205519a8 migrate/starter: unset discovery when setting initial-cluster 2015-02-03 18:29:52 -08:00
Yicheng Qin
f109020b94 migrate/starter: fix default version dir 2015-02-03 14:56:26 -08:00
Yicheng Qin
2d081bd3b9 migrate: support standby mode upgrade 2015-02-03 10:59:43 -08:00
Yicheng Qin
f2f2adc663 migrate/functional: always run tests on CoreOS image 2015-02-03 10:59:43 -08:00
Yicheng Qin
ec5a6e8beb migrate: support start desired version 2015-01-30 00:35:53 -08:00
Barak Michener
91bd02dce1 Merge pull request #2161 from yichengq/311
migrate: set HardState.Term in migration
2015-01-27 13:59:26 -05:00
Barak Michener
55c1635cee comment 2015-01-27 13:54:23 -05:00
Barak Michener
7f91a35313 migrate: convert 0.4 terms to start at 1 2015-01-27 13:10:13 -05:00
Yicheng Qin
517eb340dd migrate: set HardState.Term in migration 2015-01-26 23:41:21 -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
Yicheng Qin
e3b2f08bd0 migrate/cmd/etcd-dump-logs: fix building 2015-01-12 12:17:41 -08:00
Yicheng Qin
84f62f21ee wal: record and check snapshot 2015-01-06 16:27:40 -08:00
Yicheng Qin
9de4e36b6a tools: move etcd-migrate to tools 2014-12-30 22:48:47 -08:00
Jonathan Boulle
4e6cbc937e *: change remaining 0.5 references -> 2.0 2014-12-18 16:14:42 -08:00
Barak Michener
8ece28d4f7 Remove verbose logging and extraneous debug. Fixes #1904 2014-12-15 14:47:02 -05:00
Rob Szumski
e7f5b14f1b migrate: improve logging for name and ID 2014-12-10 11:53:04 -08: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
Barak Michener
ce82a3e7ad Fix migration to allow snapshots to have the right IDs 2014-11-20 16:49:34 -05:00
Barak Michener
2d5ccf12ef add snapshotted integration test 2014-11-20 15:38:08 -05:00
Barak Michener
d1e7fee3ca fix test import loop 2014-11-20 15:38:08 -05:00
Barak Michener
59a0c64e9f fix import loop, add set to types, and fix comments 2014-11-20 15:38:08 -05: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
Barak Michener
192f200d9e Fix up migration tool, add snapshot migration
Fixes all updates since bcwaldon sketched the original, with cleanup and
into an acutal working state. The commit log follows:

fix pb reference and remove unused file post rebase

unbreak the migrate folder

correctly detect node IDs

fix snapshotting

Fix previous broken snapshot

Add raft log entries to the translation; fix test for all timezones. (Still in progress, but passing)

Fix etcd:join and etcd:remove

print more data when dumping the log

Cleanup based on yichengq's comments

more comments

Fix the commited index based on the snapshot, if one exists

detect nodeIDs from snapshot

add initial tool documentation and match the semantics in the build script and main

formalize migration doc

rename function and clarify docs

fix nil pointer

fix the record conversion test

add migration to test suite and fix govet
2014-11-14 16:46:08 -05:00
Brian Waldon
5ea1f2d96f etcd4: migration from v0.4 -> v0.5 2014-11-14 15:57:26 -05:00