[Bug 2080972] [NEW] /tmp as non-tmpfs doesn't get cleaned upon reboot
Skia
2080972 at bugs.launchpad.net
Tue Sep 17 16:16:55 UTC 2024
Public bug reported:
On Oracular, it seems `/tmp` doesn't get cleaned on reboot, when the
`/etc/systemd/system/tmp.mount` file is present.
Reproducer:
$ wget https://cloud-images.ubuntu.com/minimal/daily/oracular/20240913/oracular-minimal-cloudimg-amd64.img
$ qemu-img resize oracular-minimal-cloudimg-amd64.img +20G
$ cat >user-data <<EOF
#cloud-config
password: ubuntu
chpasswd: { expire: False }
ssh_pwauth: True
EOF
$ cloud-localds user-data.img user-data
$ kvm -m 2G -smp 2 -hda oracular-minimal-cloudimg-amd64.img -hdb user-data.img
In the VM, logged in with `ubuntu`/`ubuntu`:
$ sudo touch /etc/systemd/system/tmp.mount
$ df -h | grep '/tmp' # you can verify that /tmp is a tmpfs, because this is the default now
$ sudo systemctl reboot
# Wait for reboot, then login again
$ echo Hello there >/tmp/will_stay
$ df -h | grep '/tmp' # you can verify that /tmp is not a tmpfs anymore
$ sudo systemctl reboot
# Wait for reboot again, then login again
$ cat /tmp/will_stay
Hello there
At least our auto-upgrade-testing tooling relies on `/tmp` getting cleaned upon reboot, and as a user, this is what I expect too.
** Affects: systemd (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2080972
Title:
/tmp as non-tmpfs doesn't get cleaned upon reboot
Status in systemd package in Ubuntu:
New
Bug description:
On Oracular, it seems `/tmp` doesn't get cleaned on reboot, when the
`/etc/systemd/system/tmp.mount` file is present.
Reproducer:
$ wget https://cloud-images.ubuntu.com/minimal/daily/oracular/20240913/oracular-minimal-cloudimg-amd64.img
$ qemu-img resize oracular-minimal-cloudimg-amd64.img +20G
$ cat >user-data <<EOF
#cloud-config
password: ubuntu
chpasswd: { expire: False }
ssh_pwauth: True
EOF
$ cloud-localds user-data.img user-data
$ kvm -m 2G -smp 2 -hda oracular-minimal-cloudimg-amd64.img -hdb user-data.img
In the VM, logged in with `ubuntu`/`ubuntu`:
$ sudo touch /etc/systemd/system/tmp.mount
$ df -h | grep '/tmp' # you can verify that /tmp is a tmpfs, because this is the default now
$ sudo systemctl reboot
# Wait for reboot, then login again
$ echo Hello there >/tmp/will_stay
$ df -h | grep '/tmp' # you can verify that /tmp is not a tmpfs anymore
$ sudo systemctl reboot
# Wait for reboot again, then login again
$ cat /tmp/will_stay
Hello there
At least our auto-upgrade-testing tooling relies on `/tmp` getting cleaned upon reboot, and as a user, this is what I expect too.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2080972/+subscriptions
More information about the foundations-bugs
mailing list