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

ubuntu container fails with Error: failed to bind /tmp to /run/host/tmp #906

Open
dabrain34 opened this issue Oct 27, 2021 · 3 comments
Open
Labels
1. Bug Something isn't working

Comments

@dabrain34
Copy link

Describe the bug
I' m trying to "toolbox" an ubuntu 18.04 or a centos based on the last toolbox release. The toolbox works with sid from
https://blogs.gnome.org/alatiera/2021/03/03/toolbox-your-debian/

but fails with

level=debug msg="Binding /tmp to /run/host/tmp"
mount: /tmp: wrong fs type, bad option, bad superblock on /run/host/tmp, missing codepage or helper program, or other error.
Error: failed to bind /tmp to /run/host/tmp

Steps how to reproduce the behaviour

  1. Get Dockerfile from https://github.com/dabrain34/petalinux-centos/tree/main/ubuntu-18.04
  2. podman build -t ubuntu-18:04-toolbox .
  3. toolbox create -c ubuntu-18 --image ubuntu-18:04-toolbox
  4. podman start --attach ubuntu-18
level=debug msg="Running as real user ID 0"
level=debug msg="Resolved absolute path to the executable as /usr/bin/toolbox"
level=debug msg="TOOLBOX_PATH is /usr/local/bin/toolbox"
level=debug msg="Migrating to newer Podman"
level=debug msg="Creating /run/.toolboxenv"
level=debug msg="Monitoring host"
level=debug msg="Path /run/host/etc exists"
level=debug msg="Preparing to redirect /etc/localtime to /run/host/etc/localtime"
level=debug msg="/run/host/etc/localtime is a symbolic link"
level=warning msg="Failed to resolve /run/host/etc/localtime: lstat /usr/share/zoneinfo: no such file or directory"
level=debug msg="/run/host/etc/localtime points to /usr/share/zoneinfo/America/Toronto"
level=debug msg="Prepending /run/host to /usr/share/zoneinfo/America/Toronto"
level=debug msg="Redirecting /etc/localtime to /run/host/usr/share/zoneinfo/America/Toronto"
level=debug msg="Resolved /etc/localtime to /run/host/usr/share/zoneinfo/America/Montreal"
level=debug msg="Creating regular file /etc/machine-id"
level=debug msg="Binding /etc/machine-id to /run/host/etc/machine-id"
level=debug msg="Creating directory /run/systemd/journal"
level=debug msg="Binding /run/systemd/journal to /run/host/run/systemd/journal"
level=debug msg="Creating directory /run/udev/data"
level=debug msg="Binding /run/udev/data to /run/host/run/udev/data"
level=debug msg="Creating directory /tmp"
level=debug msg="Binding /tmp to /run/host/tmp"
mount: /tmp: wrong fs type, bad option, bad superblock on /run/host/tmp, missing codepage or helper program, or other error.
Error: failed to bind /tmp to /run/host/tmp

Expected behaviour
To run properly

Actual behaviour
It fails to start the container

Screenshots

Output of toolbox --version (v0.0.90+)
e.g., toolbox version 0.0.99.2

Output of podman version
e.g.,

Version:            3.0.1
RemoteAPI Version:  1
Go Version:         go1.15.9
OS/Arch:            linux/amd64

Info about your OS
Debian Sid

Additional context
Same issue with centos

@dabrain34 dabrain34 added the 1. Bug Something isn't working label Oct 27, 2021
@dabrain34
Copy link
Author

My system waw not having a tmpfs mount on /tmp

This fixes my issue: mount -o mode=1777,nosuid,nodev -t tmpfs tmpfs /tmp

@debarshiray
Copy link
Member

I see that mount --rbind failed with:

mount: /tmp: wrong fs type, bad option, bad superblock
on /run/host/tmp, missing codepage or helper program,
or other error.

What did /tmp on your host look like before?

It's probably OK to require that /tmp on the host always be a tmpfs, but I want to understand the failure a bit more before taking any decision.

@pennbauman
Copy link
Contributor

I'm seeing this issues with both Ubuntu 16.04 and 18.04 regardless on what /tmp is. I have a Debian system, with /tmp as a regular directory (btrfs filesystem), and a Fedora Silverblue system, with /tmp as tmpfs. Both are giving identical errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants