From fa0f27878384e6670a2cfb6935b4db4472096ee8 Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Tue, 15 Aug 2017 11:22:10 -0700 Subject: [PATCH] embed: add 'enable-pprof' tag for config file Fix https://github.com/coreos/etcd/issues/8402. Signed-off-by: Gyu-Ho Lee --- embed/config.go | 2 +- etcd.conf.yml.sample | 31 +++++++++++++++++-------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/embed/config.go b/embed/config.go index e3926f66c..b274bc68e 100644 --- a/embed/config.go +++ b/embed/config.go @@ -109,7 +109,7 @@ type Config struct { Debug bool `json:"debug"` LogPkgLevels string `json:"log-package-levels"` - EnablePprof bool + EnablePprof bool `json:"enable-pprof"` Metrics string `json:"metrics"` // ForceNewCluster starts a new cluster even if previously started; unsafe. diff --git a/etcd.conf.yml.sample b/etcd.conf.yml.sample index 7a3e802eb..c11fee8d9 100644 --- a/etcd.conf.yml.sample +++ b/etcd.conf.yml.sample @@ -35,7 +35,7 @@ max-snapshots: 5 max-wals: 5 # Comma-separated white list of origins for CORS (cross-origin resource sharing). -cors: +cors: # List of this member's peer URLs to advertise to the rest of the cluster. # The URLs needed to be a comma-separated list. @@ -46,16 +46,16 @@ initial-advertise-peer-urls: http://localhost:2380 advertise-client-urls: http://localhost:2379 # Discovery URL used to bootstrap the cluster. -discovery: +discovery: # Valid values include 'exit', 'proxy' discovery-fallback: 'proxy' # HTTP proxy to use for traffic to discovery service. -discovery-proxy: +discovery-proxy: # DNS domain used to bootstrap initial cluster. -discovery-srv: +discovery-srv: # Initial cluster configuration for bootstrapping. initial-cluster: @@ -72,6 +72,9 @@ strict-reconfig-check: false # Accept etcd V2 client requests enable-v2: true +# Enable runtime profiling data via HTTP server +enable-pprof: true + # Valid values include 'on', 'readonly', 'off' proxy: 'off' @@ -90,40 +93,40 @@ proxy-write-timeout: 5000 # Time (in milliseconds) for a read to timeout. proxy-read-timeout: 0 -client-transport-security: +client-transport-security: # DEPRECATED: Path to the client server TLS CA file. - ca-file: + ca-file: # Path to the client server TLS cert file. - cert-file: + cert-file: # Path to the client server TLS key file. - key-file: + key-file: # Enable client cert authentication. client-cert-auth: false # Path to the client server TLS trusted CA key file. - trusted-ca-file: + trusted-ca-file: # Client TLS using generated certificates auto-tls: false -peer-transport-security: +peer-transport-security: # DEPRECATED: Path to the peer server TLS CA file. ca-file: # Path to the peer server TLS cert file. - cert-file: + cert-file: # Path to the peer server TLS key file. - key-file: + key-file: # Enable peer client cert authentication. client-cert-auth: false # Path to the peer server TLS trusted CA key file. - trusted-ca-file: + trusted-ca-file: # Peer TLS using generated certificates. auto-tls: false @@ -132,7 +135,7 @@ peer-transport-security: debug: false # Specify a particular log level for each etcd package (eg: 'etcdmain=CRITICAL,etcdserver=DEBUG'. -log-package-levels: +log-package-levels: # Force to create a new one member cluster. force-new-cluster: false