diff options
author | cdoern <cdoern@redhat.com> | 2022-06-01 16:02:39 -0400 |
---|---|---|
committer | cdoern <cdoern@redhat.com> | 2022-06-09 16:44:21 -0400 |
commit | 7b3e43c1f6cf27a1cde96c0f650a793a56cebc4c (patch) | |
tree | 0b460b5067c72f31999399bd3eb83bce8268dfdb /libpod/runtime.go | |
parent | f808907d85204a2a5606067eb31400aa12233635 (diff) | |
download | podman-7b3e43c1f6cf27a1cde96c0f650a793a56cebc4c.tar.gz podman-7b3e43c1f6cf27a1cde96c0f650a793a56cebc4c.tar.bz2 podman-7b3e43c1f6cf27a1cde96c0f650a793a56cebc4c.zip |
podman volume create --opt=o=timeout...
add an option to configure the driver timeout when creating a volume.
The default is 5 seconds but this value is too small for some custom drivers.
Signed-off-by: cdoern <cdoern@redhat.com>
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r-- | libpod/runtime.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go index 6c8a99846..8aad480bf 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -1194,9 +1194,11 @@ func (r *Runtime) reloadStorageConf() error { return nil } -// getVolumePlugin gets a specific volume plugin given its name. -func (r *Runtime) getVolumePlugin(name string) (*plugin.VolumePlugin, error) { +// getVolumePlugin gets a specific volume plugin. +func (r *Runtime) getVolumePlugin(volConfig *VolumeConfig) (*plugin.VolumePlugin, error) { // There is no plugin for local. + name := volConfig.Driver + timeout := volConfig.Timeout if name == define.VolumeDriverLocal || name == "" { return nil, nil } @@ -1206,7 +1208,7 @@ func (r *Runtime) getVolumePlugin(name string) (*plugin.VolumePlugin, error) { return nil, errors.Wrapf(define.ErrMissingPlugin, "no volume plugin with name %s available", name) } - return plugin.GetVolumePlugin(name, pluginPath) + return plugin.GetVolumePlugin(name, pluginPath, timeout) } // GetSecretsStorageDir returns the directory that the secrets manager should take |