*: update drainExecSyncIO docs and validate the timeout
We should validate the drainExecSyncIO timeout at the beginning and raise the error for any invalid input. Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
@@ -357,6 +357,8 @@ type PluginConfig struct {
|
||||
//
|
||||
// The string is in the golang duration format, see:
|
||||
// https://golang.org/pkg/time/#ParseDuration
|
||||
//
|
||||
// For example, the value can be '5h', '2h30m', '10s'.
|
||||
DrainExecSyncIOTimeout string `toml:"drain_exec_sync_io_timeout" json:"drainExecSyncIOTimeout"`
|
||||
}
|
||||
|
||||
|
||||
@@ -110,6 +110,6 @@ func DefaultConfig() PluginConfig {
|
||||
EnableCDI: false,
|
||||
CDISpecDirs: []string{"/etc/cdi", "/var/run/cdi"},
|
||||
ImagePullProgressTimeout: time.Minute.String(),
|
||||
DrainExecSyncIOTimeout: "0",
|
||||
DrainExecSyncIOTimeout: "0s",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,6 +86,6 @@ func DefaultConfig() PluginConfig {
|
||||
KeyModel: KeyModelNode,
|
||||
},
|
||||
ImagePullProgressTimeout: time.Minute.String(),
|
||||
DrainExecSyncIOTimeout: "0",
|
||||
DrainExecSyncIOTimeout: "0s",
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user