15013 Commits

Author SHA1 Message Date
zhoulin xie
cc08c1bd2e clientv3/integration/leasing_test.go: Fix t.Fatalf error message
Signed-off-by: zhoulin xie <zhoulin.xie@daocloud.io>
2019-04-10 13:19:50 -04:00
Luc Perkins
a621d807f0
documentation: initial metadata additions for website generation (#10596)
Signed-off-by: lucperkins <lucperkins@gmail.com>
2019-04-01 13:57:24 -07:00
Paco
be39aa5bb2 Documentation: add Python client for etcd v3 2019-03-29 06:09:38 -04:00
Xiang Li
952b9e75c6
Merge pull request #10590 from jingyih/fix_readIndex_for_learner
raft: leader respond to learner read index message
2019-03-28 16:51:35 -07:00
Jingyi Hu
5088d70d69 raft: leader response to learner MsgReadIndex
Leader should check message sender after receiving MsgReadIndex, even
when raft quorum is 1. The message could be sent from learner node, and
leader should respond.
2019-03-28 16:14:32 -07:00
Xiang Li
a645e27486
Merge pull request #10591 from purpleidea/bug/fatal-corruption
etcdserver: Use panic instead of fatal on no space left error
2019-03-28 15:19:33 -07:00
Xiang Li
d5e94b1c0d
Merge pull request #10557 from johncming/add_test
contrib/raftexample: add test for httpKVAPI.
2019-03-28 11:39:45 -07:00
James Shubin
368f70a37c etcdserver: Use panic instead of fatal on no space left error
When using the embed package to embed etcd, sometimes the storage prefix
being used might be full. In this case, this code path triggers, causing
an: `etcdserver: create wal error: no space left on device` error, which
causes a fatal. A fatal differs from a panic in that it also calls
os.Exit(1). In this situation, the calling program that embeds the etcd
server will be abruptly killed, which prevents it from cleaning up
safely, and giving a proper error message. Depending on what the calling
program is, this can cause corruption and data loss.

This patch switches the fatal to a panic. Ideally this would be a
regular error which would get propagated upwards to the StartEtcd
command, but in the meantime at least this can be caught with recover().

This fixes the most common fatal that I've experienced, but there are
surely more that need looking into. If possible, the errors should be
threaded down into the code path so that embedding etcd can be more
robust.

Fixes: https://github.com/etcd-io/etcd/issues/10588
2019-03-27 15:24:33 -04:00
Sahdev Zala
9c2b88d783
Merge pull request #10583 from johncming/correct_err
etcdmain: use same error.
2019-03-26 15:03:38 -04:00
Sahdev P. Zala
56f1bce161 raft/doc: clarify the case of out of date term
Clarify the doc.

Fixes #10491
2019-03-26 14:00:24 -04:00
johncming
11272ed320 etcdmain: use same error. 2019-03-26 11:21:47 +08:00
Xiang Li
7a5acb4a43
Merge pull request #10574 from johncming/rename_err
raft: more precise that rename res to err.
2019-03-22 11:35:51 -07:00
caoming
92d5d19ce9 raft: more precise that rename res to err. 2019-03-22 10:18:00 +08:00
mengjin
41f7142ff9 doc: fix document example error 2019-03-21 08:21:03 -04:00
Sam Batschelet
122744c660 Documentation: update force-new-cluster flag usage for v3
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2019-03-20 18:06:42 -04:00
Xiang Li
77d4b742cd
Merge pull request #10562 from johncming/naked_return
contrib/raftexample: fix naked return.
2019-03-19 21:43:26 -07:00
Jingyi Hu
affaa36190 bill-of-materials: fix test failure
Re-generated bill-of-materials.json.
2019-03-19 22:07:00 -04:00
johncming
4452d4be22 contrib/raftexample: fix naked return. 2019-03-20 09:52:12 +08:00
Xiang Li
09d0844379
Merge pull request #10548 from jingyih/add_TestMemberAddWithExistingURLs
clientv3/integration: Add TestMemberAddWithExistingURLs
2019-03-19 15:23:15 -07:00
Xiang Li
2d9b32dc3d
Merge pull request #10542 from johncming/usecancel
integration: use cancel instead of close.
2019-03-19 14:19:32 -07:00
Xiang Li
ec1cbce10e
Merge pull request #10541 from johncming/embed-comment
embed: Modify the comments to be more precise.
2019-03-19 14:18:44 -07:00
Xiang Li
6df40e1c70
Merge pull request #10550 from johncming/unused
clientv3: clean up unused code.
2019-03-19 14:17:41 -07:00
Xiang Li
b1e8218072
Merge pull request #10553 from damnever/damnever-patch-1
doc: fix `member add` usage
2019-03-18 20:47:55 -07:00
johncming
51cdbb6d1a contrib/raftexample: add test for struct httpKVAPI. 2019-03-19 11:12:47 +08:00
Jingyi Hu
9bd86a647f clientv3: Add TestMemberAddWithExistingURLs
TestMemberAddWithExistingURLs ensures adding a new member with URLs
already being used in the cluster will not succeed.
2019-03-18 12:48:44 -07:00
X.C.Dong
1d764511f6
doc: fix member add usage 2019-03-18 14:47:41 +08:00
johncming
662fd55084 clientv3: clean up unused code. 2019-03-18 10:34:41 +08:00
caoming
97509833e2 integration: use cancel instead of close. 2019-03-14 11:14:43 +08:00
caoming
874532c2da embed: Modify the comments to be more precise. 2019-03-14 10:59:52 +08:00
Xiang Li
e1ca3b4434
Merge pull request #10531 from JoeWrightss/patch-3
Fix some variable spelling errors
2019-03-12 12:09:09 -07:00
Xiang Li
4478993fbc
Merge pull request #10516 from shreyas-s-rao/wal-verify-func
wal: add Verify function to perform corruption check on wal contents
2019-03-12 12:06:36 -07:00
Shreyas Rao
bb3eb8fea9 wal: Add test for Verify
Signed-off-by: Shreyas Rao <shreyas.sriganesh.rao@sap.com>
2019-03-12 22:25:25 +05:30
shreyas-s-rao
3d6862fe0d wal: add Verify function to perform corruption check on wal contents
Signed-off-by: Shreyas Rao <shreyas.sriganesh.rao@sap.com>
2019-03-12 22:25:25 +05:30
Xiang Li
dc50416157
Merge pull request #10534 from johncming/close_reader
close http request body after read it.
2019-03-12 08:25:32 -07:00
johncming
e46af034df bugfix: adjust or add close request body.
affected modules:
- lease/leasehttp
- contrib/raftexample
2019-03-12 22:41:55 +08:00
Xiang Li
b7ad8c6741
Merge pull request #10535 from johncming/fix_close_pos
etcdserver/api/rafthttp: fix the location of close http body.
2019-03-11 09:17:13 -07:00
johncming
bd41f74168 etcdserver/api/rafthttp: fix the location of close http body. 2019-03-11 22:20:38 +08:00
zhoulin xie
939b4f8599 clientv3/balancer/grpc1.7-health.go: Fix variable spelling error
Signed-off-by: zhoulin xie <zhoulin.xie@daocloud.io>
2019-03-10 01:11:02 +08:00
Xiang Li
6da17cda18
Merge pull request #10515 from Prototik/fix-sd-notify
etcdmain: fix sd_notify for restricted environments
2019-03-08 15:34:47 -08:00
Xiang Li
4dc9d8b058
Merge pull request #10503 from spzala/v3argorder10431
clientV3: fix behavior of WithPrefix and WithFromKey functions
2019-03-08 11:59:17 -08:00
Xiang Li
e80d1745be
Merge pull request #10420 from spzala/watch10340
clientV3watch: do not return ctx canceled when Close watch
2019-03-08 11:57:44 -08:00
Gyuho Lee
81b71da66d
Merge pull request #10527 from etcd-io/gyuho-patch-1
docs: update PyYAML to 4.2b1
2019-03-07 11:17:20 -08:00
Gyuho Lee
5ed26c7c48
docs: update PyYAML to 4.2b1
https://github.com/etcd-io/etcd/network/alert/docs/requirements.txt/pyyaml/open
2019-03-07 11:14:10 -08:00
Xiang Li
949bcbddbe
Merge pull request #10526 from jingyih/improve_mvcc_index_concurrency
mvcc: release lock early when traversing index
2019-03-06 15:48:48 -08:00
Jingyi Hu
93732df3ef mvcc: release lock early when traversing index
Make a copy-on-write clone of index tree when traversing. So that lock
can be released right after the clone to improve backend concurrency.
2019-03-06 14:26:17 -08:00
Xiang Li
4b69cfc56b
Merge pull request #10492 from nolouch/fix-lessor
lease: fix deadlock with Renew lease when the checkpointor is set
2019-03-06 10:23:57 -08:00
Xiang Li
b08e6db0e8
Merge pull request #10506 from jingyih/improve_etcd_backend_readability
mvcc/backend: rename Lock() to RLock() in ReadTx interface
2019-03-05 14:54:04 -08:00
Jingyi Hu
1c19f126cb mvcc/backend: rename ReadTx Lock() to RLock()
For better code readability, renaming Lock() to RLock() in ReadTx
interface.
2019-03-05 13:53:27 -08:00
Sergey Shatunov
fbf732d3dc
etcdmain: fix sd_notify for restricted environments
Remove call to dumb IsRunningSystemd() as it doesn't check anything
2019-03-02 23:44:39 +07:00
Xiang Li
2c69559819
Merge pull request #10513 from jutley/txn-newline-documentation
etcdctl: Update README to clarify newline syntax in TXN
2019-03-02 15:23:31 +08:00