diff --git a/oci/layer/tar_generate.go b/oci/layer/tar_generate.go index 83d1e28f3..447451ca6 100644 --- a/oci/layer/tar_generate.go +++ b/oci/layer/tar_generate.go @@ -23,6 +23,7 @@ import ( "os" "path/filepath" "strings" + "syscall" "github.com/apex/log" "github.com/opencontainers/umoci/pkg/fseval" @@ -217,6 +218,14 @@ func (tg *tarGenerator) AddFile(name, path string) error { // XXX: I'm not sure if we're unprivileged whether Lgetxattr can // fail with EPERM. If it can, we should ignore it (like when // we try to clear xattrs). + + // in case of overlayfs, we may not get the xattr data itself, + // so ignore if this particular error code + if err == syscall.ENODATA { + log.Warnf("unable to get xattr: %s", name) + continue + } + return errors.Wrapf(err, "get xattr: %s", name) } // https://golang.org/issues/20698 -- We don't just error out here