Skip to content

Commit

Permalink
content-service: ignore the error of user.overlay.(impure|origin) att…
Browse files Browse the repository at this point in the history
…ributes
  • Loading branch information
utam0k committed May 31, 2022
1 parent 1ebf9c3 commit db55d73
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions components/content-service/pkg/archive/tar.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,14 @@ func remapFile(name string, uid, gid int, xattrs map[string]string) error {
if err == syscall.ENOTSUP || err == syscall.EPERM {
continue
}
if strings.HasPrefix(key, "user.") {
// This is a marker to match inodes, such as when an upper layer copies a lower layer file in overlayfs.
// However, when restoring a content, the container in the workspace is not always running, so there is no problem ignoring the failure.
if strings.HasSuffix(key, ".overlay.impure") || strings.HasSuffix(key, ".overlay.origin") {
continue
}
}

log.WithField("name", key).WithField("value", value).WithField("file", name).WithError(err).Warn("restoring extended attributes")
}
}
Expand Down

0 comments on commit db55d73

Please sign in to comment.