Bug 1400480

Summary: Install tmpfiles.d snippet that prevents removal of /tmp/beakerlib-* and /var/tmp/beakerlib-* files
Product: [Fedora] Fedora Reporter: Michal Sekletar <msekleta>
Component: beakerlibAssignee: Dalibor Pospíšil <dapospis>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: medium    
Version: rawhideCC: azelinka, dapospis, jprokes, mkyral, muller
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-03 14:27:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Michal Sekletar 2016-12-01 10:42:37 UTC
Description of problem:
If some test sets system time to the future date (time has to jump for more than 30 days to the future) then it may happen that systemd-tmpfiles service will delete file backups or other important beakerlib files from /var/tmp/ or /tmp.

Version-Release number of selected component (if applicable):
beakerlib-1.11-2.fc24

How reproducible:
always

Steps to Reproduce:
1. Run beakerlib test
2. Change time in test to the future
3. Run systemctl restart systemd-tmpfiles-clean.service

Actual results:
Observe that some files needed by beakerlib stored in /tmp or /var/tmp got removed

Expected results:
No files used by beakerlib are removed

Additional info:
beakerlib rpm package should ship tmpfiles.d snippet like,

/usr/lib/tmpfiles.d/beakerlib.conf

x /tmp/beakerlib-*
x /var/tmp/beakerlib-*

Comment 1 Dalibor Pospíšil 2016-12-02 08:14:31 UTC
Good point, we can definitely implement this.

Comment 4 Dalibor Pospíšil 2017-01-03 14:27:58 UTC
As I'm looking at the code I can see that we actually ship that file.

# cat /usr/lib/tmpfiles.d/beakerlib.conf 
x /var/tmp/beakerlib-*

I think it should be enough regarding to backed up files. And the /tmp directory should not be critical if it is removed in the middle of the test.

I'm considering this ans not a bug. If you're sure the problem is really in beakerlib, feel free to reopen this bug.