Add StopTimeout for podman
Allow users to modify the default ammount of time to wait to send SIGKILL after you tell a container to stop with a SIGINT. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
5725c54f72
commit
00b0aae703
|
|
@ -315,6 +315,9 @@ refer to a member of the runtimes table.
|
||||||
By default this will be configured relative to where containers/storage
|
By default this will be configured relative to where containers/storage
|
||||||
stores containers.
|
stores containers.
|
||||||
|
|
||||||
|
**stop_timeout**=10
|
||||||
|
Number of seconds to wait for container to exit before sending kill signal.
|
||||||
|
|
||||||
**tmp_dir**="/var/run/libpod"
|
**tmp_dir**="/var/run/libpod"
|
||||||
The path to a temporary directory to store per-boot container.
|
The path to a temporary directory to store per-boot container.
|
||||||
Must be a tmpfs (wiped after reboot).
|
Must be a tmpfs (wiped after reboot).
|
||||||
|
|
|
||||||
|
|
@ -274,6 +274,10 @@ type LibpodConfig struct {
|
||||||
// files.
|
// files.
|
||||||
StaticDir string `toml:"static_dir"`
|
StaticDir string `toml:"static_dir"`
|
||||||
|
|
||||||
|
// StopTimeout is the number of seconds to wait for container to exit
|
||||||
|
// before sending kill signal.
|
||||||
|
StopTimeout uint `toml:"stop_timeout"`
|
||||||
|
|
||||||
// StorageConfig is the configuration used by containers/storage Not
|
// StorageConfig is the configuration used by containers/storage Not
|
||||||
// included in the on-disk config, use the dedicated containers/storage
|
// included in the on-disk config, use the dedicated containers/storage
|
||||||
// configuration file instead.
|
// configuration file instead.
|
||||||
|
|
|
||||||
|
|
@ -365,6 +365,9 @@
|
||||||
# "/run/current-system/sw/bin/crun",
|
# "/run/current-system/sw/bin/crun",
|
||||||
# ]
|
# ]
|
||||||
|
|
||||||
|
# Number of seconds to wait for container to exit before sending kill signal.
|
||||||
|
#stop_timeout = 10
|
||||||
|
|
||||||
# The [libpod.runtimes] table MUST be the last entry in this file.
|
# The [libpod.runtimes] table MUST be the last entry in this file.
|
||||||
# (Unless another table is added)
|
# (Unless another table is added)
|
||||||
# TOML does not provide a way to end a table other than a further table being
|
# TOML does not provide a way to end a table other than a further table being
|
||||||
|
|
|
||||||
|
|
@ -213,6 +213,7 @@ func defaultConfigFromMemory() (*LibpodConfig, error) {
|
||||||
c.OCIRuntime = "crun"
|
c.OCIRuntime = "crun"
|
||||||
}
|
}
|
||||||
c.CgroupManager = SystemdCgroupsManager
|
c.CgroupManager = SystemdCgroupsManager
|
||||||
|
c.StopTimeout = uint(10)
|
||||||
|
|
||||||
c.OCIRuntimes = map[string][]string{
|
c.OCIRuntimes = map[string][]string{
|
||||||
"runc": {
|
"runc": {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue