Bug 1103676

Summary: ovirt-engine should not store long term files in "/var/tmp/ovirt-engine/": tmpwatch will remove that directory after 30 days
Product: Red Hat Enterprise Virtualization Manager Reporter: Anil Vettathu <avettath>
Component: ovirt-engine-setupAssignee: Sandro Bonazzola <sbonazzo>
Status: CLOSED ERRATA QA Contact: Jiri Belka <jbelka>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.3.0CC: alonbl, audgiri, avettath, bazulay, didi, dsulliva, iheim, jentrena, lbopf, lveyde, mitr, ngupta, pdwyer, rbalakri, Rhev-m-bugs, sauchter, sbonazzo, sherold, stirabos, yeylon, ylavi
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: All   
OS: Linux   
Whiteboard: integration
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, the Red Hat Enterprise Virtualization Manager stored files in /var/tmp/ovirt-engine, and tmpwatch deleted those files on a monthly basis. This caused a failure in the Manager. Now, files are stored in /var/lib and tmpwatch does not delete them.
Story Points: ---
Clone Of:
: 1119178 (view as bug list) Environment:
Last Closed: 2015-02-11 18:02:48 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1119178, 1142923, 1156165    

Description Anil Vettathu 2014-06-02 10:41:01 UTC
Description of problem:

/etc/cron.daily/tmpwatch had deleted files which are not modified for more than 30 days from "/var/tmp/ovirt-engine/". This created issue with ovirt-engine (RHEV) service and it stopped functioning. Thus affecting customer's production environment

Version-Release number of selected component (if applicable):

tmpwatch-2.9.16-4.el6.x86_64

How reproducible:

Always.

Steps to Reproduce:
1. start ovirt-engine service
2. Make sure tmpwatch daily cronjob is running (/etc/cron.daily/tmpwatch)



Actual results:
After 30 days, tmpwatch will delete files which are not modified from /var/tmp/ovirt-engine/

Expected results:
tmpwatch should exclude /var/tmp/ovirt-engine/ from its cleaning process.

Additional info:

Suggested the following workaround till the issue is resolved.

Modify ' /usr/sbin/tmpwatch "$flags" 30d /var/tmp ' to ' /usr/sbin/tmpwatch "$flags" -x /var/tmp/ovirt-engine 30d /var/tmp ' (this will exclude /var/tmp/ovirt-engine)

Comment 1 Miloslav Trmač 2014-06-03 16:05:47 UTC
Why is (In reply to Anil Vettathu from comment #0)
> After 30 days, tmpwatch will delete files which are not modified from
> /var/tmp/ovirt-engine/

No, it will delete files which are not _accessed_ for 30 days.  Why is ovirt-engine storing long-term data in there in the first place?  AFAICT it shouldn’t, contents of /var/tmp are explicitly expected to be deleted at unpredictable time per http://www.pathname.com/fhs/pub/fhs-2.3.html#PURPOSE50 .

Comment 2 Alon Bar-Lev 2014-06-04 07:00:46 UTC
I do not expect blind periodic delete /var/tmp, however it is easy enough to move this tmp to /var/lib/ovirt-engine/tmp.

You can now set ENGINE_TMP within /etc/ovirt-engine/engine.conf/30-tmpdir.conf:

 ENGINE_TMP="${ENGINE_VAR}/tmp"

Comment 3 Alon Bar-Lev 2014-06-04 07:09:12 UTC
Sandro,
When sending modification, please separate between the jboss tmp layout and the tmpdir, make the jboss layout reside at lib.
Thanks,

Comment 5 Alon Bar-Lev 2014-06-04 15:57:59 UTC
(In reply to Alon Bar-Lev from comment #2)
> I do not expect blind periodic delete /var/tmp, however it is easy enough to
> move this tmp to /var/lib/ovirt-engine/tmp.
> 
> You can now set ENGINE_TMP within
> /etc/ovirt-engine/engine.conf/30-tmpdir.conf:
> 
>  ENGINE_TMP="${ENGINE_VAR}/tmp"

Sorry... forgot the .d

/etc/ovirt-engine/engine.conf.d/30-tmpdir.conf:
---
ENGINE_TMP="${ENGINE_VAR}/tmp"
---

Comment 10 Yedidyah Bar David 2014-07-08 12:48:03 UTC
(In reply to Alon Bar-Lev from comment #3)
> Sandro,
> When sending modification, please separate between the jboss tmp layout and
> the tmpdir, make the jboss layout reside at lib.

Why not move all of ENGINE_TMP to lib? Is there anything that must stay at /var/tmp ?

Comment 11 Alon Bar-Lev 2014-07-08 14:04:38 UTC
(In reply to Yedidyah Bar David from comment #10)
> (In reply to Alon Bar-Lev from comment #3)
> > Sandro,
> > When sending modification, please separate between the jboss tmp layout and
> > the tmpdir, make the jboss layout reside at lib.
> 
> Why not move all of ENGINE_TMP to lib? Is there anything that must stay at
> /var/tmp ?

please leave the ENGINE_TMP within /var/tmp/ovirt-engine, it may have other uses, please have a different variable for the jboss layout.

Comment 12 Yedidyah Bar David 2014-07-09 11:49:51 UTC
http://gerrit.ovirt.org/29752 is for ovirt-reports.

Comment 15 Jiri Belka 2014-07-29 14:15:49 UTC
ok, looks for for engine (ovirt-engine-3.5.0-0.0.master.20140722232058.git8e1babc.el6.noarch) and reports (ovirt-engine-reports-3.5.0-0.5.el6.noarch.rpm).

Comment 19 errata-xmlrpc 2015-02-11 18:02:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0158.html

Comment 20 Red Hat Bugzilla 2023-09-14 02:09:04 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days