[Touch-packages] [Bug 2019026] Re: systemd /tmp cleaning is suboptimal

2024-03-28 Thread Launchpad Bug Tracker
This bug was fixed in the package systemd - 255.4-1ubuntu5

---
systemd (255.4-1ubuntu5) noble; urgency=medium

  * No-change rebuild against libcurl4t64

 -- Steve Langasek   Sat, 16 Mar 2024
07:04:30 +

** Changed in: systemd (Ubuntu Noble)
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2019026

Title:
  systemd /tmp cleaning is suboptimal

Status in systemd package in Ubuntu:
  Fix Released
Status in systemd source package in Noble:
  Fix Released

Bug description:
  Historically on Debian and Ubuntu, before systemd, the default
  handling of /tmp was to periodically, and at boot, remove all
  files/directories older than 30 days; and leave other contents alone.

  With the move to systemd, the "default" (really, hard-coded in
  /usr/lib/tmpfiles.d/tmp.conf) is to not clean /tmp periodically, but
  at boot to remove all contents.

  This is suboptimal for two reasons.

  By cleaning /tmp *only* at boot, if a system makes heavy use of /tmp
  and has lots of inodes under it, possibly due to failures of some
  process to clean up after itself, at boot the system will be
  unavailable for an unnecessarily long time while these files are
  removed.

  By cleaning *all* files under /tmp, this makes a reboot an Event where
  in-progress files may be unnecessarily lost.

  While the FHS does not *guarantee* that files under /tmp will persist
  across boot (because /tmp may be a tmpfs), it also does not *require*
  that /tmp be cleared on boot.

 Although data stored in /tmp may be deleted in a site-specific
 manner, it is recommended that files and directories located in
 /tmp be deleted whenever the system is booted.

 FHS added this recommendation on the basis of historical
 precedent and common practice, but did not make it a
 requirement because system administration is not within the
 scope of this standard.

  I therefore believe the correct value for /usr/lib/tmpfiles.d/tmp.conf
  to restore past behavior is 'd /tmp 1777 root root 30d'.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2019026/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 2019026] Re: systemd /tmp cleaning is suboptimal

2024-02-29 Thread Nick Rosbrook
I have uploaded a change to add the 30d cleanup age.

** Changed in: systemd (Ubuntu Noble)
   Status: Triaged => Fix Committed

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2019026

Title:
  systemd /tmp cleaning is suboptimal

Status in systemd package in Ubuntu:
  Fix Committed
Status in systemd source package in Noble:
  Fix Committed

Bug description:
  Historically on Debian and Ubuntu, before systemd, the default
  handling of /tmp was to periodically, and at boot, remove all
  files/directories older than 30 days; and leave other contents alone.

  With the move to systemd, the "default" (really, hard-coded in
  /usr/lib/tmpfiles.d/tmp.conf) is to not clean /tmp periodically, but
  at boot to remove all contents.

  This is suboptimal for two reasons.

  By cleaning /tmp *only* at boot, if a system makes heavy use of /tmp
  and has lots of inodes under it, possibly due to failures of some
  process to clean up after itself, at boot the system will be
  unavailable for an unnecessarily long time while these files are
  removed.

  By cleaning *all* files under /tmp, this makes a reboot an Event where
  in-progress files may be unnecessarily lost.

  While the FHS does not *guarantee* that files under /tmp will persist
  across boot (because /tmp may be a tmpfs), it also does not *require*
  that /tmp be cleared on boot.

 Although data stored in /tmp may be deleted in a site-specific
 manner, it is recommended that files and directories located in
 /tmp be deleted whenever the system is booted.

 FHS added this recommendation on the basis of historical
 precedent and common practice, but did not make it a
 requirement because system administration is not within the
 scope of this standard.

  I therefore believe the correct value for /usr/lib/tmpfiles.d/tmp.conf
  to restore past behavior is 'd /tmp 1777 root root 30d'.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2019026/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 2019026] Re: systemd /tmp cleaning is suboptimal

2024-02-29 Thread Nick Rosbrook
** Changed in: systemd (Ubuntu Noble)
   Status: Confirmed => Triaged

** Changed in: systemd (Ubuntu Noble)
 Assignee: (unassigned) => Nick Rosbrook (enr0n)

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2019026

Title:
  systemd /tmp cleaning is suboptimal

Status in systemd package in Ubuntu:
  Triaged
Status in systemd source package in Noble:
  Triaged

Bug description:
  Historically on Debian and Ubuntu, before systemd, the default
  handling of /tmp was to periodically, and at boot, remove all
  files/directories older than 30 days; and leave other contents alone.

  With the move to systemd, the "default" (really, hard-coded in
  /usr/lib/tmpfiles.d/tmp.conf) is to not clean /tmp periodically, but
  at boot to remove all contents.

  This is suboptimal for two reasons.

  By cleaning /tmp *only* at boot, if a system makes heavy use of /tmp
  and has lots of inodes under it, possibly due to failures of some
  process to clean up after itself, at boot the system will be
  unavailable for an unnecessarily long time while these files are
  removed.

  By cleaning *all* files under /tmp, this makes a reboot an Event where
  in-progress files may be unnecessarily lost.

  While the FHS does not *guarantee* that files under /tmp will persist
  across boot (because /tmp may be a tmpfs), it also does not *require*
  that /tmp be cleared on boot.

 Although data stored in /tmp may be deleted in a site-specific
 manner, it is recommended that files and directories located in
 /tmp be deleted whenever the system is booted.

 FHS added this recommendation on the basis of historical
 precedent and common practice, but did not make it a
 requirement because system administration is not within the
 scope of this standard.

  I therefore believe the correct value for /usr/lib/tmpfiles.d/tmp.conf
  to restore past behavior is 'd /tmp 1777 root root 30d'.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2019026/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 2019026] Re: systemd /tmp cleaning is suboptimal

2024-02-29 Thread Julian Andres Klode
I agree with Nick, regular cleaning *and* cleaning at /boot is best
behavior.

** Tags removed: rls-nn-incoming
** Tags added: foundations-todo

** Also affects: systemd (Ubuntu Noble)
   Importance: Wishlist
   Status: Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2019026

Title:
  systemd /tmp cleaning is suboptimal

Status in systemd package in Ubuntu:
  Triaged
Status in systemd source package in Noble:
  Triaged

Bug description:
  Historically on Debian and Ubuntu, before systemd, the default
  handling of /tmp was to periodically, and at boot, remove all
  files/directories older than 30 days; and leave other contents alone.

  With the move to systemd, the "default" (really, hard-coded in
  /usr/lib/tmpfiles.d/tmp.conf) is to not clean /tmp periodically, but
  at boot to remove all contents.

  This is suboptimal for two reasons.

  By cleaning /tmp *only* at boot, if a system makes heavy use of /tmp
  and has lots of inodes under it, possibly due to failures of some
  process to clean up after itself, at boot the system will be
  unavailable for an unnecessarily long time while these files are
  removed.

  By cleaning *all* files under /tmp, this makes a reboot an Event where
  in-progress files may be unnecessarily lost.

  While the FHS does not *guarantee* that files under /tmp will persist
  across boot (because /tmp may be a tmpfs), it also does not *require*
  that /tmp be cleared on boot.

 Although data stored in /tmp may be deleted in a site-specific
 manner, it is recommended that files and directories located in
 /tmp be deleted whenever the system is booted.

 FHS added this recommendation on the basis of historical
 precedent and common practice, but did not make it a
 requirement because system administration is not within the
 scope of this standard.

  I therefore believe the correct value for /usr/lib/tmpfiles.d/tmp.conf
  to restore past behavior is 'd /tmp 1777 root root 30d'.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2019026/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 2019026] Re: systemd /tmp cleaning is suboptimal

2024-02-23 Thread Nick Rosbrook
** Tags added: rls-nn-incoming

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2019026

Title:
  systemd /tmp cleaning is suboptimal

Status in systemd package in Ubuntu:
  Confirmed

Bug description:
  Historically on Debian and Ubuntu, before systemd, the default
  handling of /tmp was to periodically, and at boot, remove all
  files/directories older than 30 days; and leave other contents alone.

  With the move to systemd, the "default" (really, hard-coded in
  /usr/lib/tmpfiles.d/tmp.conf) is to not clean /tmp periodically, but
  at boot to remove all contents.

  This is suboptimal for two reasons.

  By cleaning /tmp *only* at boot, if a system makes heavy use of /tmp
  and has lots of inodes under it, possibly due to failures of some
  process to clean up after itself, at boot the system will be
  unavailable for an unnecessarily long time while these files are
  removed.

  By cleaning *all* files under /tmp, this makes a reboot an Event where
  in-progress files may be unnecessarily lost.

  While the FHS does not *guarantee* that files under /tmp will persist
  across boot (because /tmp may be a tmpfs), it also does not *require*
  that /tmp be cleared on boot.

 Although data stored in /tmp may be deleted in a site-specific
 manner, it is recommended that files and directories located in
 /tmp be deleted whenever the system is booted.

 FHS added this recommendation on the basis of historical
 precedent and common practice, but did not make it a
 requirement because system administration is not within the
 scope of this standard.

  I therefore believe the correct value for /usr/lib/tmpfiles.d/tmp.conf
  to restore past behavior is 'd /tmp 1777 root root 30d'.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2019026/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 2019026] Re: systemd /tmp cleaning is suboptimal

2024-02-19 Thread Paride Legovini
Looks like the experiment worked: having

  e /tmp 1777 root root 30d

deleted a test directory which has mtime and atime >30d old (done via:
touch -d '29 days ago', and then left to age over the weekend).

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2019026

Title:
  systemd /tmp cleaning is suboptimal

Status in systemd package in Ubuntu:
  Confirmed

Bug description:
  Historically on Debian and Ubuntu, before systemd, the default
  handling of /tmp was to periodically, and at boot, remove all
  files/directories older than 30 days; and leave other contents alone.

  With the move to systemd, the "default" (really, hard-coded in
  /usr/lib/tmpfiles.d/tmp.conf) is to not clean /tmp periodically, but
  at boot to remove all contents.

  This is suboptimal for two reasons.

  By cleaning /tmp *only* at boot, if a system makes heavy use of /tmp
  and has lots of inodes under it, possibly due to failures of some
  process to clean up after itself, at boot the system will be
  unavailable for an unnecessarily long time while these files are
  removed.

  By cleaning *all* files under /tmp, this makes a reboot an Event where
  in-progress files may be unnecessarily lost.

  While the FHS does not *guarantee* that files under /tmp will persist
  across boot (because /tmp may be a tmpfs), it also does not *require*
  that /tmp be cleared on boot.

 Although data stored in /tmp may be deleted in a site-specific
 manner, it is recommended that files and directories located in
 /tmp be deleted whenever the system is booted.

 FHS added this recommendation on the basis of historical
 precedent and common practice, but did not make it a
 requirement because system administration is not within the
 scope of this standard.

  I therefore believe the correct value for /usr/lib/tmpfiles.d/tmp.conf
  to restore past behavior is 'd /tmp 1777 root root 30d'.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2019026/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 2019026] Re: systemd /tmp cleaning is suboptimal

2024-02-16 Thread Brian Murray
It looks like something on our autopkgtest-cloud-worker may also be
regularly changing the contents of /tmp but we've set up an experiment
for over the weekend and will report back.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2019026

Title:
  systemd /tmp cleaning is suboptimal

Status in systemd package in Ubuntu:
  Confirmed

Bug description:
  Historically on Debian and Ubuntu, before systemd, the default
  handling of /tmp was to periodically, and at boot, remove all
  files/directories older than 30 days; and leave other contents alone.

  With the move to systemd, the "default" (really, hard-coded in
  /usr/lib/tmpfiles.d/tmp.conf) is to not clean /tmp periodically, but
  at boot to remove all contents.

  This is suboptimal for two reasons.

  By cleaning /tmp *only* at boot, if a system makes heavy use of /tmp
  and has lots of inodes under it, possibly due to failures of some
  process to clean up after itself, at boot the system will be
  unavailable for an unnecessarily long time while these files are
  removed.

  By cleaning *all* files under /tmp, this makes a reboot an Event where
  in-progress files may be unnecessarily lost.

  While the FHS does not *guarantee* that files under /tmp will persist
  across boot (because /tmp may be a tmpfs), it also does not *require*
  that /tmp be cleared on boot.

 Although data stored in /tmp may be deleted in a site-specific
 manner, it is recommended that files and directories located in
 /tmp be deleted whenever the system is booted.

 FHS added this recommendation on the basis of historical
 precedent and common practice, but did not make it a
 requirement because system administration is not within the
 scope of this standard.

  I therefore believe the correct value for /usr/lib/tmpfiles.d/tmp.conf
  to restore past behavior is 'd /tmp 1777 root root 30d'.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2019026/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 2019026] Re: systemd /tmp cleaning is suboptimal

2024-02-16 Thread Paride Legovini
AIUI he suggests keeping the boot time cleanup, and that it could be
nice to have the 30d behavior back. In any case that's what I'd prefer.
I know we're speaking of file age; certainly not of blindly deleting
everything every month or so :-)

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2019026

Title:
  systemd /tmp cleaning is suboptimal

Status in systemd package in Ubuntu:
  Confirmed

Bug description:
  Historically on Debian and Ubuntu, before systemd, the default
  handling of /tmp was to periodically, and at boot, remove all
  files/directories older than 30 days; and leave other contents alone.

  With the move to systemd, the "default" (really, hard-coded in
  /usr/lib/tmpfiles.d/tmp.conf) is to not clean /tmp periodically, but
  at boot to remove all contents.

  This is suboptimal for two reasons.

  By cleaning /tmp *only* at boot, if a system makes heavy use of /tmp
  and has lots of inodes under it, possibly due to failures of some
  process to clean up after itself, at boot the system will be
  unavailable for an unnecessarily long time while these files are
  removed.

  By cleaning *all* files under /tmp, this makes a reboot an Event where
  in-progress files may be unnecessarily lost.

  While the FHS does not *guarantee* that files under /tmp will persist
  across boot (because /tmp may be a tmpfs), it also does not *require*
  that /tmp be cleared on boot.

 Although data stored in /tmp may be deleted in a site-specific
 manner, it is recommended that files and directories located in
 /tmp be deleted whenever the system is booted.

 FHS added this recommendation on the basis of historical
 precedent and common practice, but did not make it a
 requirement because system administration is not within the
 scope of this standard.

  I therefore believe the correct value for /usr/lib/tmpfiles.d/tmp.conf
  to restore past behavior is 'd /tmp 1777 root root 30d'.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2019026/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


Re: [Touch-packages] [Bug 2019026] Re: systemd /tmp cleaning is suboptimal

2024-02-16 Thread Steve Langasek
On Fri, Feb 16, 2024 at 01:06:07PM -, Paride Legovini wrote:
> Maybe we could make that 40d, as 30d is likely to be a time interval at
> which a lot of periodic things happen (e.g.  an off-site backup).

The period here is the age at which files are considered old and to be clean
up, not the interval at which the clean-up happens.

Also fwiw I have edited my /usr/lib/tmpfiles.d/tmp.conf locally (using a
diversion) since this bug was moving forward and it doesn't actually seem to
be working.

$ grep -v ^# /usr/lib/tmpfiles.d/tmp.conf


d /tmp 1777 root root 30d
$ sudo find /tmp -type f -mtime +30 | wc -l
130319
$ sudo find /tmp -atime +30 | wc -l
8
$ sudo find /tmp -ctime +30 | wc -l
744
$

So at least on desktop I have something that is regularly changing
ctime/atime on the contents of /tmp and therefore preventing them from being
garbage collected...

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
Ubuntu Developer   https://www.debian.org/
slanga...@ubuntu.com vor...@debian.org

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2019026

Title:
  systemd /tmp cleaning is suboptimal

Status in systemd package in Ubuntu:
  Confirmed

Bug description:
  Historically on Debian and Ubuntu, before systemd, the default
  handling of /tmp was to periodically, and at boot, remove all
  files/directories older than 30 days; and leave other contents alone.

  With the move to systemd, the "default" (really, hard-coded in
  /usr/lib/tmpfiles.d/tmp.conf) is to not clean /tmp periodically, but
  at boot to remove all contents.

  This is suboptimal for two reasons.

  By cleaning /tmp *only* at boot, if a system makes heavy use of /tmp
  and has lots of inodes under it, possibly due to failures of some
  process to clean up after itself, at boot the system will be
  unavailable for an unnecessarily long time while these files are
  removed.

  By cleaning *all* files under /tmp, this makes a reboot an Event where
  in-progress files may be unnecessarily lost.

  While the FHS does not *guarantee* that files under /tmp will persist
  across boot (because /tmp may be a tmpfs), it also does not *require*
  that /tmp be cleared on boot.

 Although data stored in /tmp may be deleted in a site-specific
 manner, it is recommended that files and directories located in
 /tmp be deleted whenever the system is booted.

 FHS added this recommendation on the basis of historical
 precedent and common practice, but did not make it a
 requirement because system administration is not within the
 scope of this standard.

  I therefore believe the correct value for /usr/lib/tmpfiles.d/tmp.conf
  to restore past behavior is 'd /tmp 1777 root root 30d'.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2019026/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 2019026] Re: systemd /tmp cleaning is suboptimal

2024-02-16 Thread Steve Langasek
You say "Nick's preference", but it's Nick who took the position here
that the default behavior should not change?

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2019026

Title:
  systemd /tmp cleaning is suboptimal

Status in systemd package in Ubuntu:
  Confirmed

Bug description:
  Historically on Debian and Ubuntu, before systemd, the default
  handling of /tmp was to periodically, and at boot, remove all
  files/directories older than 30 days; and leave other contents alone.

  With the move to systemd, the "default" (really, hard-coded in
  /usr/lib/tmpfiles.d/tmp.conf) is to not clean /tmp periodically, but
  at boot to remove all contents.

  This is suboptimal for two reasons.

  By cleaning /tmp *only* at boot, if a system makes heavy use of /tmp
  and has lots of inodes under it, possibly due to failures of some
  process to clean up after itself, at boot the system will be
  unavailable for an unnecessarily long time while these files are
  removed.

  By cleaning *all* files under /tmp, this makes a reboot an Event where
  in-progress files may be unnecessarily lost.

  While the FHS does not *guarantee* that files under /tmp will persist
  across boot (because /tmp may be a tmpfs), it also does not *require*
  that /tmp be cleared on boot.

 Although data stored in /tmp may be deleted in a site-specific
 manner, it is recommended that files and directories located in
 /tmp be deleted whenever the system is booted.

 FHS added this recommendation on the basis of historical
 precedent and common practice, but did not make it a
 requirement because system administration is not within the
 scope of this standard.

  I therefore believe the correct value for /usr/lib/tmpfiles.d/tmp.conf
  to restore past behavior is 'd /tmp 1777 root root 30d'.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2019026/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 2019026] Re: systemd /tmp cleaning is suboptimal

2024-02-16 Thread Paride Legovini
FWIW I agree with Nick's preference (clean at boot && clean files older
than 30d). Maybe we could make that 40d, as 30d is likely to be a time
interval at which a lot of periodic things happen (e.g. an off-site
backup). A retention period >30d is less likely be synchronized with it
in an unlucky way.

Mounts with relatime (the default) update the atime unconditionally if
the previous atime is >1day old, so no issues with that.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2019026

Title:
  systemd /tmp cleaning is suboptimal

Status in systemd package in Ubuntu:
  Confirmed

Bug description:
  Historically on Debian and Ubuntu, before systemd, the default
  handling of /tmp was to periodically, and at boot, remove all
  files/directories older than 30 days; and leave other contents alone.

  With the move to systemd, the "default" (really, hard-coded in
  /usr/lib/tmpfiles.d/tmp.conf) is to not clean /tmp periodically, but
  at boot to remove all contents.

  This is suboptimal for two reasons.

  By cleaning /tmp *only* at boot, if a system makes heavy use of /tmp
  and has lots of inodes under it, possibly due to failures of some
  process to clean up after itself, at boot the system will be
  unavailable for an unnecessarily long time while these files are
  removed.

  By cleaning *all* files under /tmp, this makes a reboot an Event where
  in-progress files may be unnecessarily lost.

  While the FHS does not *guarantee* that files under /tmp will persist
  across boot (because /tmp may be a tmpfs), it also does not *require*
  that /tmp be cleared on boot.

 Although data stored in /tmp may be deleted in a site-specific
 manner, it is recommended that files and directories located in
 /tmp be deleted whenever the system is booted.

 FHS added this recommendation on the basis of historical
 precedent and common practice, but did not make it a
 requirement because system administration is not within the
 scope of this standard.

  I therefore believe the correct value for /usr/lib/tmpfiles.d/tmp.conf
  to restore past behavior is 'd /tmp 1777 root root 30d'.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2019026/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 2019026] Re: systemd /tmp cleaning is suboptimal

2024-02-14 Thread Brian Murray
The Ubuntu QA team encountered an issue where our autopkgtest-cloud-
workers in the prod-proposed-migration environment ran out of free space
in /tmp because these are production servers which are rebooted very
infrequently. Due to some bug in the autopkgtest-cloud or autopkgtest
code there were left over log files from late November, December, and
January in /tmp. These log files can be quite large and our 200G /tmp
partition ended up being full quite regularly.

I too would expect /tmp to be cleaned up regularly and remember the days
when it was.

It be interesting to see what other server administrators do about
cleaning up /tmp. Does everyone modify /usr/lib/tmpfiles.d/tmp.conf ?

** Changed in: systemd (Ubuntu)
   Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2019026

Title:
  systemd /tmp cleaning is suboptimal

Status in systemd package in Ubuntu:
  Confirmed

Bug description:
  Historically on Debian and Ubuntu, before systemd, the default
  handling of /tmp was to periodically, and at boot, remove all
  files/directories older than 30 days; and leave other contents alone.

  With the move to systemd, the "default" (really, hard-coded in
  /usr/lib/tmpfiles.d/tmp.conf) is to not clean /tmp periodically, but
  at boot to remove all contents.

  This is suboptimal for two reasons.

  By cleaning /tmp *only* at boot, if a system makes heavy use of /tmp
  and has lots of inodes under it, possibly due to failures of some
  process to clean up after itself, at boot the system will be
  unavailable for an unnecessarily long time while these files are
  removed.

  By cleaning *all* files under /tmp, this makes a reboot an Event where
  in-progress files may be unnecessarily lost.

  While the FHS does not *guarantee* that files under /tmp will persist
  across boot (because /tmp may be a tmpfs), it also does not *require*
  that /tmp be cleared on boot.

 Although data stored in /tmp may be deleted in a site-specific
 manner, it is recommended that files and directories located in
 /tmp be deleted whenever the system is booted.

 FHS added this recommendation on the basis of historical
 precedent and common practice, but did not make it a
 requirement because system administration is not within the
 scope of this standard.

  I therefore believe the correct value for /usr/lib/tmpfiles.d/tmp.conf
  to restore past behavior is 'd /tmp 1777 root root 30d'.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2019026/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 2019026] Re: systemd /tmp cleaning is suboptimal

2023-06-12 Thread Nick Rosbrook
> how would it impact you if it was NOT cleaned at reboot?

I just like it. It's easier for me to keep track in my head that "oh,
this file in /tmp will only be around until I reboot", as opposed to
trying to keep track of the actual age of a file. To be clear, I am not
suggesting that my use case is strong argument for keeping the current
default (I will happily write an /etc/tmpfiles.d/tmp.conf drop-in to
meet my preference if needed). Just pointing out that there might be a
range of preferences on the default handling of /tmp.

Also, you may have already come across this, but if not, this is the
Debian bug that resulted in the current default:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=675422.

If you think it would be best for most Ubuntu users to change the
current default, then we should go with your suggested change. If the
motivation is mostly about your schroot use case, then I would suggest
either modifying schroot to do what you need, or using
/etc/tmpfiles.d/tmp.conf.

** Bug watch added: Debian Bug tracker #675422
   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=675422

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2019026

Title:
  systemd /tmp cleaning is suboptimal

Status in systemd package in Ubuntu:
  New

Bug description:
  Historically on Debian and Ubuntu, before systemd, the default
  handling of /tmp was to periodically, and at boot, remove all
  files/directories older than 30 days; and leave other contents alone.

  With the move to systemd, the "default" (really, hard-coded in
  /usr/lib/tmpfiles.d/tmp.conf) is to not clean /tmp periodically, but
  at boot to remove all contents.

  This is suboptimal for two reasons.

  By cleaning /tmp *only* at boot, if a system makes heavy use of /tmp
  and has lots of inodes under it, possibly due to failures of some
  process to clean up after itself, at boot the system will be
  unavailable for an unnecessarily long time while these files are
  removed.

  By cleaning *all* files under /tmp, this makes a reboot an Event where
  in-progress files may be unnecessarily lost.

  While the FHS does not *guarantee* that files under /tmp will persist
  across boot (because /tmp may be a tmpfs), it also does not *require*
  that /tmp be cleared on boot.

 Although data stored in /tmp may be deleted in a site-specific
 manner, it is recommended that files and directories located in
 /tmp be deleted whenever the system is booted.

 FHS added this recommendation on the basis of historical
 precedent and common practice, but did not make it a
 requirement because system administration is not within the
 scope of this standard.

  I therefore believe the correct value for /usr/lib/tmpfiles.d/tmp.conf
  to restore past behavior is 'd /tmp 1777 root root 30d'.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2019026/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 2019026] Re: systemd /tmp cleaning is suboptimal

2023-06-09 Thread Steve Langasek
(setting bug back to New because I don't see any request for
information)

** Changed in: systemd (Ubuntu)
   Status: Incomplete => New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2019026

Title:
  systemd /tmp cleaning is suboptimal

Status in systemd package in Ubuntu:
  New

Bug description:
  Historically on Debian and Ubuntu, before systemd, the default
  handling of /tmp was to periodically, and at boot, remove all
  files/directories older than 30 days; and leave other contents alone.

  With the move to systemd, the "default" (really, hard-coded in
  /usr/lib/tmpfiles.d/tmp.conf) is to not clean /tmp periodically, but
  at boot to remove all contents.

  This is suboptimal for two reasons.

  By cleaning /tmp *only* at boot, if a system makes heavy use of /tmp
  and has lots of inodes under it, possibly due to failures of some
  process to clean up after itself, at boot the system will be
  unavailable for an unnecessarily long time while these files are
  removed.

  By cleaning *all* files under /tmp, this makes a reboot an Event where
  in-progress files may be unnecessarily lost.

  While the FHS does not *guarantee* that files under /tmp will persist
  across boot (because /tmp may be a tmpfs), it also does not *require*
  that /tmp be cleared on boot.

 Although data stored in /tmp may be deleted in a site-specific
 manner, it is recommended that files and directories located in
 /tmp be deleted whenever the system is booted.

 FHS added this recommendation on the basis of historical
 precedent and common practice, but did not make it a
 requirement because system administration is not within the
 scope of this standard.

  I therefore believe the correct value for /usr/lib/tmpfiles.d/tmp.conf
  to restore past behavior is 'd /tmp 1777 root root 30d'.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2019026/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 2019026] Re: systemd /tmp cleaning is suboptimal

2023-06-09 Thread Steve Langasek
The reason it's specifically important to me not to clean at boot is
that schroot bind mounts /tmp by default but does not bind mount
/var/tmp by default, so I am accustomed (since long before the systemd
behavior became the norm) to using this directory for sharing data
between the host system and chroots and relying on it persisting across
reboots (since it's not old).  (And I don't use /home because it's stuff
I *do* want garbage-collected for me - just not at reboot!)

When you say you've "become very accustomed to the current behavior
where /tmp is emptied on reboot" - how would it impact you if it was NOT
cleaned at reboot?

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2019026

Title:
  systemd /tmp cleaning is suboptimal

Status in systemd package in Ubuntu:
  New

Bug description:
  Historically on Debian and Ubuntu, before systemd, the default
  handling of /tmp was to periodically, and at boot, remove all
  files/directories older than 30 days; and leave other contents alone.

  With the move to systemd, the "default" (really, hard-coded in
  /usr/lib/tmpfiles.d/tmp.conf) is to not clean /tmp periodically, but
  at boot to remove all contents.

  This is suboptimal for two reasons.

  By cleaning /tmp *only* at boot, if a system makes heavy use of /tmp
  and has lots of inodes under it, possibly due to failures of some
  process to clean up after itself, at boot the system will be
  unavailable for an unnecessarily long time while these files are
  removed.

  By cleaning *all* files under /tmp, this makes a reboot an Event where
  in-progress files may be unnecessarily lost.

  While the FHS does not *guarantee* that files under /tmp will persist
  across boot (because /tmp may be a tmpfs), it also does not *require*
  that /tmp be cleared on boot.

 Although data stored in /tmp may be deleted in a site-specific
 manner, it is recommended that files and directories located in
 /tmp be deleted whenever the system is booted.

 FHS added this recommendation on the basis of historical
 precedent and common practice, but did not make it a
 requirement because system administration is not within the
 scope of this standard.

  I therefore believe the correct value for /usr/lib/tmpfiles.d/tmp.conf
  to restore past behavior is 'd /tmp 1777 root root 30d'.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2019026/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 2019026] Re: systemd /tmp cleaning is suboptimal

2023-06-09 Thread Nick Rosbrook
I personally have become very accustomed to the current behavior where
/tmp is emptied on reboot -- I have no idea what most users would say
about this, so I wonder if changing that behavior would be unwelcome. I
do think it could be nice to have the 30d behavior back, however.

In other words, if we did change this I think my preference would be:

 D /tmp 1777 root root 30d

so that we still always clear on boot, but also after 30d if needed.

On the other hand, this feels like it might be something that most
people don't care about, and those that do are welcome to change their
local system.

** Changed in: systemd (Ubuntu)
   Status: New => Incomplete

** Changed in: systemd (Ubuntu)
   Importance: Undecided => Wishlist

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2019026

Title:
  systemd /tmp cleaning is suboptimal

Status in systemd package in Ubuntu:
  Incomplete

Bug description:
  Historically on Debian and Ubuntu, before systemd, the default
  handling of /tmp was to periodically, and at boot, remove all
  files/directories older than 30 days; and leave other contents alone.

  With the move to systemd, the "default" (really, hard-coded in
  /usr/lib/tmpfiles.d/tmp.conf) is to not clean /tmp periodically, but
  at boot to remove all contents.

  This is suboptimal for two reasons.

  By cleaning /tmp *only* at boot, if a system makes heavy use of /tmp
  and has lots of inodes under it, possibly due to failures of some
  process to clean up after itself, at boot the system will be
  unavailable for an unnecessarily long time while these files are
  removed.

  By cleaning *all* files under /tmp, this makes a reboot an Event where
  in-progress files may be unnecessarily lost.

  While the FHS does not *guarantee* that files under /tmp will persist
  across boot (because /tmp may be a tmpfs), it also does not *require*
  that /tmp be cleared on boot.

 Although data stored in /tmp may be deleted in a site-specific
 manner, it is recommended that files and directories located in
 /tmp be deleted whenever the system is booted.

 FHS added this recommendation on the basis of historical
 precedent and common practice, but did not make it a
 requirement because system administration is not within the
 scope of this standard.

  I therefore believe the correct value for /usr/lib/tmpfiles.d/tmp.conf
  to restore past behavior is 'd /tmp 1777 root root 30d'.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2019026/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp