11386 Commits

Author SHA1 Message Date
Hitoshi Mitake
939912c425 clientv3, etcdserver: support auth in Watch() 2017-05-20 11:34:45 +09:00
Gyu-Ho Lee
1763f7d4d1 Merge pull request #7919 from gyuho/log-dir
functional-tester: use log-dir as data-dir in etcd-agent
2017-05-16 13:46:57 -07:00
Anthony Romano
271785cd55 Merge pull request #7937 from heyitsanthony/e2e-close-timeout
e2e: Stop() lock/elect etcdctl process if Close times out
2017-05-16 12:34:36 -07:00
Anthony Romano
8f0d4092c3 e2e: Stop() lock/elect etcdctl process if Close times out
Gets backtrace by sending SIGQUIT if Close hangs after sending a SIGINT.
2017-05-16 11:31:23 -07:00
Gyu-Ho Lee
c6219a209d Merge pull request #7933 from gyuho/travis
travis: test builds in other OSes
2017-05-15 22:25:52 -07:00
Gyu-Ho Lee
d826f95c77 travis: test builds in other OSes
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-05-15 16:55:27 -07:00
Gyu-Ho Lee
3e7feb4033 Merge pull request #7931 from gyuho/aaa
pkg/osutil: fix missing 'syscall' import
2017-05-15 14:47:46 -07:00
Gyu-Ho Lee
fba225cee5 pkg/osutil: fix missing 'syscall' import
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-05-15 14:11:54 -07:00
Gyu-Ho Lee
95078c296d Merge pull request #7932 from gyuho/vet
*: remove unnecessary fmt.Sprint
2017-05-15 14:01:23 -07:00
Gyu-Ho Lee
e15020055e *: remove unnecessary fmt.Sprint
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-05-15 13:23:31 -07:00
Anthony Romano
74fd7709ad Merge pull request #7904 from heyitsanthony/osutil-exit
osutil: force SIG_DFL before resending terminating signal
2017-05-15 12:14:37 -07:00
Anthony Romano
31e3899663 Merge pull request #7925 from heyitsanthony/fix-windows-mmap
backend: force initial mmap size to 0 for windows
2017-05-13 21:42:58 -07:00
Anthony Romano
8516d8ccc5 backend: force initial mmap size to 0 for windows
boltdb on windows allocates a file with the full mmap size even if the
db is empty. Force the initial mmap size to 0 so there's no huge initial
db file on windows.

Fixes #7910
2017-05-12 14:34:07 -07:00
Anthony Romano
6ce9aed8c5 Merge pull request #7881 from heyitsanthony/testctl-logging
e2e: more debugging output for lock and elect tests
2017-05-12 12:01:08 -07:00
Anthony Romano
7a1739a3e8 osutil: force SIG_DFL before resending terminating signal
The go runtime won't always reinstall the default signal handler on the
SIGTERM path, so it's possible the signal won't terminate the process.
Instead, force SIG_DFL for the signal.
2017-05-12 11:56:27 -07:00
Anthony Romano
5b4677b7d7 integration: reset default logging level in TestRestartRemoved 2017-05-12 10:22:29 -07:00
Anthony Romano
b9f5a00b13 e2e: more debugging output for lock and elect etcdctl tests
Meant to debug #6464 and #6934

Dumps the output from the etcd/etcdctl servers and SIGQUITs to get a
golang backtrace in case of a hanged process.
2017-05-12 10:22:29 -07:00
Anthony Romano
90893735cf Merge pull request #7917 from heyitsanthony/refactor-backend-paths
snap, etcdserver: tighten up snapshot path handling
2017-05-12 09:33:37 -07:00
Gyu-Ho Lee
2e3d27e910 functional-tester: use log-dir as data-dir in etcd-agent
Persistent data should be configured in agent side.
There is no need to specify the data-dir in tester side.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-05-12 08:30:46 -07:00
fanmin shi
f337754e72 Merge pull request #7914 from fanminshi/doc_snap_warning
*: faq for snapshot warning and dynamically determining snapshotWarningTimeout
2017-05-11 16:48:12 -07:00
Gyu-Ho Lee
aa58aff18c Merge pull request #7918 from gyuho/archive-path
etcd-agent: store failure_archive in log dir
2017-05-11 16:34:43 -07:00
Gyu-Ho Lee
0bcab05465 etcd-agent: store failure_archive in log dir
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-05-11 16:30:04 -07:00
Anthony Romano
71d7c85b6b expect: reload DEBUG_EXPECT for each process
Lets e2e test cases selectively turn on expect debugging to get
full application output written to stdout.
2017-05-11 16:09:31 -07:00
fanmin shi
16e92d1379 faq: explains "snapshotting is taking more..." warning 2017-05-11 15:25:44 -07:00
fanmin shi
8468b38631 backend: dynamically set snapshotWarningTimeout based on db size 2017-05-11 15:25:35 -07:00
Anthony Romano
7a65cb5847 Merge pull request #7916 from heyitsanthony/snip-extra-doc
clientv3: remove duplicate documentation for Do()
2017-05-11 14:45:35 -07:00
Anthony Romano
f6cd4d4f5b snap, etcdserver: tighten up snapshot path handling
Computing the snapshot file path is error prone; snapshot recovery was
constructing file paths missing a path separator so the snapshot
would never be loaded. Instead, refactor the backend path handling
to use helper functions where possible.
2017-05-11 13:46:59 -07:00
Anthony Romano
63c7e9f840 clientv3: remove duplicate documentation for Do() 2017-05-11 13:25:26 -07:00
Gyu-Ho Lee
f63eb2f6a4 Merge pull request #7913 from gyuho/srv
pkg/srv: fix error checks from resolveTCPAddr
2017-05-11 12:12:01 -07:00
Gyu-Ho Lee
3505c254e1 pkg/srv: fix error checks from resolveTCPAddr
So that 'terr' can be returned later.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-05-11 10:53:03 -07:00
Anthony Romano
386374a6d0 Merge pull request #7908 from heyitsanthony/concurrency-proxy
grpcproxy: forward v3lock and v3election requests
2017-05-10 16:41:06 -07:00
fanmin shi
066062a5e0 Merge pull request #7902 from fanminshi/fix_runner
etcd-runner: remove mutex on validate() and release() in global.go
2017-05-10 13:12:09 -07:00
Anthony Romano
00da3ca725 integration: add lock and election services to proxy tests 2017-05-10 13:06:27 -07:00
Anthony Romano
713e006bc6 adpater: adapters for lock and election services 2017-05-10 12:51:05 -07:00
Anthony Romano
fd01db9e60 grpcproxy, etcdmain: add lock and election services to proxy 2017-05-10 12:19:09 -07:00
fanmin shi
b44bd6d2a9 etcd-runner: fix race on nextc 2017-05-10 11:21:17 -07:00
fanmin shi
47f5b7c3ad Merge pull request #7876 from fanminshi/fix_7628
etcdserver: renaming db happens after snapshot persists to wal and snap files
2017-05-09 16:15:41 -07:00
fanmin shi
87d99fe038 etcd-runner: remove mutex on validate() and release() in global.go
election runner can deadlock in atomic release().

suppose election runner has two clients A and B.
if A is a leader and B is a follower, B obtains lock
for release() and waits for A to close(nextc) which signal
next round is ready. However, A can only close(nextc) if it
obtains lock for release(); hence deadlock.

this pr removes atomicity of validate() and release() in global.go
and gives the responsibility of locking to each runner.

FIXES #7891
2017-05-09 15:38:13 -07:00
fanmin shi
dfdaf082c5 etcdserver: add a test to ensure renaming db happens before persisting wal and snap files 2017-05-09 14:00:22 -07:00
fanmin shi
8b7b7222dd etcdserver: renaming db happens after snapshot persists to wal and snap files
In the case that follower recieves a snapshot from leader
and crashes before renaming xxx.snap.db to db but after
snapshot has persisted to .wal and .snap, restarting
follower results loading old db, new .wal, and new .snap.
This will causes a index mismatch between snap metadata index
and consistent index from db.

This pr forces an ordering where saving/renaming db must
happen after snapshot is persisted to wal and snap file.
this guarantees wal and snap files are newer than db.
on server restart, etcd server checks if snap index > db consistent index.
if yes, etcd server attempts to load xxx.snap.db where xxx=snap index
if there is any and panic other wise.

FIXES #7628
2017-05-09 14:00:12 -07:00
Xiang Li
a53a9e167e Merge pull request #7898 from yudai/nit_remove_dup
v3rpc: remove duplicated error case for lease.ErrLeaseNotFound
2017-05-09 12:35:31 -07:00
Xiang Li
b8875515a4 Merge pull request #7890 from yudai/keep_ka_loop_running
clientv3: Do no stop keep alive loop by server side errors
2017-05-09 11:00:21 -07:00
Gyu-Ho Lee
01a985eda5 Merge pull request #7897 from gyuho/bom
scripts: add 'BOM' update script
2017-05-09 10:52:42 -07:00
Iwasaki Yudai
010ffc0692 v3rpc: remove duplicated error case for lease.ErrLeaseNotFound 2017-05-08 20:09:41 -07:00
Gyu-Ho Lee
8c9f01ef53 scripts: add 'BOM' update script
Need this script when we add external dependencies.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-05-08 17:59:11 -07:00
Iwasaki Yudai
aa85b0cea7 clientv3: Do no stop keep alive loop by server side errors 2017-05-08 15:47:34 -07:00
Anthony Romano
aac2292ab5 Merge pull request #7882 from heyitsanthony/srv-priority
gateway: DNS SRV priority
2017-05-08 14:17:04 -07:00
Gyu-Ho Lee
3a2e7653f2 Merge pull request #7879 from gyuho/http-server
embed: gracefully close peer handler
2017-05-08 14:00:45 -07:00
Anthony Romano
c232814003 etcdmain, tcpproxy: srv-priority policy
Adds DNS SRV weighting and priorities to gateway.

Partially addresses #4378
2017-05-08 11:35:18 -07:00
fanmin shi
2655540481 Merge pull request #7892 from fanminshi/add_snashot_duration_metric
backend: add prometheus metric for large snapshot duration.
2017-05-08 11:22:51 -07:00