mirror of
https://github.com/containers/podman.git
synced 2025-12-03 03:39:44 +08:00
Update containers/storage to pick up overlay driver fix
New pinned commit is ff8a6d2bf496daf46ab1a153f783a0f6b8762a54 This includes a fix to error reporting with overlayfs, and will produce more verbose errors when initializing overlayfs fails. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #546 Approved by: baude
This commit is contained in:
12
vendor/github.com/containers/storage/drivers/overlay/overlay.go
generated
vendored
12
vendor/github.com/containers/storage/drivers/overlay/overlay.go
generated
vendored
@@ -114,8 +114,8 @@ func init() {
|
||||
}
|
||||
|
||||
// Init returns the a native diff driver for overlay filesystem.
|
||||
// If overlay filesystem is not supported on the host, graphdriver.ErrNotSupported is returned as error.
|
||||
// If an overlay filesystem is not supported over an existing filesystem then error graphdriver.ErrIncompatibleFS is returned.
|
||||
// If overlay filesystem is not supported on the host, a wrapped graphdriver.ErrNotSupported is returned as error.
|
||||
// If an overlay filesystem is not supported over an existing filesystem then a wrapped graphdriver.ErrIncompatibleFS is returned.
|
||||
func Init(home string, options []string, uidMaps, gidMaps []idtools.IDMap) (graphdriver.Driver, error) {
|
||||
opts, err := parseOptions(options)
|
||||
if err != nil {
|
||||
@@ -151,7 +151,7 @@ func Init(home string, options []string, uidMaps, gidMaps []idtools.IDMap) (grap
|
||||
if err != nil {
|
||||
os.Remove(filepath.Join(home, linkDir))
|
||||
os.Remove(home)
|
||||
return nil, errors.Wrap(graphdriver.ErrNotSupported, "kernel does not support overlay fs")
|
||||
return nil, errors.Wrap(err, "kernel does not support overlay fs")
|
||||
}
|
||||
|
||||
if err := mount.MakePrivate(home); err != nil {
|
||||
@@ -740,6 +740,11 @@ func (d *Driver) Diff(id, parent, mountLabel string) (io.ReadCloser, error) {
|
||||
return d.naiveDiff.Diff(id, parent, mountLabel)
|
||||
}
|
||||
|
||||
lowerDirs, err := d.getLowerDirs(id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
diffPath := d.getDiffPath(id)
|
||||
logrus.Debugf("Tar with options on %s", diffPath)
|
||||
return archive.TarWithOptions(diffPath, &archive.TarOptions{
|
||||
@@ -747,6 +752,7 @@ func (d *Driver) Diff(id, parent, mountLabel string) (io.ReadCloser, error) {
|
||||
UIDMaps: d.uidMaps,
|
||||
GIDMaps: d.gidMaps,
|
||||
WhiteoutFormat: archive.OverlayWhiteoutFormat,
|
||||
WhiteoutData: lowerDirs,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
6
vendor/github.com/containers/storage/drivers/overlayutils/overlayutils.go
generated
vendored
6
vendor/github.com/containers/storage/drivers/overlayutils/overlayutils.go
generated
vendored
@@ -3,8 +3,10 @@
|
||||
package overlayutils
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/containers/storage/drivers"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// ErrDTypeNotSupported denotes that the backing filesystem doesn't support d_type.
|
||||
@@ -14,5 +16,5 @@ func ErrDTypeNotSupported(driver, backingFs string) error {
|
||||
msg += " Reformat the filesystem with ftype=1 to enable d_type support."
|
||||
}
|
||||
msg += " Running without d_type is not supported."
|
||||
return errors.New(msg)
|
||||
return errors.Wrap(graphdriver.ErrNotSupported, msg)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user