Skip to content

Commit

Permalink
embed,etcdmain: add "--experimental-initial-corrupt-check"
Browse files Browse the repository at this point in the history
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
  • Loading branch information
gyuho committed Nov 22, 2017
1 parent c983f0a commit 304ecb4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
5 changes: 3 additions & 2 deletions embed/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,9 @@ type Config struct {

// Experimental flags

ExperimentalCorruptCheckTime time.Duration `json:"experimental-corrupt-check-time"`
ExperimentalEnableV2V3 string `json:"experimental-enable-v2v3"`
ExperimentalInitialCorruptCheck bool `json:"experimental-initial-corrupt-check"`
ExperimentalCorruptCheckTime time.Duration `json:"experimental-corrupt-check-time"`
ExperimentalEnableV2V3 string `json:"experimental-enable-v2v3"`
}

// configYAML holds the config suitable for yaml parsing
Expand Down
1 change: 1 addition & 0 deletions embed/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ func StartEtcd(inCfg *Config) (e *Etcd, err error) {
StrictReconfigCheck: cfg.StrictReconfigCheck,
ClientCertAuthEnabled: cfg.ClientTLSInfo.ClientCertAuth,
AuthToken: cfg.AuthToken,
InitialCorruptCheck: cfg.ExperimentalInitialCorruptCheck,
CorruptCheckTime: cfg.ExperimentalCorruptCheckTime,
}

Expand Down
1 change: 1 addition & 0 deletions etcdmain/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ func newConfig() *config {
fs.StringVar(&cfg.ec.AuthToken, "auth-token", cfg.ec.AuthToken, "Specify auth token specific options.")

// experimental
fs.BoolVar(&cfg.ec.ExperimentalInitialCorruptCheck, "experimental-initial-corrupt-check", cfg.ec.ExperimentalInitialCorruptCheck, "Enable to check data corruption before serving any client/peer traffic.")
fs.DurationVar(&cfg.ec.ExperimentalCorruptCheckTime, "experimental-corrupt-check-time", cfg.ec.ExperimentalCorruptCheckTime, "Duration of time between cluster corruption check passes.")

// ignored
Expand Down
4 changes: 3 additions & 1 deletion etcdmain/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,10 @@ auth flags:
Specify a v3 authentication token type and its options ('simple' or 'jwt').
experimental flags:
--experimental-initial-corrupt-check 'false'
enable to check data corruption before serving any client/peer traffic.
--experimental-corrupt-check-time '0s'
duration of time between cluster corruption check passes.
duration of time between cluster corruption check passes.
--experimental-enable-v2v3 ''
serve v2 requests through the v3 backend under a given prefix.
`
Expand Down
3 changes: 2 additions & 1 deletion etcdserver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ type ServerConfig struct {

AuthToken string

CorruptCheckTime time.Duration
InitialCorruptCheck bool
CorruptCheckTime time.Duration
}

// VerifyBootstrap sanity-checks the initial config for bootstrap case
Expand Down

0 comments on commit 304ecb4

Please sign in to comment.