aboutsummaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-07-01 08:46:11 +0000
committerGitHub <noreply@github.com>2022-07-01 08:46:11 +0000
commit96e72d90b8a6b1d9fb71dadfddff1ed4ccf05857 (patch)
treecf1617923f618ae0bf1819486f4f425310245db8 /pkg/domain
parent01beba3667851c1dd68d3df1e0aa6bc8cb1ec0eb (diff)
parent7b3e43c1f6cf27a1cde96c0f650a793a56cebc4c (diff)
downloadpodman-96e72d90b8a6b1d9fb71dadfddff1ed4ccf05857.tar.gz
podman-96e72d90b8a6b1d9fb71dadfddff1ed4ccf05857.tar.bz2
podman-96e72d90b8a6b1d9fb71dadfddff1ed4ccf05857.zip
Merge pull request #14449 from cdoern/podVolumes
podman volume create --opt=o=timeout...
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/infra/abi/parse/parse.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/domain/infra/abi/parse/parse.go b/pkg/domain/infra/abi/parse/parse.go
index 66794e592..4e8c2e508 100644
--- a/pkg/domain/infra/abi/parse/parse.go
+++ b/pkg/domain/infra/abi/parse/parse.go
@@ -78,6 +78,16 @@ func VolumeOptions(opts map[string]string) ([]libpod.VolumeCreateOption, error)
libpodOptions = append(libpodOptions, libpod.WithVolumeDisableQuota())
// set option "NOQUOTA": "true"
volumeOptions["NOQUOTA"] = "true"
+ case "timeout":
+ if len(splitO) != 2 {
+ return nil, errors.Wrapf(define.ErrInvalidArg, "timeout option must provide a valid timeout in seconds")
+ }
+ intTimeout, err := strconv.Atoi(splitO[1])
+ if err != nil {
+ return nil, errors.Wrapf(err, "cannot convert Timeout %s to an integer", splitO[1])
+ }
+ logrus.Debugf("Removing timeout from options and adding WithTimeout for Timeout %d", intTimeout)
+ libpodOptions = append(libpodOptions, libpod.WithVolumeDriverTimeout(intTimeout))
default:
finalVal = append(finalVal, o)
}