Skip to content

Commit 448e944

Browse files
Merge pull request #1173 from mheon/backport_1129_049
[v0.49] Backport #1129
2 parents 1073e96 + 0377bca commit 448e944

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

pkg/config/config.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,13 @@ type EngineConfig struct {
447447
// may not be by other drivers.
448448
VolumePath string `toml:"volume_path,omitempty"`
449449

450+
// VolumePluginTimeout sets the default timeout, in seconds, for
451+
// operations that must contact a volume plugin. Plugins are external
452+
// programs accessed via REST API; this sets a timeout for requests to
453+
// that API.
454+
// A value of 0 is treated as no timeout.
455+
VolumePluginTimeout uint `toml:"volume_plugin_timeout,omitempty,omitzero"`
456+
450457
// VolumePlugins is a set of plugins that can be used as the backend for
451458
// Podman named volumes. Each volume is specified as a name (what Podman
452459
// will refer to the plugin as) mapped to a path, which must point to a

pkg/config/containers.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,12 @@ default_sysctls = [
605605
#
606606
#volume_path = "/var/lib/containers/storage/volumes"
607607

608+
# Default timeout (in seconds) for volume plugin operations.
609+
# Plugins are external programs accessed via a REST API; this sets a timeout
610+
# for requests to that API.
611+
# A value of 0 is treated as no timeout.
612+
#volume_plugin_timeout = 5
613+
608614
# Paths to look for a valid OCI runtime (crun, runc, kata, runsc, krun, etc)
609615
[engine.runtimes]
610616
#crun = [

pkg/config/default.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ const (
159159
SeccompOverridePath = _etcDir + "/containers/seccomp.json"
160160
// SeccompDefaultPath defines the default seccomp path.
161161
SeccompDefaultPath = _installPrefix + "/share/containers/seccomp.json"
162+
// DefaultVolumePluginTimeout is the default volume plugin timeout, in seconds
163+
DefaultVolumePluginTimeout = 5
162164
)
163165

164166
// DefaultConfig defines the default values from containers.conf.
@@ -292,6 +294,8 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
292294
c.StaticDir = filepath.Join(storeOpts.GraphRoot, "libpod")
293295
c.VolumePath = filepath.Join(storeOpts.GraphRoot, "volumes")
294296

297+
c.VolumePluginTimeout = DefaultVolumePluginTimeout
298+
295299
c.HelperBinariesDir = defaultHelperBinariesDir
296300
if additionalHelperBinariesDir != "" {
297301
c.HelperBinariesDir = append(c.HelperBinariesDir, additionalHelperBinariesDir)

0 commit comments

Comments
 (0)