Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The mount attribute "userxattr" is added also for older kernels #863

Closed
afbjorklund opened this issue Mar 22, 2021 · 11 comments
Closed

The mount attribute "userxattr" is added also for older kernels #863

afbjorklund opened this issue Mar 22, 2021 · 11 comments
Assignees

Comments

@afbjorklund
Copy link

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

Podman doesn't work, without a custom storage.conf to avoid automatic mount attributes

[storage]
  driver = "overlay"
  [storage.options]
    mount_program = "/usr/bin/fuse-overlayfs"

Since 6cb8896

Steps to reproduce the issue:

  1. podman run -it fedora

Describe the results you received:

ERRO[0000] error unmounting /home/anders/.local/share/containers/storage/overlay/bd4e743f04a1cc32a0ea773106aab080e41cfeaa8420fca55f3da652258699c9/merged: invalid argument 
Error: error mounting storage for container 0db16dd90da5d0b7d2ed9c4f2f8173dd4d8b54b17493191712acd4ff8950b3a0: error creating overlay mount to /home/anders/.local/share/containers/storage/overlay/bd4e743f04a1cc32a0ea773106aab080e41cfeaa8420fca55f3da652258699c9/merged, mount_data=",lowerdir=/home/anders/.local/share/containers/storage/overlay/l/5JPBLHPVKX7YIMTJTCDYSGHYX3,upperdir=/home/anders/.local/share/containers/storage/overlay/bd4e743f04a1cc32a0ea773106aab080e41cfeaa8420fca55f3da652258699c9/diff,workdir=/home/anders/.local/share/containers/storage/overlay/bd4e743f04a1cc32a0ea773106aab080e41cfeaa8420fca55f3da652258699c9/work,userxattr": invalid argument

Describe the results you expected:

#

Additional information you deem important (e.g. issue happens only occasionally):

Linux 5.4

Output of podman version:

podman version 3.1.0-dev

Output of podman info --debug:

(paste your output here)

Package info (e.g. output of rpm -q podman or apt list podman):

(paste your output here)

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):

Ubuntu 20.04

@rhatdan
Copy link
Member

rhatdan commented Mar 23, 2021

@giuseppe PTAL

@rhatdan
Copy link
Member

rhatdan commented Mar 23, 2021

I think this belongs to containers/storage.

@afbjorklund
Copy link
Author

I think this belongs to containers/storage.

Yes, I think it was mentioned in #816 that this would break Ubuntu kernels

@giuseppe
Copy link
Member

Ubuntu kernels are not supported.

It is not possible to create directly whiteout files and that breaks our tools.

So it might have worked to some extend in the past, but it would break as soon as an image has a whiteout file

@giuseppe
Copy link
Member

giuseppe commented Mar 23, 2021

could you check if the following patch fix the check and you don't need a custom config file?

diff --git a/drivers/overlay/overlay.go b/drivers/overlay/overlay.go
index 254fd5fab..23c5d5064 100644
--- a/drivers/overlay/overlay.go
+++ b/drivers/overlay/overlay.go
@@ -539,6 +539,9 @@ func supportsOverlay(home string, homeMagic graphdriver.FsMagic, rootUID, rootGI
                _ = idtools.MkdirAs(upperDir, 0700, rootUID, rootGID)
                _ = idtools.MkdirAs(workDir, 0700, rootUID, rootGID)
                flags := fmt.Sprintf("lowerdir=%s:%s,upperdir=%s,workdir=%s", lower1Dir, lower2Dir, upperDir, workDir)
+               if unshare.IsRootless() {
+                       flags = fmt.Sprintf("%s,userxattr", flags)
+               }
                if len(flags) < unix.Getpagesize() {
                        err := unix.Mount("overlay", mergedDir, "overlay", 0, flags)
                        if err == nil {

@afbjorklund
Copy link
Author

Can't reproduce with v3.1, with or without the patch. Did something else change ?

@giuseppe
Copy link
Member

I think it could be cf4c912

@giuseppe giuseppe transferred this issue from containers/podman Mar 23, 2021
@afbjorklund
Copy link
Author

afbjorklund commented Mar 23, 2021

I think it could be cf4c912

Indeed it was, supported: false

Now it gets mount_program /usr/bin/fuse-overlayfs by default, so there is no need for that storage.conf

@rhatdan
Copy link
Member

rhatdan commented Mar 23, 2021

So can we close this issue?

@giuseppe
Copy link
Member

yes let's close if it works also on Ubuntu

@afbjorklund
Copy link
Author

afbjorklund commented Mar 24, 2021

It might have been an "upgrade problem" or somesuch, but user giving the mount_program explicitly would work in that case...

The main message is that native rootless mounts doesn't work with those kernels, and it seems like new installs now know this.

StayPirate added a commit to StayPirate/dotfiles that referenced this issue Mar 24, 2021
StayPirate added a commit to StayPirate/dotfiles that referenced this issue Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants