summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/podman/cliconfig/config.go1
-rw-r--r--cmd/podman/main.go5
-rw-r--r--cmd/podman/main_local.go5
-rw-r--r--cmd/podman/main_remote.go10
-rw-r--r--cmd/podman/remoteclientconfig/config.go1
-rw-r--r--cmd/podman/remoteclientconfig/configfile_test.go14
-rw-r--r--docs/podman-remote.1.md4
-rw-r--r--docs/podman-remote.conf.5.md4
-rw-r--r--go.mod2
-rw-r--r--go.sum2
-rw-r--r--pkg/adapter/client.go2
-rw-r--r--pkg/adapter/client_unix.go8
-rw-r--r--rootless.md3
-rw-r--r--vendor/github.com/containers/storage/Makefile1
-rw-r--r--vendor/github.com/containers/storage/VERSION2
-rw-r--r--vendor/github.com/containers/storage/images.go30
-rw-r--r--vendor/github.com/containers/storage/layers.go71
-rw-r--r--vendor/github.com/containers/storage/store.go10
-rw-r--r--vendor/modules.txt2
19 files changed, 119 insertions, 58 deletions
diff --git a/cmd/podman/cliconfig/config.go b/cmd/podman/cliconfig/config.go
index e0ce202cc..b8796f9b3 100644
--- a/cmd/podman/cliconfig/config.go
+++ b/cmd/podman/cliconfig/config.go
@@ -41,6 +41,7 @@ type MainFlags struct {
VarlinkAddress string
ConnectionName string
RemoteConfigFilePath string
+ Port int
}
type AttachValues struct {
diff --git a/cmd/podman/main.go b/cmd/podman/main.go
index b83ccd9a5..992dbe1d5 100644
--- a/cmd/podman/main.go
+++ b/cmd/podman/main.go
@@ -111,6 +111,11 @@ func before(cmd *cobra.Command, args []string) error {
return err
}
+ // check that global opts input is valid
+ if err := checkInput(); err != nil {
+ return err
+ }
+
// Set log level; if not log-level is provided, default to error
logLevel := MainGlobalOpts.LogLevel
if logLevel == "" {
diff --git a/cmd/podman/main_local.go b/cmd/podman/main_local.go
index 08d7ccaf4..917096e17 100644
--- a/cmd/podman/main_local.go
+++ b/cmd/podman/main_local.go
@@ -267,3 +267,8 @@ func setUMask() {
// Be sure we can create directories with 0755 mode.
syscall.Umask(0022)
}
+
+// checkInput can be used to verify any of the globalopt values
+func checkInput() error {
+ return nil
+}
diff --git a/cmd/podman/main_remote.go b/cmd/podman/main_remote.go
index a005e925c..f617422e6 100644
--- a/cmd/podman/main_remote.go
+++ b/cmd/podman/main_remote.go
@@ -3,6 +3,7 @@
package main
import (
+ "github.com/pkg/errors"
"os/user"
"github.com/spf13/cobra"
@@ -18,6 +19,7 @@ func init() {
rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.ConnectionName, "connection", "", "remote connection name")
rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.RemoteConfigFilePath, "remote-config-path", "", "alternate path for configuration file")
rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.RemoteUserName, "username", username, "username on the remote host")
+ rootCmd.PersistentFlags().IntVar(&MainGlobalOpts.Port, "port", 22, "port on remote host")
rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.RemoteHost, "remote-host", "", "remote host")
// TODO maybe we allow the altering of this for bridge connections?
// rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.VarlinkAddress, "varlink-address", adapter.DefaultAddress, "address of the varlink socket")
@@ -42,3 +44,11 @@ func setRLimits() error {
}
func setUMask() {}
+
+// checkInput can be used to verify any of the globalopt values
+func checkInput() error {
+ if MainGlobalOpts.Port < 0 || MainGlobalOpts.Port > 65536 {
+ return errors.Errorf("remote port must be between 0 and 65536")
+ }
+ return nil
+}
diff --git a/cmd/podman/remoteclientconfig/config.go b/cmd/podman/remoteclientconfig/config.go
index 01f293ec3..13880a868 100644
--- a/cmd/podman/remoteclientconfig/config.go
+++ b/cmd/podman/remoteclientconfig/config.go
@@ -12,6 +12,7 @@ type RemoteConnection struct {
Destination string `toml:"destination"`
Username string `toml:"username"`
IsDefault bool `toml:"default"`
+ Port int `toml:"port"`
}
// GetConfigFilePath is a simple helper to export the configuration file's
diff --git a/cmd/podman/remoteclientconfig/configfile_test.go b/cmd/podman/remoteclientconfig/configfile_test.go
index 66e0a4693..ea2224ea7 100644
--- a/cmd/podman/remoteclientconfig/configfile_test.go
+++ b/cmd/podman/remoteclientconfig/configfile_test.go
@@ -13,11 +13,13 @@ var goodConfig = `
[connections.homer]
destination = "192.168.1.1"
username = "myuser"
+port = 22
default = true
[connections.bart]
destination = "foobar.com"
username = "root"
+port = 22
`
var noDest = `
[connections]
@@ -26,9 +28,11 @@ var noDest = `
destination = "192.168.1.1"
username = "myuser"
default = true
+port = 22
[connections.bart]
username = "root"
+port = 22
`
var noUser = `
@@ -36,6 +40,7 @@ var noUser = `
[connections.homer]
destination = "192.168.1.1"
+port = 22
`
func makeGoodResult() *RemoteConfig {
@@ -44,10 +49,12 @@ func makeGoodResult() *RemoteConfig {
Destination: "192.168.1.1",
Username: "myuser",
IsDefault: true,
+ Port: 22,
}
goodConnections["bart"] = RemoteConnection{
Destination: "foobar.com",
Username: "root",
+ Port: 22,
}
var goodResult = RemoteConfig{
Connections: goodConnections,
@@ -59,6 +66,7 @@ func makeNoUserResult() *RemoteConfig {
var goodConnections = make(map[string]RemoteConnection)
goodConnections["homer"] = RemoteConnection{
Destination: "192.168.1.1",
+ Port: 22,
}
var goodResult = RemoteConfig{
Connections: goodConnections,
@@ -135,7 +143,7 @@ func TestRemoteConfig_GetDefault(t *testing.T) {
wantErr bool
}{
// A good toml should return the connection that is marked isDefault
- {"good", fields{Connections: makeGoodResult().Connections}, &RemoteConnection{"192.168.1.1", "myuser", true}, false},
+ {"good", fields{Connections: makeGoodResult().Connections}, &RemoteConnection{"192.168.1.1", "myuser", true, 22}, false},
// If nothing is marked as isDefault and there is more than one connection, error should occur
{"nodefault", fields{Connections: noDefault}, nil, true},
// if nothing is marked as isDefault but there is only one connection, the one connection is considered the default
@@ -175,9 +183,9 @@ func TestRemoteConfig_GetRemoteConnection(t *testing.T) {
wantErr bool
}{
// Good connection
- {"goodhomer", fields{Connections: makeGoodResult().Connections}, args{name: "homer"}, &RemoteConnection{"192.168.1.1", "myuser", true}, false},
+ {"goodhomer", fields{Connections: makeGoodResult().Connections}, args{name: "homer"}, &RemoteConnection{"192.168.1.1", "myuser", true, 22}, false},
// Good connection
- {"goodbart", fields{Connections: makeGoodResult().Connections}, args{name: "bart"}, &RemoteConnection{"foobar.com", "root", false}, false},
+ {"goodbart", fields{Connections: makeGoodResult().Connections}, args{name: "bart"}, &RemoteConnection{"foobar.com", "root", false, 22}, false},
// Getting an unknown connection should result in error
{"noexist", fields{Connections: makeGoodResult().Connections}, args{name: "foobar"}, nil, true},
// Getting a connection when there are none should result in an error
diff --git a/docs/podman-remote.1.md b/docs/podman-remote.1.md
index 84042a842..04010abaf 100644
--- a/docs/podman-remote.1.md
+++ b/docs/podman-remote.1.md
@@ -35,6 +35,10 @@ Print usage statement
Log messages above specified level: debug, info, warn, error (default), fatal or panic
+**--port**=*integer*
+
+Use an alternative port for the ssh connections. The default port is 22
+
**--remote-config-path**=*path*
Alternate path for configuration file
diff --git a/docs/podman-remote.conf.5.md b/docs/podman-remote.conf.5.md
index 3e1cffb02..3c8a1a801 100644
--- a/docs/podman-remote.conf.5.md
+++ b/docs/podman-remote.conf.5.md
@@ -22,6 +22,9 @@ of the user's remote connections.
Denotes whether the connection is the default connection for the user. The default connection
is used when the user does not specify a destination or connection name to `podman`.
+**port** = int
+ Use an alternative port for the ssh connections. The default port is 22.
+
## EXAMPLE
@@ -37,6 +40,7 @@ is designated as the default connection.
[connections.host2]
destination = "192.168.122.133"
username = "fedora"
+ port = 2222
```
## FILES
diff --git a/go.mod b/go.mod
index 328ebad0c..117f85b3c 100644
--- a/go.mod
+++ b/go.mod
@@ -17,7 +17,7 @@ require (
github.com/containers/conmon v0.3.0 // indirect
github.com/containers/image v3.0.2+incompatible
github.com/containers/psgo v1.3.1
- github.com/containers/storage v1.13.2
+ github.com/containers/storage v1.13.3
github.com/coreos/bbolt v1.3.3 // indirect
github.com/coreos/etcd v3.3.13+incompatible // indirect
github.com/coreos/go-iptables v0.4.2 // indirect
diff --git a/go.sum b/go.sum
index fbf0e667d..63c2ddd30 100644
--- a/go.sum
+++ b/go.sum
@@ -108,6 +108,8 @@ github.com/containers/storage v1.13.1 h1:rjVirLS9fCGkUFlLDZEoGDDUugtIf46DufWvJu0
github.com/containers/storage v1.13.1/go.mod h1:6D8nK2sU9V7nEmAraINRs88ZEscM5C5DK+8Npp27GeA=
github.com/containers/storage v1.13.2 h1:UXZ0Ckmk6+6+4vj2M2ywruVtH97pnRoAhTG8ctd+yQI=
github.com/containers/storage v1.13.2/go.mod h1:6D8nK2sU9V7nEmAraINRs88ZEscM5C5DK+8Npp27GeA=
+github.com/containers/storage v1.13.3 h1:9EzTXZXG/8SGD9MnkSCe/jLq3QldcE1QlgW7vePEsjw=
+github.com/containers/storage v1.13.3/go.mod h1:6D8nK2sU9V7nEmAraINRs88ZEscM5C5DK+8Npp27GeA=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
diff --git a/pkg/adapter/client.go b/pkg/adapter/client.go
index da6ff5fd0..1805c758d 100644
--- a/pkg/adapter/client.go
+++ b/pkg/adapter/client.go
@@ -35,7 +35,7 @@ func (r RemoteRuntime) RemoteEndpoint() (remoteEndpoint *Endpoint, err error) {
if len(r.cmd.RemoteUserName) < 1 {
return nil, errors.New("you must provide a username when providing a remote host name")
}
- rc := remoteclientconfig.RemoteConnection{r.cmd.RemoteHost, r.cmd.RemoteUserName, false}
+ rc := remoteclientconfig.RemoteConnection{r.cmd.RemoteHost, r.cmd.RemoteUserName, false, r.cmd.Port}
remoteEndpoint, err = newBridgeConnection("", &rc, r.cmd.LogLevel)
// if the user has a config file with connections in it
} else if len(remoteConfigConnections.Connections) > 0 {
diff --git a/pkg/adapter/client_unix.go b/pkg/adapter/client_unix.go
index 4781acd06..a7bc7c1c0 100644
--- a/pkg/adapter/client_unix.go
+++ b/pkg/adapter/client_unix.go
@@ -10,7 +10,11 @@ import (
)
func formatDefaultBridge(remoteConn *remoteclientconfig.RemoteConnection, logLevel string) string {
+ port := remoteConn.Port
+ if port == 0 {
+ port = 22
+ }
return fmt.Sprintf(
- `ssh -T %s@%s -- /usr/bin/varlink -A \'/usr/bin/podman --log-level=%s varlink \\\$VARLINK_ADDRESS\' bridge`,
- remoteConn.Username, remoteConn.Destination, logLevel)
+ `ssh -p %d -T %s@%s -- /usr/bin/varlink -A \'/usr/bin/podman --log-level=%s varlink \\\$VARLINK_ADDRESS\' bridge`,
+ port, remoteConn.Username, remoteConn.Destination, logLevel)
}
diff --git a/rootless.md b/rootless.md
index 960430d54..53463dccc 100644
--- a/rootless.md
+++ b/rootless.md
@@ -14,6 +14,9 @@ can easily fail
* No cgroup V1 Support
* cgroup V1 does not safely support cgroup delegation.
* However, cgroup V2 provides cgroup delegation and is available on Fedora starting with version 29 and other Linux distributions.
+* Some systemd's unit configuration options do not work in the rootless container
+ * systemd fails to apply several options and failures are silently ignored (e.g. CPUShares, MemoryLimit).
+ * Use of certain options will cause service startup failures (e.g. PrivateNetwork).
* Can not share container images with CRI-O or other users
* Difficult to use additional stores for sharing content
* Does not work on NFS or parallel filesystem homedirs (e.g. [GPFS](https://www.ibm.com/support/knowledgecenter/en/SSFKCN/gpfs_welcome.html))
diff --git a/vendor/github.com/containers/storage/Makefile b/vendor/github.com/containers/storage/Makefile
index bb1de007b..fa0fddaeb 100644
--- a/vendor/github.com/containers/storage/Makefile
+++ b/vendor/github.com/containers/storage/Makefile
@@ -1,4 +1,5 @@
export GO111MODULE=off
+export GOPROXY=https://proxy.golang.org
.PHONY: \
all \
diff --git a/vendor/github.com/containers/storage/VERSION b/vendor/github.com/containers/storage/VERSION
index 065f9ec4c..01b756823 100644
--- a/vendor/github.com/containers/storage/VERSION
+++ b/vendor/github.com/containers/storage/VERSION
@@ -1 +1 @@
-1.13.3-dev
+1.13.3
diff --git a/vendor/github.com/containers/storage/images.go b/vendor/github.com/containers/storage/images.go
index b1df9b765..5d6a2e48d 100644
--- a/vendor/github.com/containers/storage/images.go
+++ b/vendor/github.com/containers/storage/images.go
@@ -372,7 +372,7 @@ func (r *imageStore) ClearFlag(id string, flag string) error {
}
image, ok := r.lookup(id)
if !ok {
- return ErrImageUnknown
+ return errors.Wrapf(ErrImageUnknown, "error locating image with ID %q", id)
}
delete(image.Flags, flag)
return r.Save()
@@ -384,7 +384,7 @@ func (r *imageStore) SetFlag(id string, flag string, value interface{}) error {
}
image, ok := r.lookup(id)
if !ok {
- return ErrImageUnknown
+ return errors.Wrapf(ErrImageUnknown, "error locating image with ID %q", id)
}
if image.Flags == nil {
image.Flags = make(map[string]interface{})
@@ -456,14 +456,14 @@ func (r *imageStore) addMappedTopLayer(id, layer string) error {
image.MappedTopLayers = append(image.MappedTopLayers, layer)
return r.Save()
}
- return ErrImageUnknown
+ return errors.Wrapf(ErrImageUnknown, "error locating image with ID %q", id)
}
func (r *imageStore) Metadata(id string) (string, error) {
if image, ok := r.lookup(id); ok {
return image.Metadata, nil
}
- return "", ErrImageUnknown
+ return "", errors.Wrapf(ErrImageUnknown, "error locating image with ID %q", id)
}
func (r *imageStore) SetMetadata(id, metadata string) error {
@@ -474,7 +474,7 @@ func (r *imageStore) SetMetadata(id, metadata string) error {
image.Metadata = metadata
return r.Save()
}
- return ErrImageUnknown
+ return errors.Wrapf(ErrImageUnknown, "error locating image with ID %q", id)
}
func (r *imageStore) removeName(image *Image, name string) {
@@ -499,7 +499,7 @@ func (r *imageStore) SetNames(id string, names []string) error {
image.Names = names
return r.Save()
}
- return ErrImageUnknown
+ return errors.Wrapf(ErrImageUnknown, "error locating image with ID %q", id)
}
func (r *imageStore) Delete(id string) error {
@@ -508,7 +508,7 @@ func (r *imageStore) Delete(id string) error {
}
image, ok := r.lookup(id)
if !ok {
- return ErrImageUnknown
+ return errors.Wrapf(ErrImageUnknown, "error locating image with ID %q", id)
}
id = image.ID
toDeleteIndex := -1
@@ -551,14 +551,14 @@ func (r *imageStore) Get(id string) (*Image, error) {
if image, ok := r.lookup(id); ok {
return copyImage(image), nil
}
- return nil, ErrImageUnknown
+ return nil, errors.Wrapf(ErrImageUnknown, "error locating image with ID %q", id)
}
func (r *imageStore) Lookup(name string) (id string, err error) {
if image, ok := r.lookup(name); ok {
return image.ID, nil
}
- return "", ErrImageUnknown
+ return "", errors.Wrapf(ErrImageUnknown, "error locating image with ID %q", id)
}
func (r *imageStore) Exists(id string) bool {
@@ -570,7 +570,7 @@ func (r *imageStore) ByDigest(d digest.Digest) ([]*Image, error) {
if images, ok := r.bydigest[d]; ok {
return copyImageSlice(images), nil
}
- return nil, ErrImageUnknown
+ return nil, errors.Wrapf(ErrImageUnknown, "error locating image with digest %q", d)
}
func (r *imageStore) BigData(id, key string) ([]byte, error) {
@@ -579,7 +579,7 @@ func (r *imageStore) BigData(id, key string) ([]byte, error) {
}
image, ok := r.lookup(id)
if !ok {
- return nil, ErrImageUnknown
+ return nil, errors.Wrapf(ErrImageUnknown, "error locating image with ID %q", id)
}
return ioutil.ReadFile(r.datapath(image.ID, key))
}
@@ -590,7 +590,7 @@ func (r *imageStore) BigDataSize(id, key string) (int64, error) {
}
image, ok := r.lookup(id)
if !ok {
- return -1, ErrImageUnknown
+ return -1, errors.Wrapf(ErrImageUnknown, "error locating image with ID %q", id)
}
if image.BigDataSizes == nil {
image.BigDataSizes = make(map[string]int64)
@@ -610,7 +610,7 @@ func (r *imageStore) BigDataDigest(id, key string) (digest.Digest, error) {
}
image, ok := r.lookup(id)
if !ok {
- return "", ErrImageUnknown
+ return "", errors.Wrapf(ErrImageUnknown, "error locating image with ID %q", id)
}
if image.BigDataDigests == nil {
image.BigDataDigests = make(map[string]digest.Digest)
@@ -624,7 +624,7 @@ func (r *imageStore) BigDataDigest(id, key string) (digest.Digest, error) {
func (r *imageStore) BigDataNames(id string) ([]string, error) {
image, ok := r.lookup(id)
if !ok {
- return nil, ErrImageUnknown
+ return nil, errors.Wrapf(ErrImageUnknown, "error locating image with ID %q", id)
}
return copyStringSlice(image.BigDataNames), nil
}
@@ -649,7 +649,7 @@ func (r *imageStore) SetBigData(id, key string, data []byte, digestManifest func
}
image, ok := r.lookup(id)
if !ok {
- return ErrImageUnknown
+ return errors.Wrapf(ErrImageUnknown, "error locating image with ID %q", id)
}
err := os.MkdirAll(r.datadir(image.ID), 0700)
if err != nil {
diff --git a/vendor/github.com/containers/storage/layers.go b/vendor/github.com/containers/storage/layers.go
index d746ba061..ac905b0b4 100644
--- a/vendor/github.com/containers/storage/layers.go
+++ b/vendor/github.com/containers/storage/layers.go
@@ -363,7 +363,7 @@ func (r *layerStore) Load() error {
}
if cleanup, ok := layer.Flags[incompleteFlag]; ok {
if b, ok := cleanup.(bool); ok && b {
- err = r.Delete(layer.ID)
+ err = r.deleteInternal(layer.ID)
if err != nil {
break
}
@@ -372,7 +372,7 @@ func (r *layerStore) Load() error {
}
}
if shouldSave {
- return r.Save()
+ return r.saveLayers()
}
}
return err
@@ -416,6 +416,16 @@ func (r *layerStore) loadMounts() error {
}
func (r *layerStore) Save() error {
+ r.mountsLockfile.Lock()
+ defer r.mountsLockfile.Unlock()
+ defer r.mountsLockfile.Touch()
+ if err := r.saveLayers(); err != nil {
+ return err
+ }
+ return r.saveMounts()
+}
+
+func (r *layerStore) saveLayers() error {
if !r.IsReadWrite() {
return errors.Wrapf(ErrStoreIsReadOnly, "not allowed to modify the layer store at %q", r.layerspath())
}
@@ -431,13 +441,7 @@ func (r *layerStore) Save() error {
return err
}
defer r.Touch()
- if err := ioutils.AtomicWriteFile(rpath, jldata, 0600); err != nil {
- return err
- }
- r.mountsLockfile.Lock()
- defer r.mountsLockfile.Unlock()
- defer r.mountsLockfile.Touch()
- return r.saveMounts()
+ return ioutils.AtomicWriteFile(rpath, jldata, 0600)
}
func (r *layerStore) saveMounts() error {
@@ -954,7 +958,7 @@ func (r *layerStore) tspath(id string) string {
return filepath.Join(r.layerdir, id+tarSplitSuffix)
}
-func (r *layerStore) Delete(id string) error {
+func (r *layerStore) deleteInternal(id string) error {
if !r.IsReadWrite() {
return errors.Wrapf(ErrStoreIsReadOnly, "not allowed to delete layers at %q", r.layerspath())
}
@@ -963,23 +967,7 @@ func (r *layerStore) Delete(id string) error {
return ErrLayerUnknown
}
id = layer.ID
- // The layer may already have been explicitly unmounted, but if not, we
- // should try to clean that up before we start deleting anything at the
- // driver level.
- mountCount, err := r.Mounted(id)
- if err != nil {
- return errors.Wrapf(err, "error checking if layer %q is still mounted", id)
- }
- for mountCount > 0 {
- if _, err := r.Unmount(id, false); err != nil {
- return err
- }
- mountCount, err = r.Mounted(id)
- if err != nil {
- return errors.Wrapf(err, "error checking if layer %q is still mounted", id)
- }
- }
- err = r.driver.Remove(id)
+ err := r.driver.Remove(id)
if err == nil {
os.Remove(r.tspath(id))
delete(r.byid, id)
@@ -1015,11 +1003,36 @@ func (r *layerStore) Delete(id string) error {
label.ReleaseLabel(mountLabel)
}
}
- if err = r.Save(); err != nil {
+ }
+ return err
+}
+
+func (r *layerStore) Delete(id string) error {
+ layer, ok := r.lookup(id)
+ if !ok {
+ return ErrLayerUnknown
+ }
+ id = layer.ID
+ // The layer may already have been explicitly unmounted, but if not, we
+ // should try to clean that up before we start deleting anything at the
+ // driver level.
+ mountCount, err := r.Mounted(id)
+ if err != nil {
+ return errors.Wrapf(err, "error checking if layer %q is still mounted", id)
+ }
+ for mountCount > 0 {
+ if _, err := r.Unmount(id, false); err != nil {
return err
}
+ mountCount, err = r.Mounted(id)
+ if err != nil {
+ return errors.Wrapf(err, "error checking if layer %q is still mounted", id)
+ }
}
- return err
+ if err := r.deleteInternal(id); err != nil {
+ return err
+ }
+ return r.Save()
}
func (r *layerStore) Lookup(name string) (id string, err error) {
diff --git a/vendor/github.com/containers/storage/store.go b/vendor/github.com/containers/storage/store.go
index 74275482b..dd3405212 100644
--- a/vendor/github.com/containers/storage/store.go
+++ b/vendor/github.com/containers/storage/store.go
@@ -1202,7 +1202,7 @@ func (s *store) CreateContainer(id string, names []string, image, layer, metadat
}
}
if cimage == nil {
- return nil, ErrImageUnknown
+ return nil, errors.Wrapf(ErrImageUnknown, "error locating image with ID %q", id)
}
imageID = cimage.ID
@@ -1437,7 +1437,7 @@ func (s *store) ListImageBigData(id string) ([]string, error) {
return bigDataNames, err
}
}
- return nil, ErrImageUnknown
+ return nil, errors.Wrapf(ErrImageUnknown, "error locating image with ID %q", id)
}
func (s *store) ImageBigDataSize(id, key string) (int64, error) {
@@ -1516,7 +1516,7 @@ func (s *store) ImageBigData(id, key string) ([]byte, error) {
return data, nil
}
}
- return nil, ErrImageUnknown
+ return nil, errors.Wrapf(ErrImageUnknown, "error locating image with ID %q", id)
}
func (s *store) SetImageBigData(id, key string, data []byte, digestManifest func([]byte) (digest.Digest, error)) error {
@@ -2891,7 +2891,7 @@ func (s *store) Image(id string) (*Image, error) {
return image, nil
}
}
- return nil, ErrImageUnknown
+ return nil, errors.Wrapf(ErrImageUnknown, "error locating image with ID %q", id)
}
func (s *store) ImagesByTopLayer(id string) ([]*Image, error) {
@@ -2953,7 +2953,7 @@ func (s *store) ImagesByDigest(d digest.Digest) ([]*Image, error) {
}
}
imageList, err := store.ByDigest(d)
- if err != nil && err != ErrImageUnknown {
+ if err != nil && errors.Cause(err) != ErrImageUnknown {
return nil, err
}
images = append(images, imageList...)
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 1de9fede0..3a27eea12 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -109,7 +109,7 @@ github.com/containers/psgo/internal/dev
github.com/containers/psgo/internal/proc
github.com/containers/psgo/internal/process
github.com/containers/psgo/internal/host
-# github.com/containers/storage v1.13.2
+# github.com/containers/storage v1.13.3
github.com/containers/storage
github.com/containers/storage/pkg/archive
github.com/containers/storage/pkg/chrootarchive