STC830:Brazos:br311p06: file(s) are deleted from the /tmp after each reboot on Ubuntu OS

Bug #1444958 reported by bugproxy
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
systemd (Debian)
Fix Released
Unknown
systemd (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

== Comment: #0 - Application Cdeadmin <email address hidden> - 2015-04-16 01:55:24 ==
==== State: Open by: mpham on 14 April 2015 14:26:40 ====

Problem Description:
====================

File(s) are deleted from the /tmp after each reboot on Ubuntu OS.

Even after the modification of

TMPTIME=-1 or infinite or 60 in /etc/default/rcS.

Symtem Info:
=============

 ver 1.5.4.3 - OS, HTX, Firmware and Machine details

                           OS: GNU/Linux
                   OS Version: Ubuntu Vivid Vervet (development branch) \n \l
               Kernel Version: 3.19.0-10-generic
                  HTX Version: htxubuntu-331
                    Host Name: br311p06.site
            Machine Serial No: IBM,02109D2E7
           Machine Type/Model: IBM,9119-MHE
              System FW Level: FW830.00 (SC830_028)

HMC:
=====

brhmc4 (9.3.242.95)
<Note by kavinash, 2015/04/16 00:53:14 seq: 5 rel: 0 action: assign>

Transferring the defect to Linux team for further analysis.

bugproxy (bugproxy)
tags: added: architecture-ppc64 bugnameltc-124027 severity-high targetmilestone-inin---
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1444958/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2015-04-16 12:32 EDT-------
== Comment: #0 - Application Cdeadmin <email address hidden> - 2015-04-16 01:55:24 ====== State: Open by: cde00 on 16 April 2015 07:32:02 ====

tags: added: vivid
Revision history for this message
Brian Murray (brian-murray) wrote :

If you set TMPTIME=-1 and boot with upstart the files in /tmp are preserved.

tags: added: systemd-boot
Changed in ubuntu:
status: New → Confirmed
importance: Undecided → High
bugproxy (bugproxy)
tags: added: architecture-ppc64le targetmilestone-inin1504
removed: architecture-ppc64 targetmilestone-inin---
Martin Pitt (pitti)
affects: ubuntu → systemd (Ubuntu)
Changed in systemd (Ubuntu):
importance: High → Medium
status: Confirmed → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

Indeed systemd-tmpfiles-clean.service does not read this, and I'm really not sure whether this should be put back. Preserving files in /tmp is counterintuitive, a recipe for filling up the disk, does not meet user expectations when rebooting, is not intended by the FHS (http://www.pathname.com/fhs/pub/fhs-2.3.html#TMPTEMPORARYFILES), and that option can never work reliably: If you enable tmp.mount or otherwise make /tmp a tmpfs this option cannot work.

If you really don't want to clean /tmp you can do "sudo systemctl mask systemd-tmpfiles-clean.service", but I highly recommend *not* to do this.

We might add a comment to rcS that this setting does not work under systemd and is discouraged?

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2015-04-21 15:25 EDT-------
==== State: Open by: mpham on 21 April 2015 10:17:41 ====

I went ahead issue this command, just to see if Ubuntu keep my /tmp/bootme.log

"sudo systemctl mask systemd-tmpfiles-clean.service"

Once the system came up after rebooted, it's sure still rm /tmp/bootme.log, htxerr, htxmsg....

I noticed there are files in /tmp that there (didn't get deleted).

Is there a workaround to keep at least /tmp/bootme.log, htxerr and htxmsg?

Revision history for this message
Martin Pitt (pitti) wrote :

Actually systemd.postinst has some migration code which is supposed to translate this setting to /etc/tmpfiles.d/tmp.conf . Did you get such a file? If so, can you please attach it?

Changed in systemd (Debian):
status: Unknown → Confirmed
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2015-04-28 14:08 EDT-------
==== State: Open by: mpham on 28 April 2015 08:52:16 ====

I looked at the system, and realized that there is NO /etc/tmpfiles.d/tmp.conf.

Please advise is that some additional package that I should install on Ubuntu?

Revision history for this message
Martin Pitt (pitti) wrote :

No, systemd's postinst is supposed to create it on first installation if you have TMPTIME set to infinity in rcS. That wouldn't work if you installed Ubuntu 14.10 first and *then* change TMPTIME, as that's an one-time migration.

Looking at that more closely, it's probably for the better that we don't run exactly this code all the time, as /usr/lib/tmpfiles.d/tmp.conf has changed since that migration code was made (creating the file would also disable /tmp/systemd-private*). We should rename it and only override /tmp/.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2015-05-04 16:05 EDT-------
==== State: Open by: mpham on 04 May 2015 11:02:14 ====

It doesn't matter what value I set TMPTIME. Curtain files in /tmp directory got deleted.

As for customers as well as testing environment, please provide the way the files in /tmp still be kept after each reboot. These files needed for testing data.

Revision history for this message
Martin Pitt (pitti) wrote :

You have two options to do this locally:

- Use /var/tmp/ (this has never been cleaned up automatically in Debian and Ubuntu)

- Override /usr/lib/tmpfiles.d/tmp.conf by creating a file like

    $ cat /etc/tmpfiles.d/tmp.conf
    d /tmp 1777 root root -

  This will merely create the /tmp directory (if not present), but not clean it.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2015-05-12 00:23 EDT-------
==== State: Open by: mgrosch on 11 May 2015 19:13:03 ====

#=#=# 2015-05-11 19:13:01 (CDT) #=#=#
New Fix_Potential = [F830.10W]
#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2015-05-12 13:25 EDT-------
==== State: Open by: mpham on 12 May 2015 08:15:22 ====

I tried to Override /usr/lib/tmpfiles.d/tmp.conf, the files in /tmp are kept are each reboot. Thanks!

Revision history for this message
odror (ozdror) wrote :

I have the same issue. I would like to keep my tmp files for at least a month. It is a good place for me to save temporary files

Changed in systemd (Debian):
status: Confirmed → Fix Released
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2016-02-22 22:07 EDT-------
Anyone tried 15.10 or 16.04 to see if this is fixed?

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

The referenced Debian bug was about sanitizing the migration like postinst steps.
These fixes of the systemdare in Wily and Xenial due to merges of the package.

Eventually we have to conclude that we have a new intended behavior and not really a bug.
If you actually want the old behavior the bug holds workarounds provided by Martin Pitt - thanks a lot.
For those who want more detail please take a look at http://manpages.ubuntu.com/manpages/utopic/man5/tmpfiles.d.5.html

I'm not sure if the correct bug state would be Invalid or Opinion now - IMHO I'm setting invalid, but feel free to change.

Changed in systemd (Ubuntu):
status: Triaged → Invalid
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2016-11-22 02:16 EDT-------

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.