Fix containerd config dump.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2019-10-23 22:36:06 -07:00
parent 966b1b8e30
commit aaccfcbe2b
3 changed files with 14 additions and 2 deletions

View File

@@ -65,10 +65,14 @@ func outputConfig(cfg *srvconfig.Config) error {
}
}
if config.Timeouts == nil {
config.Timeouts = make(map[string]string)
}
timeouts := timeout.All()
config.Timeouts = make(map[string]string)
for k, v := range timeouts {
config.Timeouts[k] = v.String()
if config.Timeouts[k] == "" {
config.Timeouts[k] = v.String()
}
}
// for the time being, keep the defaultConfig's version set at 1 so that