yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #66232
[Bug 1707222] [NEW] usage of /tmp during boot is not safe due to systemd-tmpfiles-clean
Public bug reported:
Earlier this week on Zesty on Azure I saw a cloud-init failure in its 'mount_cb' function.
That function esentially does:
a.) make a tmp directory for a mount point
b.) mount some filesystem to that mount point
c.) call a function
d.) unmount the directory
What I recall was that access to a file inside the mount point failed during 'c'.
This seems possible as systemd-tmpfiles-clean may be running at the same time as cloud-init (cloud-init.service in this example).
It seems that this service basically inhibits *any* other service from using tmp files.
It's ordering statements are only:
After=local-fs.target time-sync.target
Before=shutdown.target
So while in most cases only services that run early in the boot process
like cloud-init will be affected, any service could have its tmp files
removed. this service could take quite a long time to run if /tmp/ had
been filled with lots of files in the previous boot.
** Affects: cloud-init
Importance: Undecided
Status: New
** Affects: cloud-init (Ubuntu)
Importance: Undecided
Status: New
** Affects: systemd (Ubuntu)
Importance: Undecided
Status: New
** Also affects: cloud-init (Ubuntu)
Importance: Undecided
Status: New
** Also affects: systemd (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1707222
Title:
usage of /tmp during boot is not safe due to systemd-tmpfiles-clean
Status in cloud-init:
New
Status in cloud-init package in Ubuntu:
New
Status in systemd package in Ubuntu:
New
Bug description:
Earlier this week on Zesty on Azure I saw a cloud-init failure in its 'mount_cb' function.
That function esentially does:
a.) make a tmp directory for a mount point
b.) mount some filesystem to that mount point
c.) call a function
d.) unmount the directory
What I recall was that access to a file inside the mount point failed during 'c'.
This seems possible as systemd-tmpfiles-clean may be running at the same time as cloud-init (cloud-init.service in this example).
It seems that this service basically inhibits *any* other service from using tmp files.
It's ordering statements are only:
After=local-fs.target time-sync.target
Before=shutdown.target
So while in most cases only services that run early in the boot
process like cloud-init will be affected, any service could have its
tmp files removed. this service could take quite a long time to run
if /tmp/ had been filled with lots of files in the previous boot.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1707222/+subscriptions
Follow ups