mirror of
https://github.com/containers/podman.git
synced 2025-05-20 16:47:39 +08:00
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>
This commit is contained in:
@ -1693,6 +1693,18 @@ func withSetAnon() VolumeCreateOption {
|
||||
}
|
||||
}
|
||||
|
||||
// WithVolumeDriverTimeout sets the volume creation timeout period
|
||||
func WithVolumeDriverTimeout(timeout int) VolumeCreateOption {
|
||||
return func(volume *Volume) error {
|
||||
if volume.valid {
|
||||
return define.ErrVolumeFinalized
|
||||
}
|
||||
|
||||
volume.config.Timeout = timeout
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// WithTimezone sets the timezone in the container
|
||||
func WithTimezone(path string) CtrCreateOption {
|
||||
return func(ctr *Container) error {
|
||||
|
Reference in New Issue
Block a user