Sam Batschelet
9915d02022
*: Change gRPC proxy to expose etcd server endpoint /metrics
...
This PR resolves an issue where the `/metrics` endpoints exposed by the proxy were not returning metrics of the etcd members servers but of the proxy itself.
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2019-04-10 16:09:32 -04:00
johncming
11272ed320
etcdmain: use same error.
2019-03-26 11:21:47 +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
Gyuho Lee
8d1a62e7ef
*: use default log configuration for server
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-02-21 10:57:26 -08:00
WizardCXY
e6c6d8492e
*: add flag to let etcd use the new boltdb freelistType feature
2019-02-14 11:07:08 +08:00
Hitoshi Mitake
65887ae1b4
pkg, clientv3, etcdmain: let grpcproxy rise an error when its cert has non empty CN
...
Fix https://github.com/etcd-io/etcd/issues/9521
2019-01-25 00:43:57 +09:00
Hitoshi Mitake
72dd4a18c5
*: add a new option --enable-grpc-gateway for enabling/disabling grpc gateway
2019-01-23 03:26:34 +09:00
Mark McLoughlin
fcc29894c2
config: multiple logging fixes
...
First, don't panic with invalid --log-outputs. For example:
$> ./bin/etcd --log-outputs foo
2018-12-20 15:05:47.988652 C | embed: unknown log-output "foo" (only supports "default", "stderr", "stdout")
panic: unknown log-output "foo" (only supports "default", "stderr", "stdout")
goroutine 1 [running]:
go.etcd.io/etcd/vendor/github.com/coreos/pkg/capnslog.(*PackageLogger).Panicf(0xc000294b00, 0x10fe067, 0x30, 0xc0001fa398, 0x4, 0x4)
go.etcd.io/etcd/vendor/github.com/coreos/pkg/capnslog/pkg_logger.go:75 +0x161
go.etcd.io/etcd/embed.(*Config).setupLogging(0xc000291400, 0xc0002a85b0, 0x1)
go.etcd.io/etcd/embed/config_logging.go:120 +0x1939
...
Or:
$> ./bin/etcd --log-outputs foo,default --logger zap
panic: multi logoutput for "default" is not supported yet
goroutine 1 [running]:
go.etcd.io/etcd/embed.(*Config).setupLogging(0xc000314500, 0xc0001b2f70, 0x1)
go.etcd.io/etcd/embed/config_logging.go:129 +0x2437
go.etcd.io/etcd/embed.(*Config).Validate(0xc000314500, 0xc000268a98, 0x127e440)
go.etcd.io/etcd/embed/config.go:543 +0x43
Second, don't exit in embed.setupLogging(). Before:
$> ./bin/etcd --log-outputs foo,bar
--logger=capnslog supports only 1 value in '--log-outputs', got ["bar" "foo"]
and after:
$> ./bin/etcd --log-outputs foo,bar
2018-12-20 15:10:24.317982 E | etcdmain: error verifying flags, --logger=capnslog supports only 1 value in '--log-outputs', got ["bar" "foo"]. See 'etcd --help'.
Third, remove duplicated unique strings code. UniqueStringsFromFlag()
is already available to return a sorted slice of values, so just use
that.
Lastly, fix a tiny logging typo in config.
2019-01-17 15:09:26 -05:00
lsytj0413
23862b5d64
refactor(*): remove duplicate GetLogger
2018-12-10 17:58:47 +08:00
Xiang Li
3faed211e5
*: add flags to setup backend related config
2018-11-26 15:50:26 -08:00
Sam Batschelet
fa35126ef8
*: add client support for discovery-srv-name
...
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2018-11-09 10:13:04 -05:00
Gyuho Lee
0ef9ef3c74
*: rerun "gofmt"
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 18:25:39 -07:00
Gyuho Lee
d37f1521b7
*: update import paths to "go.etcd.io/etcd"
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 17:47:55 -07:00
Gyuho Lee
60c63fa34e
etcdmain: remove version/system info print methods
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-07-09 11:26:53 -07:00
Gyuho Lee
abffe0d29a
etcdmain: add "--cipher-suites" flag
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-05 12:54:34 -07:00
Gyuho Lee
671f1c41a8
etcdserver/api/v2discovery: move internal "discovery" package
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-21 09:50:38 -07:00
Gyuho Lee
892f7e02e0
etcdmain: rename "SnapshotCount"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-18 14:39:31 -07:00
Gyuho Lee
f091641e46
etcdmain: remove shadowed error variable
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-09 15:39:44 -07:00
Gyuho Lee
12e2d4a15c
etcdmain: fix log output
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-04 20:07:45 -07:00
Gyuho Lee
f556b78e8c
etcdmain: update v2 proxy ready message
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-04 20:03:56 -07:00
Jiang Xuan
bf432648ae
*: make bcrypt-cost configurable
2018-05-03 11:43:32 -07:00
Gyuho Lee
7da365bd45
etcdmain: silence http server logs
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-02 12:59:17 -07:00
Joe LeGasse
7ea9059453
docs: Update documentation around --listen-metrics-urls
...
The `--listen-metrics-urls` also responds to the `/health` endpoint, but
that was not made clear in the documentation. These updates should help
explain how else that flag can be used.
2018-05-01 11:02:22 -04:00
Gyuho Lee
829c4479f3
etcdmain: support structured logging for discovery service
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-26 14:36:22 -07:00
Gyuho Lee
af5bc439b3
embed,etcdmain: rename to "--log-outputs" flag
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-25 13:20:26 -07:00
Gyuho Lee
f99cb35d29
embed: rename "LogOutput" to "LogOutputs"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-25 10:28:13 -07:00
Eric Chiang
30ee30ffeb
etcdmain: document peer-cert-allowed-cn flag
2018-04-24 13:31:54 -07:00
Gyuho Lee
4f45f5d9dd
Merge pull request #9591 from gyuho/election
...
*: add --initial-election-tick-advance to configure election fast-forward on bootstrap
2018-04-23 10:17:49 -07:00
Gyuho Lee
01fc2901b6
etcdmain: sync logger on exit
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-20 10:58:33 -07:00
Gyuho Lee
85b7a59c56
etcdmain: add "--initial-election-tick-advance"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-19 17:45:23 -07:00
Gyuho Lee
1974785511
etcdmain: accept multiple values in "--log-output"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-17 12:47:06 -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
d5bcf66b6b
etcdmain: pass logger to "transport.SelfCert"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-02 13:42:17 -07:00
Gyuho Lee
57f036d617
etcdmain: update "help" page
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-27 09:00:13 -07:00
Gyuho Lee
3b1eaaee6e
etcdmain: fix "validateClusteringFlags"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-27 06:25:44 -07:00
Gyuho Lee
27ed129f44
etcdmain: update "CORS", "HostWhitelist" flag parsing
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-27 06:25:44 -07:00
Gyuho Lee
35509bf69c
etcdmain: default "--host-whitelist '*'"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-27 06:25:44 -07:00
Gyuho Lee
35b01b982c
etcdmain: use NewUniqueURLsWithExceptions
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-27 06:25:44 -07:00
Gyuho Lee
940200f1ae
etcdmain: move "unsafe" flags to bottom
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-23 19:44:24 -07:00
Gyuho Lee
4f1cf30c7d
etcdmain: use "TrustedCAFile" in grpc_proxy
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-20 15:48:44 -07:00
Gyuho Lee
82ef3f83f6
etcdmain: deprecate 'ca-file' and 'peer-ca-file' flags
...
Has been deprecated since 2.1...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-20 15:31:32 -07:00
Gyuho Lee
706c760a3d
etcdmain: remove deprecated flags from "etcd --help"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-20 15:31:32 -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
1640cdb044
pkg/flags: clean up, add "SelectiveStringsValue"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-19 02:23:06 -07:00
Gyuho Lee
bec3d975e0
etcdmain: handle JSON "listen-metrics-urls"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-15 01:24:53 -04:00
Gyuho Lee
4419661fb1
etcdmain: remove "listen-metrics-urls" manual parsing
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-15 01:23:33 -04:00
Gyuho Lee
79d3c93568
etcdmain: replace "--host-whitelist" with "flags.StringSlice"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-14 21:38:20 -04:00
Gyuho Lee
b48d3eb380
etcdmain: add "--experimental-pre-vote" flag
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-06 09:56:32 -08:00
Gyuho Lee
9f0027dfb2
*: do not whitelist empty hosts
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-28 19:20:10 -08:00