summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/api/handlers/compat/containers_archive.go3
-rw-r--r--pkg/api/handlers/libpod/containers_create.go2
-rw-r--r--pkg/bindings/README.md8
-rw-r--r--pkg/bindings/connection.go2
-rw-r--r--pkg/bindings/test/common_test.go2
-rw-r--r--pkg/domain/entities/network.go2
-rw-r--r--pkg/domain/filters/containers.go6
-rw-r--r--pkg/domain/infra/abi/images.go6
-rw-r--r--pkg/domain/infra/abi/manifest.go4
-rw-r--r--pkg/domain/infra/abi/trust.go2
-rw-r--r--pkg/domain/infra/runtime_libpod.go4
-rw-r--r--pkg/k8s.io/api/core/v1/resource.go2
-rw-r--r--pkg/k8s.io/apimachinery/pkg/api/resource/quantity.go2
-rw-r--r--pkg/machine/config.go4
-rw-r--r--pkg/machine/fcos.go4
-rw-r--r--pkg/machine/qemu/config.go10
-rw-r--r--pkg/machine/qemu/machine.go22
-rw-r--r--pkg/machine/wsl/machine.go22
-rw-r--r--pkg/specgen/generate/kube/seccomp.go2
-rw-r--r--pkg/specgen/generate/kube/volume.go4
-rw-r--r--pkg/specgen/namespaces.go12
-rw-r--r--pkg/specgenutil/util.go1
22 files changed, 67 insertions, 59 deletions
diff --git a/pkg/api/handlers/compat/containers_archive.go b/pkg/api/handlers/compat/containers_archive.go
index f2ff4d100..45b13818b 100644
--- a/pkg/api/handlers/compat/containers_archive.go
+++ b/pkg/api/handlers/compat/containers_archive.go
@@ -2,7 +2,6 @@ package compat
import (
"encoding/json"
- "fmt"
"net/http"
"os"
@@ -28,7 +27,7 @@ func Archive(w http.ResponseWriter, r *http.Request) {
case http.MethodHead, http.MethodGet:
handleHeadAndGet(w, r, decoder, runtime)
default:
- utils.Error(w, http.StatusNotImplemented, errors.New(fmt.Sprintf("unsupported method: %v", r.Method)))
+ utils.Error(w, http.StatusNotImplemented, errors.Errorf("unsupported method: %v", r.Method))
}
}
diff --git a/pkg/api/handlers/libpod/containers_create.go b/pkg/api/handlers/libpod/containers_create.go
index 1043dec4d..4fff9e345 100644
--- a/pkg/api/handlers/libpod/containers_create.go
+++ b/pkg/api/handlers/libpod/containers_create.go
@@ -45,7 +45,7 @@ func CreateContainer(w http.ResponseWriter, r *http.Request) {
// need to check for memory limit to adjust swap
if sg.ResourceLimits != nil && sg.ResourceLimits.Memory != nil {
s := ""
- var l int64 = 0
+ var l int64
if sg.ResourceLimits.Memory.Swap != nil {
s = strconv.Itoa(int(*sg.ResourceLimits.Memory.Swap))
}
diff --git a/pkg/bindings/README.md b/pkg/bindings/README.md
index 713adb104..ebc8a13d1 100644
--- a/pkg/bindings/README.md
+++ b/pkg/bindings/README.md
@@ -9,7 +9,7 @@ The bindings require that the Podman system service is running for the specified
by calling the service directly.
### Starting the service with system
-The command to start the Podman service differs slightly depending on the user that is running the service. For a rootfull service,
+The command to start the Podman service differs slightly depending on the user that is running the service. For a rootful service,
start the service like this:
```
# systemctl start podman.socket
@@ -26,7 +26,7 @@ It can be handy to run the system service manually. Doing so allows you to enab
$ podman --log-level=debug system service -t0
```
If you do not provide a specific path for the socket, a default is provided. The location of that socket for
-rootfull connections is `/run/podman/podman.sock` and for rootless it is `/run/USERID#/podman/podman.sock`. For more
+rootful connections is `/run/podman/podman.sock` and for rootless it is `/run/USERID#/podman/podman.sock`. For more
information about the Podman system service, see `man podman-system-service`.
### Creating a connection
@@ -35,7 +35,7 @@ as they will be required to compile a Go program making use of the bindings.
The first step for using the bindings is to create a connection to the socket. As mentioned earlier, the destination
-of the socket depends on the user who owns it. In this case, a rootfull connection is made.
+of the socket depends on the user who owns it. In this case, a rootful connection is made.
```
import (
@@ -59,7 +59,7 @@ The `conn` variable returned from the `bindings.NewConnection` function can then
to interact with containers.
### Examples
-The following examples build upon the connection example from above. They are all rootfull connections as well.
+The following examples build upon the connection example from above. They are all rootful connections as well.
Note: Optional arguments to the bindings methods are set using With*() methods on *Option structures.
Composite types are not duplicated rather the address is used. As such, you should not change an underlying
diff --git a/pkg/bindings/connection.go b/pkg/bindings/connection.go
index 36e47e5ed..3739ec404 100644
--- a/pkg/bindings/connection.go
+++ b/pkg/bindings/connection.go
@@ -289,7 +289,7 @@ func sshClient(_url *url.URL, secure bool, passPhrase string, identity string) (
},
)
if err != nil {
- return Connection{}, errors.Wrapf(err, "Connection to bastion host (%s) failed.", _url.String())
+ return Connection{}, errors.Wrapf(err, "connection to bastion host (%s) failed", _url.String())
}
connection := Connection{URI: _url}
diff --git a/pkg/bindings/test/common_test.go b/pkg/bindings/test/common_test.go
index f2602967b..950fd21e6 100644
--- a/pkg/bindings/test/common_test.go
+++ b/pkg/bindings/test/common_test.go
@@ -51,7 +51,7 @@ var (
shortName: "busybox",
tarballName: "busybox.tar",
}
- CACHE_IMAGES = []testImage{alpine, busybox} //nolint:golint,stylecheck
+ CACHE_IMAGES = []testImage{alpine, busybox} //nolint:revive,stylecheck
)
type bindingTest struct {
diff --git a/pkg/domain/entities/network.go b/pkg/domain/entities/network.go
index a057640b3..134ad126a 100644
--- a/pkg/domain/entities/network.go
+++ b/pkg/domain/entities/network.go
@@ -22,7 +22,7 @@ type NetworkReloadOptions struct {
// NetworkReloadReport describes the results of reloading a container network.
type NetworkReloadReport struct {
- // nolint:stylecheck,golint
+ // nolint:stylecheck,revive
Id string
Err error
}
diff --git a/pkg/domain/filters/containers.go b/pkg/domain/filters/containers.go
index 4c6964a00..3e5b9cad9 100644
--- a/pkg/domain/filters/containers.go
+++ b/pkg/domain/filters/containers.go
@@ -52,8 +52,8 @@ func GenerateContainerFilterFuncs(filter string, filterValues []string, r *libpo
}, nil
case "status":
for _, filterValue := range filterValues {
- if !util.StringInSlice(filterValue, []string{"created", "running", "paused", "stopped", "exited", "unknown"}) {
- return nil, errors.Errorf("%s is not a valid status", filterValue)
+ if _, err := define.StringToContainerStatus(filterValue); err != nil {
+ return nil, err
}
}
return func(c *libpod.Container) bool {
@@ -270,7 +270,7 @@ func GenerateContainerFilterFuncs(filter string, filterValues []string, r *libpo
invalidPolicyNames = append(invalidPolicyNames, policy)
}
}
- var filterValueError error = nil
+ var filterValueError error
if len(invalidPolicyNames) > 0 {
errPrefix := "invalid restart policy"
if len(invalidPolicyNames) > 1 {
diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go
index 43440b594..74478b26d 100644
--- a/pkg/domain/infra/abi/images.go
+++ b/pkg/domain/infra/abi/images.go
@@ -367,7 +367,7 @@ func (ir *ImageEngine) Transfer(ctx context.Context, source entities.ImageScpOpt
if rootless.IsRootless() && (len(dest.User) == 0 || dest.User == "root") { // if we are rootless and do not have a destination user we can just use sudo
return transferRootless(source, dest, podman, parentFlags)
}
- return transferRootfull(source, dest, podman, parentFlags)
+ return transferRootful(source, dest, podman, parentFlags)
}
func (ir *ImageEngine) Tag(ctx context.Context, nameOrID string, tags []string, options entities.ImageTagOptions) error {
@@ -785,8 +785,8 @@ func transferRootless(source entities.ImageScpOptions, dest entities.ImageScpOpt
return cmdLoad.Run()
}
-// transferRootfull creates new podman processes using exec.Command and a new uid/gid alongside a cleared environment
-func transferRootfull(source entities.ImageScpOptions, dest entities.ImageScpOptions, podman string, parentFlags []string) error {
+// TransferRootful creates new podman processes using exec.Command and a new uid/gid alongside a cleared environment
+func transferRootful(source entities.ImageScpOptions, dest entities.ImageScpOptions, podman string, parentFlags []string) error {
basicCommand := []string{podman}
basicCommand = append(basicCommand, parentFlags...)
saveCommand := append(basicCommand, "save")
diff --git a/pkg/domain/infra/abi/manifest.go b/pkg/domain/infra/abi/manifest.go
index 0e999a019..8b52c335c 100644
--- a/pkg/domain/infra/abi/manifest.go
+++ b/pkg/domain/infra/abi/manifest.go
@@ -110,6 +110,10 @@ func (ir *ImageEngine) remoteManifestInspect(ctx context.Context, name string) (
if latestErr == nil {
latestErr = e
} else {
+ // FIXME should we use multierror package instead?
+
+ // we want the new line here so ignore the linter
+ //nolint:revive
latestErr = errors.Wrapf(latestErr, "tried %v\n", e)
}
}
diff --git a/pkg/domain/infra/abi/trust.go b/pkg/domain/infra/abi/trust.go
index df4081349..d53fe16d1 100644
--- a/pkg/domain/infra/abi/trust.go
+++ b/pkg/domain/infra/abi/trust.go
@@ -84,7 +84,7 @@ func (ir *ImageEngine) SetTrust(ctx context.Context, args []string, options enti
policyContentStruct.Default = newReposContent
} else {
if len(policyContentStruct.Default) == 0 {
- return errors.Errorf("Default trust policy must be set.")
+ return errors.Errorf("default trust policy must be set")
}
registryExists := false
for transport, transportval := range policyContentStruct.Transports {
diff --git a/pkg/domain/infra/runtime_libpod.go b/pkg/domain/infra/runtime_libpod.go
index 5fdc252e2..ac557e9de 100644
--- a/pkg/domain/infra/runtime_libpod.go
+++ b/pkg/domain/infra/runtime_libpod.go
@@ -209,6 +209,10 @@ func getRuntime(ctx context.Context, fs *flag.FlagSet, opts *engineOpts) (*libpo
options = append(options, libpod.WithEventsLogger(cfg.Engine.EventsLogger))
}
+ if fs.Changed("volumepath") {
+ options = append(options, libpod.WithVolumePath(cfg.Engine.VolumePath))
+ }
+
if fs.Changed("cgroup-manager") {
options = append(options, libpod.WithCgroupManager(cfg.Engine.CgroupManager))
} else {
diff --git a/pkg/k8s.io/api/core/v1/resource.go b/pkg/k8s.io/api/core/v1/resource.go
index 9270054b3..2fbb663c7 100644
--- a/pkg/k8s.io/api/core/v1/resource.go
+++ b/pkg/k8s.io/api/core/v1/resource.go
@@ -26,7 +26,7 @@ func (rn ResourceName) String() string {
}
// Cpu returns the Cpu limit if specified.
-// nolint:golint,stylecheck
+//nolint:revive,stylecheck
func (rl *ResourceList) Cpu() *resource.Quantity {
return rl.Name(ResourceCPU, resource.DecimalSI)
}
diff --git a/pkg/k8s.io/apimachinery/pkg/api/resource/quantity.go b/pkg/k8s.io/apimachinery/pkg/api/resource/quantity.go
index 352cc028f..965d2ccaf 100644
--- a/pkg/k8s.io/apimachinery/pkg/api/resource/quantity.go
+++ b/pkg/k8s.io/apimachinery/pkg/api/resource/quantity.go
@@ -138,7 +138,7 @@ const (
var (
// Errors that could happen while parsing a string.
- // nolint:golint
+ //nolint:revive
ErrFormatWrong = errors.New("quantities must match the regular expression '" + splitREString + "'")
ErrNumeric = errors.New("unable to parse numeric part of quantity")
ErrSuffix = errors.New("unable to parse quantity's suffix")
diff --git a/pkg/machine/config.go b/pkg/machine/config.go
index 5dc5f6105..6c2fab0e5 100644
--- a/pkg/machine/config.go
+++ b/pkg/machine/config.go
@@ -28,7 +28,7 @@ type InitOptions struct {
URI url.URL
Username string
ReExec bool
- Rootfull bool
+ Rootful bool
// The numerical userid of the user that called machine
UID string
}
@@ -95,7 +95,7 @@ type ListResponse struct {
}
type SetOptions struct {
- Rootfull bool
+ Rootful bool
}
type SSHOptions struct {
diff --git a/pkg/machine/fcos.go b/pkg/machine/fcos.go
index 88e35dd04..872ca889e 100644
--- a/pkg/machine/fcos.go
+++ b/pkg/machine/fcos.go
@@ -26,8 +26,8 @@ import (
// These should eventually be moved into machine/qemu as
// they are specific to running qemu
var (
- artifact string = "qemu"
- Format string = "qcow2.xz"
+ artifact = "qemu"
+ Format = "qcow2.xz"
)
const (
diff --git a/pkg/machine/qemu/config.go b/pkg/machine/qemu/config.go
index 6ab25b951..7340de604 100644
--- a/pkg/machine/qemu/config.go
+++ b/pkg/machine/qemu/config.go
@@ -57,8 +57,8 @@ type MachineVMV1 struct {
QMPMonitor Monitorv1
// RemoteUsername of the vm user
RemoteUsername string
- // Whether this machine should run in a rootfull or rootless manner
- Rootfull bool
+ // Whether this machine should run in a rootful or rootless manner
+ Rootful bool
// UID is the numerical id of the user that called machine
UID int
}
@@ -99,8 +99,8 @@ type ImageConfig struct {
// HostUser describes the host user
type HostUser struct {
- // Whether this machine should run in a rootfull or rootless manner
- Rootfull bool
+ // Whether this machine should run in a rootful or rootless manner
+ Rootful bool
// UID is the numerical id of the user that called machine
UID int
}
@@ -162,7 +162,7 @@ type Monitor struct {
var (
// defaultQMPTimeout is the timeout duration for the
// qmp monitor interactions.
- defaultQMPTimeout time.Duration = 2 * time.Second
+ defaultQMPTimeout = 2 * time.Second
)
// GetPath returns the working path for a machinefile. it returns
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
index 4cfd4e8b0..c57fa32fb 100644
--- a/pkg/machine/qemu/machine.go
+++ b/pkg/machine/qemu/machine.go
@@ -204,7 +204,7 @@ func migrateVM(configPath string, config []byte, vm *MachineVM) error {
vm.QMPMonitor = qmpMonitor
vm.ReadySocket = readySocket
vm.RemoteUsername = old.RemoteUsername
- vm.Rootfull = old.Rootfull
+ vm.Rootful = old.Rootful
vm.UID = old.UID
// Backup the original config file
@@ -258,7 +258,7 @@ func (v *MachineVM) Init(opts machine.InitOptions) (bool, error) {
)
sshDir := filepath.Join(homedir.Get(), ".ssh")
v.IdentityPath = filepath.Join(sshDir, v.Name)
- v.Rootfull = opts.Rootfull
+ v.Rootful = opts.Rootful
switch opts.ImagePath {
case Testing, Next, Stable, "":
@@ -356,8 +356,8 @@ func (v *MachineVM) Init(opts machine.InitOptions) (bool, error) {
names := []string{v.Name, v.Name + "-root"}
// The first connection defined when connections is empty will become the default
- // regardless of IsDefault, so order according to rootfull
- if opts.Rootfull {
+ // regardless of IsDefault, so order according to rootful
+ if opts.Rootful {
uris[0], names[0], uris[1], names[1] = uris[1], names[1], uris[0], names[0]
}
@@ -435,7 +435,7 @@ func (v *MachineVM) Init(opts machine.InitOptions) (bool, error) {
}
func (v *MachineVM) Set(_ string, opts machine.SetOptions) error {
- if v.Rootfull == opts.Rootfull {
+ if v.Rootful == opts.Rootful {
return nil
}
@@ -459,7 +459,7 @@ func (v *MachineVM) Set(_ string, opts machine.SetOptions) error {
if changeCon {
newDefault := v.Name
- if opts.Rootfull {
+ if opts.Rootful {
newDefault += "-root"
}
if err := machine.ChangeDefault(newDefault); err != nil {
@@ -467,7 +467,7 @@ func (v *MachineVM) Set(_ string, opts machine.SetOptions) error {
}
}
- v.Rootfull = opts.Rootfull
+ v.Rootful = opts.Rootful
return v.writeConfig()
}
@@ -907,7 +907,7 @@ func (v *MachineVM) SSH(_ string, opts machine.SSHOptions) error {
return err
}
if state != machine.Running {
- return errors.Errorf("vm %q is not running.", v.Name)
+ return errors.Errorf("vm %q is not running", v.Name)
}
username := opts.Username
@@ -1117,7 +1117,7 @@ func (v *MachineVM) setupAPIForwarding(cmd []string) ([]string, string, apiForwa
destSock := fmt.Sprintf("/run/user/%d/podman/podman.sock", v.UID)
forwardUser := "core"
- if v.Rootfull {
+ if v.Rootful {
destSock = "/run/podman/podman.sock"
forwardUser = "root"
}
@@ -1323,11 +1323,11 @@ func (v *MachineVM) waitAPIAndPrintInfo(forwardState apiForwardingState, forward
}
waitAndPingAPI(forwardSock)
- if !v.Rootfull {
+ if !v.Rootful {
fmt.Printf("\nThis machine is currently configured in rootless mode. If your containers\n")
fmt.Printf("require root permissions (e.g. ports < 1024), or if you run into compatibility\n")
fmt.Printf("issues with non-podman clients, you can switch using the following command: \n")
- fmt.Printf("\n\tpodman machine set --rootfull%s\n\n", suffix)
+ fmt.Printf("\n\tpodman machine set --rootful%s\n\n", suffix)
}
fmt.Printf("API forwarding listening on: %s\n", forwardSock)
diff --git a/pkg/machine/wsl/machine.go b/pkg/machine/wsl/machine.go
index dc3f33fa7..dff7bfef9 100644
--- a/pkg/machine/wsl/machine.go
+++ b/pkg/machine/wsl/machine.go
@@ -165,8 +165,8 @@ type MachineVM struct {
Port int
// RemoteUsername of the vm user
RemoteUsername string
- // Whether this machine should run in a rootfull or rootless manner
- Rootfull bool
+ // Whether this machine should run in a rootful or rootless manner
+ Rootful bool
}
type ExitCodeError struct {
@@ -232,7 +232,7 @@ func (v *MachineVM) Init(opts machine.InitOptions) (bool, error) {
homeDir := homedir.Get()
sshDir := filepath.Join(homeDir, ".ssh")
v.IdentityPath = filepath.Join(sshDir, v.Name)
- v.Rootfull = opts.Rootfull
+ v.Rootful = opts.Rootful
if err := downloadDistro(v, opts); err != nil {
return false, err
@@ -316,8 +316,8 @@ func setupConnections(v *MachineVM, opts machine.InitOptions, sshDir string) err
names := []string{v.Name, v.Name + "-root"}
// The first connection defined when connections is empty will become the default
- // regardless of IsDefault, so order according to rootfull
- if opts.Rootfull {
+ // regardless of IsDefault, so order according to rootful
+ if opts.Rootful {
uris[0], names[0], uris[1], names[1] = uris[1], names[1], uris[0], names[0]
}
@@ -733,7 +733,7 @@ func pipeCmdPassThrough(name string, input string, arg ...string) error {
}
func (v *MachineVM) Set(name string, opts machine.SetOptions) error {
- if v.Rootfull == opts.Rootfull {
+ if v.Rootful == opts.Rootful {
return nil
}
@@ -744,7 +744,7 @@ func (v *MachineVM) Set(name string, opts machine.SetOptions) error {
if changeCon {
newDefault := v.Name
- if opts.Rootfull {
+ if opts.Rootful {
newDefault += "-root"
}
if err := machine.ChangeDefault(newDefault); err != nil {
@@ -752,7 +752,7 @@ func (v *MachineVM) Set(name string, opts machine.SetOptions) error {
}
}
- v.Rootfull = opts.Rootfull
+ v.Rootful = opts.Rootful
return v.writeConfig()
}
@@ -768,7 +768,7 @@ func (v *MachineVM) Start(name string, _ machine.StartOptions) error {
return errors.Wrap(err, "WSL bootstrap script failed")
}
- if !v.Rootfull {
+ if !v.Rootful {
fmt.Printf("\nThis machine is currently configured in rootless mode. If your containers\n")
fmt.Printf("require root permissions (e.g. ports < 1024), or if you run into compatibility\n")
fmt.Printf("issues with non-podman clients, you can switch using the following command: \n")
@@ -777,7 +777,7 @@ func (v *MachineVM) Start(name string, _ machine.StartOptions) error {
if name != machine.DefaultMachineName {
suffix = " " + name
}
- fmt.Printf("\n\tpodman machine set --rootfull%s\n\n", suffix)
+ fmt.Printf("\n\tpodman machine set --rootful%s\n\n", suffix)
}
globalName, pipeName, err := launchWinProxy(v)
@@ -833,7 +833,7 @@ func launchWinProxy(v *MachineVM) (bool, string, error) {
destSock := "/run/user/1000/podman/podman.sock"
forwardUser := v.RemoteUsername
- if v.Rootfull {
+ if v.Rootful {
destSock = "/run/podman/podman.sock"
forwardUser = "root"
}
diff --git a/pkg/specgen/generate/kube/seccomp.go b/pkg/specgen/generate/kube/seccomp.go
index 1e681e977..8f93b34ff 100644
--- a/pkg/specgen/generate/kube/seccomp.go
+++ b/pkg/specgen/generate/kube/seccomp.go
@@ -11,7 +11,7 @@ import (
// KubeSeccompPaths holds information about a pod YAML's seccomp configuration
// it holds both container and pod seccomp paths
-// nolint:golint
+//nolint:revive
type KubeSeccompPaths struct {
containerPaths map[string]string
podPath string
diff --git a/pkg/specgen/generate/kube/volume.go b/pkg/specgen/generate/kube/volume.go
index 987f11569..27881e77a 100644
--- a/pkg/specgen/generate/kube/volume.go
+++ b/pkg/specgen/generate/kube/volume.go
@@ -17,7 +17,7 @@ const (
kubeFilePermission = 0644
)
-// nolint:golint
+//nolint:revive
type KubeVolumeType int
const (
@@ -26,7 +26,7 @@ const (
KubeVolumeTypeConfigMap KubeVolumeType = iota
)
-// nolint:golint
+//nolint:revive
type KubeVolume struct {
// Type of volume to create
Type KubeVolumeType
diff --git a/pkg/specgen/namespaces.go b/pkg/specgen/namespaces.go
index eaf2daad9..7a7ca2706 100644
--- a/pkg/specgen/namespaces.go
+++ b/pkg/specgen/namespaces.go
@@ -231,14 +231,14 @@ func ParseNamespace(ns string) (Namespace, error) {
case strings.HasPrefix(ns, "ns:"):
split := strings.SplitN(ns, ":", 2)
if len(split) != 2 {
- return toReturn, errors.Errorf("must provide a path to a namespace when specifying ns:")
+ return toReturn, errors.Errorf("must provide a path to a namespace when specifying \"ns:\"")
}
toReturn.NSMode = Path
toReturn.Value = split[1]
case strings.HasPrefix(ns, "container:"):
split := strings.SplitN(ns, ":", 2)
if len(split) != 2 {
- return toReturn, errors.Errorf("must provide name or ID or a container when specifying container:")
+ return toReturn, errors.Errorf("must provide name or ID or a container when specifying \"container:\"")
}
toReturn.NSMode = FromContainer
toReturn.Value = split[1]
@@ -349,14 +349,14 @@ func ParseNetworkNamespace(ns string, rootlessDefaultCNI bool) (Namespace, map[s
case strings.HasPrefix(ns, "ns:"):
split := strings.SplitN(ns, ":", 2)
if len(split) != 2 {
- return toReturn, nil, errors.Errorf("must provide a path to a namespace when specifying ns:")
+ return toReturn, nil, errors.Errorf("must provide a path to a namespace when specifying \"ns:\"")
}
toReturn.NSMode = Path
toReturn.Value = split[1]
case strings.HasPrefix(ns, string(FromContainer)+":"):
split := strings.SplitN(ns, ":", 2)
if len(split) != 2 {
- return toReturn, nil, errors.Errorf("must provide name or ID or a container when specifying container:")
+ return toReturn, nil, errors.Errorf("must provide name or ID or a container when specifying \"container:\"")
}
toReturn.NSMode = FromContainer
toReturn.Value = split[1]
@@ -427,14 +427,14 @@ func ParseNetworkFlag(networks []string) (Namespace, map[string]types.PerNetwork
case strings.HasPrefix(ns, "ns:"):
split := strings.SplitN(ns, ":", 2)
if len(split) != 2 {
- return toReturn, nil, nil, errors.Errorf("must provide a path to a namespace when specifying ns:")
+ return toReturn, nil, nil, errors.Errorf("must provide a path to a namespace when specifying \"ns:\"")
}
toReturn.NSMode = Path
toReturn.Value = split[1]
case strings.HasPrefix(ns, string(FromContainer)+":"):
split := strings.SplitN(ns, ":", 2)
if len(split) != 2 {
- return toReturn, nil, nil, errors.Errorf("must provide name or ID or a container when specifying container:")
+ return toReturn, nil, nil, errors.Errorf("must provide name or ID or a container when specifying \"container:\"")
}
toReturn.NSMode = FromContainer
toReturn.Value = split[1]
diff --git a/pkg/specgenutil/util.go b/pkg/specgenutil/util.go
index 80d31398b..fa2e90457 100644
--- a/pkg/specgenutil/util.go
+++ b/pkg/specgenutil/util.go
@@ -281,6 +281,7 @@ func CreateExitCommandArgs(storageConfig storageTypes.StoreOptions, config *conf
"--tmpdir", config.Engine.TmpDir,
"--network-config-dir", config.Network.NetworkConfigDir,
"--network-backend", config.Network.NetworkBackend,
+ "--volumepath", config.Engine.VolumePath,
}
if config.Engine.OCIRuntime != "" {
command = append(command, []string{"--runtime", config.Engine.OCIRuntime}...)