Commit Graph

75 Commits (1f734e0299e44cef5e9e00e369eee4b42fcfc3a2)

Author SHA1 Message Date
Gyu-Ho Lee 8463b377d9 etcdmain: add 'listen-metrics-urls' option
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-07-14 11:14:09 -07:00
Xiang Li 0fe8fdcb29 Merge pull request #8123 from yudai/revision_compactor
Compactor: Add Revisional compactor
2017-06-22 16:34:28 -07:00
Iwasaki Yudai a3f8f47422 *: add Revision compactor 2017-06-21 15:41:07 -07:00
Anthony Romano 7d7d1ae6a0 etcdmain: configure CRL file through command line 2017-06-19 15:23:41 -07:00
fanmin shi 9e7740011b etcdserver: add --max-request-bytes flag 2017-05-25 11:01:38 -07:00
fanmin shi e9f464debc integration: creation of cluster now takes maxTxnOps 2017-05-24 14:48:44 -07:00
fanmin shi ae7ddfb483 etcdserver: add --max-txn-ops flag
--max-txn-ops allows users to define the maximum transaction operations
for each txn request. it defaults at 128.

Fixes #7826
2017-05-24 10:32:32 -07:00
Hitoshi Mitake f8a290e7ca *: support jwt token in v3 auth API
This commit adds jwt token support in v3 auth API.

Remaining major ToDos:
- Currently token type isn't hidden from etcdserver. In the near
  future the information should be completely invisible from
  etcdserver package.
- Configurable expiration of token. Currently tokens can be valid
  until keys are changed.

How to use:
1. generate keys for signing and verfying jwt tokens:
 $ openssl genrsa -out app.rsa 1024
 $ openssl rsa -in app.rsa -pubout > app.rsa.pub
2.  add command line options to etcd like below:
--auth-token-type jwt \
--auth-jwt-pub-key app.rsa.pub --auth-jwt-priv-key app.rsa \
--auth-jwt-sign-method RS512
3. launch etcd cluster

Below is a performance comparison of serializable read w/ and w/o jwt
token. Every (3) etcd node is executed on a single machine. Signing
method is RS512 and key length is 1024 bit. As the results show, jwt
based token introduces a performance overhead but it would be
acceptable for a case that requires authentication.

w/o jwt token auth (no auth):

Summary:
  Total:        1.6172 secs.
  Slowest:      0.0125 secs.
  Fastest:      0.0001 secs.
  Average:      0.0002 secs.
  Stddev:       0.0004 secs.
  Requests/sec: 6183.5877

Response time histogram:
  0.000 [1]     |
  0.001 [9982]  |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  0.003 [1]     |
  0.004 [1]     |
  0.005 [0]     |
  0.006 [0]     |
  0.008 [6]     |
  0.009 [0]     |
  0.010 [1]     |
  0.011 [5]     |
  0.013 [3]     |

Latency distribution:
  10% in 0.0001 secs.
  25% in 0.0001 secs.
  50% in 0.0001 secs.
  75% in 0.0001 secs.
  90% in 0.0002 secs.
  95% in 0.0002 secs.
  99% in 0.0003 secs.

w/ jwt token auth:

Summary:
  Total:        2.5364 secs.
  Slowest:      0.0182 secs.
  Fastest:      0.0002 secs.
  Average:      0.0003 secs.
  Stddev:       0.0005 secs.
  Requests/sec: 3942.5185

Response time histogram:
  0.000 [1]     |
  0.002 [9975]  |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  0.004 [0]     |
  0.006 [1]     |
  0.007 [11]    |
  0.009 [2]     |
  0.011 [4]     |
  0.013 [5]     |
  0.015 [0]     |
  0.016 [0]     |
  0.018 [1]     |

Latency distribution:
  10% in 0.0002 secs.
  25% in 0.0002 secs.
  50% in 0.0002 secs.
  75% in 0.0002 secs.
  90% in 0.0003 secs.
  95% in 0.0003 secs.
  99% in 0.0004 secs.
2017-03-06 19:46:03 -08:00
fanmin shi 80ab321f9d etcdmain: whitelist etcd binary flags 2017-02-15 09:51:50 -08:00
Vimal Kumar f80914fba2 embed/etcd.go: make v2 endpoint optional. fixes #7100 2017-01-20 11:49:52 +05:30
crandl201 36b2d3f5eb etcdmain: add --metrics flag for exposing histogram metrics
this adds a new flag, --metrics, that can be used to enable extensive (histogram) metrics.

Fixes #7024
2016-12-28 13:04:52 -05:00
Gyu-Ho Lee 6ffd7e3ed1 etcdmain: configurable 'etcd' binary log-output
Fix https://github.com/coreos/etcd/issues/5449.
2016-11-03 14:18:12 -07:00
Xiang Li 3d109be3b4 Merge pull request #3621 from yichengq/usage-stderr
etcdmain: print usage in stderr when flag.Parse fail
2016-07-13 16:56:26 -07:00
Anthony Romano f4f33ea767 etcdmain, embed: export Config and StartEtcd into embed/
Lets programs embed etcd.

Fixes #5430
2016-07-13 10:40:03 -07:00
smallfish e6d15b966c etcdserver/api/v2http, Documentation: fix debug pprof index miss / in end 2016-07-08 10:21:05 +08:00
davygeek 8c96d2573f *: fixed some warning 2016-06-30 23:13:46 +08:00
Xiang Li 8ea6be38ba *: remove old flag support
These legacy flags support are here only because we do not want
CoreOS updates to break people.

Now people will be aware of that they switch to etcd3. Do not need
to support 0.x flags any more.
2016-06-17 14:51:45 -07:00
Xiang Li d68664841c *: make auto-compaction-retention non-experimental 2016-06-17 10:04:31 -07:00
Katsuyuki Tateishi 8b75a33398 *: replace '-' with '--' for long options
A long option should have double dashes (cf. #4595),
so are error messages.
2016-06-06 12:25:45 +09:00
Gyu-Ho Lee ef44f71da9 *: update LICENSE header 2016-05-12 20:51:48 -07:00
Anthony Romano dcb3b7aecf *: scrub legacy ports from code and scripts 2016-05-11 13:46:30 -07:00
Ajit Yagaty 8bc5ab9f8d etcd: Configuration file for etcd server.
Added a new command line option to etcd server to read in a YAML
based configuration file. I've also added an example configuration
file with comments and a set of test cases.
2016-05-09 18:17:27 -07:00
Xiang Li 973ad5aa7c *: support auto tls on client side 2016-05-02 16:17:49 -07:00
Gyu-Ho Lee 3ad8e91e00 *: fix flag location, minor typo 2016-04-25 09:41:11 -07:00
Anthony Romano 9b2c963179 etcdserver: configurable backend size quota
Configurable with the flag --experimental-quota-backend-bytes and
through ServerConfig.QuotaBackendBytes.

Fixes #4894
2016-03-29 18:39:25 -07:00
Xiang Li a120ca16c0 etcdctlv3: accept evn for global configuration flags 2016-03-25 14:23:32 -07:00
Xiang Li 70a9391378 *: enable v3 by default 2016-03-23 17:01:36 -07:00
Xiang Li d3809abe42 *: gRPC + HTTP on the same port
We use cmux to do this since we want to do http+https on the same
port in the near future too.
2016-03-21 14:29:25 -07:00
Anthony Romano 3fed78ae7b Merge pull request #4484 from heyitsanthony/auto-tls
automatic peer TLS
2016-03-21 12:59:29 -07:00
Anthony Romano e9b2bd751d etcdmain: add --peer-auto-tls option
Lets the peer generate its own (unsigned) certs.
2016-03-21 11:38:23 -07:00
Gyu-Ho Lee 67c2384bdf *: replace '-' with '--' in doc
Fix https://github.com/coreos/etcd/issues/4595.
2016-03-21 11:12:43 -07:00
Xiang Li d265fe000c *: support time based auto compaction.
Fix https://github.com/coreos/etcd/issues/3906.

We will have extensive doc to talk about what is compaction
and what is auto compaction soon.
2016-02-25 16:02:03 -08:00
Anthony Romano c5b51946eb *: exported godoc fixups 2016-02-21 20:36:44 -08:00
Hitoshi Mitake 588f655b4e etcdmain: add an option for pprof
This commit adds a new option for activating profiling based on pprof
in etcd process.
 - -enable-pprof: boolean type option which activates profiling

For example, if a client URL is http://localhost:12379, users and
developers access heap profiler with this URL:
http://localhost:12379/debug/pprof/heap
2016-01-13 16:12:26 +09:00
Gyu-Ho Lee 12b4a122ce etcdmain: minor typo, make descriptions consistent
This fixes some typos and make help.go and config.go flag descriptions
consistent with each other.
2015-11-10 13:00:08 -08:00
Gyu-Ho Lee 5eb57c2aee etcdmain: more description for init cluster token
This adds more description to initial-cluster-token from
https://github.com/coreos/etcd/issues/3690 to help.go.
2015-11-10 09:40:08 -08:00
Gyu-Ho Lee 52782cf8ee etcdmain: make flags and formats idential
This makes flagsline and config.go identical in its flag description and some
punctuation conventions.
2015-10-25 06:31:37 -07:00
Yicheng Qin 7ba352d9ca etcdmain: print usage in stderr when flag.Parse fail
This fits the requirement of stderr.

I still let `etcd --version` and `etcd --help` print out to stdout
because when users ask explicitly for version/help docs, they expect to see
the doc in stdout.

Ref:
http://www.jstorimer.com/blogs/workingwithcode/7766119-when-to-use-stderr-instead-of-stdout
2015-09-30 14:19:39 -07:00
Xiang Li 3b70bf87c3 etcdmain: better logging when user forget to set initial flags 2015-09-21 10:43:26 -07:00
Xiang Li 662b4966d0 Merge pull request #3510 from xiang90/v3_raft
etcdmain: support gRPC addr flag
2015-09-12 22:58:08 -07:00
Xiang Li a0cfcf2dd7 etcdmain: support gRPC addr flag 2015-09-12 22:52:51 -07:00
Hitoshi Mitake 6974fc63ed etcdserver: avoid deadlock caused by adding members with wrong peer URLs
Current membership changing functionality of etcd seems to have a
problem which can cause deadlock.

How to produce:
 1. construct N node cluster
 2. add N new nodes with etcdctl member add, without starting the new members

What happens:
After finishing add N nodes, a total number of the cluster becomes 2 *
N and a quorum number of the cluster becomes N + 1. It means
membership change requires at least N + 1 nodes because Raft treats
membership information in its log like other ordinal log append
requests.

Assume the peer URLs of the added nodes are wrong because of miss
operation or bugs in wrapping program which launch etcd. In such a
case, both of adding and removing members are impossible because the
quorum isn't preserved. Of course ordinal requests cannot be
served. The cluster would seem to be deadlock.

Of course, the best practice of adding new nodes is adding one node
and let the node start one by one. However, the effect of this problem
is so serious. I think preventing the problem forcibly would be
valuable.

Solution:
This patch lets etcd forbid adding a new node if the operation changes
quorum and the number of changed quorum is larger than a number of
running nodes. If etcd is launched with a newly added option
-strict-reconfig-check, the checking logic is activated. If the option
isn't passed, default behavior of reconfig is kept.

Fixes https://github.com/coreos/etcd/issues/3477
2015-09-13 09:31:53 +09:00
Xiang Li d94e712d91 *: support wal dir 2015-09-01 09:54:27 -07:00
Xiang Li c1e0b19f9f *: better flag 2015-08-10 09:53:17 -07:00
Xiang Li f004b4dac7 *: etcdserver supports v3 demo 2015-08-08 05:58:29 -07:00
Yicheng Qin 6b8b507312 Merge pull request #3176 from yichengq/reject-high-election
etcdmain: reject unreasonably high values of -election-timeout
2015-07-28 10:33:58 -07:00
Yicheng Qin ec214030d0 etcdmain: reject unreasonably high values of -election-timeout
This helps users to detect setting problem early.
2015-07-28 10:07:57 -07:00
Guohua Ouyang c9769ee966 etcdmain: Don't print flags when flag parse error
At present it prints the whole usage and flags, which cause the exact
error message is hidden two screens above.

Fixes #3141

Signed-off-by: Guohua Ouyang <gouyang@redhat.com>
2015-07-24 21:29:21 +08:00
Shun Yanaura d7276d6ace etcdmain: emend configuration error message
etcd shows an odd message on configuration error like this (partially):
```
... discovery or bootstrap flags are setChoose one of ...
                                      ^^^^^^^^^
```
This commit fixes the message format problem.
2015-07-14 14:42:49 +09:00
Xiang Li cbe00e4415 Merge pull request #2967 from webner/feature/proxy-config
proxy: added endpoint refresh and timeout configuration values
2015-07-03 11:51:15 -07:00