Commit Graph

70 Commits (406f23ce17395e5f27ece38bfce8addb0a661aee)

Author SHA1 Message Date
Gyuho Lee a31c38f3b0 embed: use /dev/null to discard server logs
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-17 06:13:24 -07:00
Gyuho Lee 18b3e45e96 *: support --log-output=discard
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-16 19:09:09 -07:00
Gyuho Lee cc778746fc embed: support "io-discard" for logging, fix racey logging setup
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-16 17:36:00 -07:00
Gyuho Lee c712e08a42 embed,etcdmain: support structured logger
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-16 17:36:00 -07:00
Gyuho Lee 041b9069a2 *: configure server logger
- Add/Document "logger" to support structured logging.
  - This makes functional tests run easier, since zap logger
    provides built-in log redirect to files.
  - "etcd --logger-option=zap" to enable structured logging.
- Current "capnslog" will still be used as "default".
  - We may switch the default or deprecate "capnslog" in v3.5.
  - Either way, will clearly be documented.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-16 17:36:00 -07:00
Gyuho Lee a173e761bb embed: support logger for TLS
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-02 13:42:13 -07:00
Gyuho Lee feb88ec66b embed: update "HostWhitelist" godoc
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-27 06:25:44 -07:00
Gyuho Lee c7cecca575 embed: rename "Config.CorsInfo" to "Config.CORS"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-27 06:25:44 -07:00
Gyuho Lee df6cd22d59 embed: update "CorsInfo" field to "map[string]struct{}"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-27 06:25:44 -07:00
Gyuho Lee cfd8b3e86d embed: move "unsafe" flags to bottom
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-23 19:44:24 -07:00
Gyuho Lee c524ebe6fd embed: deprecate "CAFile" field
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-20 15:36:47 -07:00
Gyuho Lee a66e657cac *: update "pre-vote" flag
Disabled by default, anyway.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-19 07:18:57 -07:00
Gyuho Lee 3092d3bf7f embed: add "ExperimentalPreVote" for Raft
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-06 09:56:19 -08:00
Gyuho Lee 00c1f16f0a embed: add "HostWhitelist"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-28 18:20:50 -08:00
Gyuho Lee 6bbe107225 *: revert "internal/compactor" package change
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Gyuho Lee 4aa0320439 embed: document/validate compaction mode
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-20 17:18:48 -08:00
Gyuho Lee 6acd3b4643 embed: define "embed.CompactorMode*"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-29 15:42:30 -08:00
Gyuho Lee b26b8588b2
Merge pull request #8786 from harryge00/check-empty-hostname
embed: return error when advertise-client-urls are with empty hosts
2018-01-26 10:43:45 -08:00
harryge00 6912a8e59e embed: return error when advertise-client-urls or initial-advertise-peer-urls are with empty hosts 2018-01-26 11:10:09 +08:00
Tavish Armstrong b664b9176c pkg/srv, embed, etcdmain: Support multiple clusters in the same DNS discovery region. 2018-01-24 20:15:48 +00:00
Gyuho Lee 39d0e9c3ca embed: only discard infos when debug flag is off
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-21 14:28:13 -08:00
Gyuho Lee 0133d77f0a etcdmain: display default --enable-v2, --strict-reconfig-check value ("true")
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-14 11:25:20 -08:00
Gyuho Lee af5a5b3998 embed/config: remove v3.2 TODO
Already returning error.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-07 20:37:12 -08:00
Gyu-Ho Lee ae589018cb embed: provide more details on TLS handshake failure
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-12-01 09:40:23 -08:00
Gyu-Ho Lee cffa130253 embed: error on zero heartbeat-interval, election-timeout
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-28 09:53:32 -08:00
Gyu-Ho Lee 3db5ad8d57 embed,etcdmain: add "--experimental-initial-corrupt-check"
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-22 15:27:14 -08:00
Gyu-Ho Lee fe7b094f63 Revert "embed: fix HTTPs + DNS SRV discovery"
This reverts commit f79d5aaca4.
2017-11-15 13:00:21 -08:00
Gyu-Ho Lee cdc71ae38e embed: NewConfig sets LogOutput to "default"
Otherwise, embedded etcd will panic in SetupLogging

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-02 14:41:32 -07:00
Gyu-Ho Lee 6127f785a4 embed: disable grpc server logging by default
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-02 13:19:49 -07:00
Gyu-Ho Lee 4b1e09f2b4 embed: move SetupLogging, LogOutput from etcdmain
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-02 13:19:44 -07:00
Xiang f79d5aaca4 embed: fix HTTPs + DNS SRV discovery 2017-10-05 15:21:45 -07:00
fanmin shi bcef78c665 Merge pull request #8563 from fanminshi/make_auto_compaction_granular
*: support auto-compaction with finer granularity
2017-09-29 11:18:51 -07:00
fanmin shi 733de98cfb *: modify etcd flags to support finner compaction retention 2017-09-28 17:22:44 -07:00
Gyu-Ho Lee 157c8eccf0 embed: define keepalive server options
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-28 11:19:29 -07:00
Anthony Romano 5d669290e3 embed: support experimental v2v3 proxy option 2017-08-31 11:47:41 -07:00
Anthony Romano 1f734e0299 embed: support experimental-corrupt-check-time flag 2017-08-22 09:59:59 -07:00
Gyu-Ho Lee e24de6c9ac embed: add 'enable-pprof' tag for config file
Fix https://github.com/coreos/etcd/issues/8402.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-08-15 11:22:10 -07:00
Gyu-Ho Lee fe344ef302 embed: warns about empty hosts in advertise urls
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-08-10 12:31:58 -07:00
Anthony Romano d5a0d4d696 etcdmain, embed: --auto-peer-tls and --auto-tls for v2 proxy
Fixes #7930
2017-07-21 11:00:22 -07:00
Gyu-Ho Lee 9bb5ede659 embed: configure 'ListenMetricsUrls'
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-07-14 11:14:05 -07:00
Iwasaki Yudai a3f8f47422 *: add Revision compactor 2017-06-21 15:41:07 -07:00
fanmin shi 9e7740011b etcdserver: add --max-request-bytes flag 2017-05-25 11:01:38 -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
Anthony Romano 07ad18178d pkg/srv: package for SRV utilities
Trying to decouple the v2 client from SRV code. Can't move
into discovery/ since that creates a circular dependency. So,
give up and move all the SRV code into a new package.
2017-05-05 09:27:59 -07:00
Gyu-Ho Lee f10a70401b embed: use '*url.URL.Hostname(),Port()' for Go 1.8
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-04-18 12:08:59 -07:00
Anthony Romano 780a7d359c discovery: remove dead token argument from SRVGetCluster
Can add the argument back when it's actually used something.
2017-04-12 16:49:44 -07:00
Jonathan Sokolowski d0d4b1378b embed: Delay setting initial cluster for YAML
NewConfig() sets an initial cluster (potentially using a default name)
but we should clear it in the event another discovery option has been
specified.

PR #7517 attempted to address this however it only worked if the name
was left as "default".

(Completely) Fixes #7516
2017-03-31 10:01:42 +11:00
Jonathan Sokolowski 1a91ed0e99 embed: Clear default initial cluster
NewConfig() should sets initial cluster from name but we should clear it
in the event that another discovery option has been specified.

Fixes #7516
2017-03-16 13:59:06 +11: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
Gyu-Ho Lee b7ee8f4967 embed: use machine default host only for default value, 0.0.0.0
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-03-03 14:25:34 -08:00