diff --git a/embed/etcd.go b/embed/etcd.go index bae8c443a..526af25d5 100644 --- a/embed/etcd.go +++ b/embed/etcd.go @@ -132,6 +132,10 @@ func StartEtcd(inCfg *Config) (e *Etcd, err error) { autoCompactionRetention time.Duration h int ) + // AutoCompactionRetention defaults to "0" if not set. + if len(cfg.AutoCompactionRetention) == 0 { + cfg.AutoCompactionRetention = "0" + } h, err = strconv.Atoi(cfg.AutoCompactionRetention) if err == nil { autoCompactionRetention = time.Duration(int64(h)) * time.Hour