Bug 1519414 - [RFE] Handle accumulated log files rotation in /var/log/ovirt-engine/host-deploy
Summary: [RFE] Handle accumulated log files rotation in /var/log/ovirt-engine/host-deploy
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.6.10
Hardware: All
OS: Linux
medium
high
Target Milestone: ovirt-4.3.1
: 4.3.0
Assignee: Yedidyah Bar David
QA Contact: Liran Rotenberg
URL:
Whiteboard:
Depends On: 1540201
Blocks: 1520566 CEECIR_RHV43_proposed
TreeView+ depends on / blocked
 
Reported: 2017-11-30 17:21 UTC by Julio Entrena Perez
Modified: 2022-03-13 15:14 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-12-23 07:00:20 UTC
oVirt Team: Integration
Target Upstream Version:
Embargoed:
lsvaty: testing_plan_complete-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHV-45188 0 None None None 2022-03-13 15:14:43 UTC

Description Julio Entrena Perez 2017-11-30 17:21:57 UTC
> 1. Proposed title of this feature request

Remove old log files in /var/log/ovirt-engine/host-deploy

> 3. What is the nature and description of the request?

Customer would like to see RHV-M automatically removing old log files in directory /var/log/ovirt-engine/host-deploy

> 4. Why does the customer need this? (List the business requirements here)

- To prevent excessive disk usage in directory /var/log/ovirt-engine/host-deploy :

  $ ls -l sosreport-LogCollector-20171114164426/sosreport-n433987-20171114164203/var/log/ovirt-engine/host-deploy/ | wc -l
  67304
  
  $ du -sh sosreport-LogCollector-20171114164426/sosreport-n433987-20171114164203/var/log/ovirt-engine/host-deploy/ 
  912M	sosreport-LogCollector-20171114164426/sosreport-n433987-20171114164203/var/log/ovirt-engine/host-deploy/

- To prevent excessive upload times when providing logcollector tarballs to Red Hat Support

  $ ls -logh sosreport-LogCollector-20171114164426.tar.xz 
  -rw-rw-r--. 1 557M Nov 14 17:02 sosreport-LogCollector-20171114164426.tar.xz
                ^^^^

> 5. How would the customer like to achieve this? (List the functional requirements here)

RHV-M should periodically check for and delete old log files in directory /var/log/ovirt-engine/host-deploy .
systemd tmpfiles facility could be used for this purpose:

# cat /usr/lib/tmpfiles.d/ovirt-host-deploy.conf 

# Clear host-deploy log files older than 60 days
e /var/log/ovirt-engine/host-deploy/ - - - 60d

> 6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.

Disk usage in directory /var/log/ovirt-engine/host-deploy doesn't grow ad infinitum and remains reasonable.
RHV-M looks after and tidies up the log files it creates.


> 7. Is there already an existing RFE upstream or in Red Hat Bugzilla?

None found.

> 8. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?

No.

> 9. Is the sales team involved in this request and do they have any additional input?

No.

> 10. List any affected packages or components.

ovirt-engine-backend

> 11. Would the customer be able to assist in testing this functionality if implemented?

Yes.

Comment 10 Arik 2018-02-11 14:53:41 UTC
Note that this is probably applicable for /var/log/ovirt-engine/ova as well.

Comment 12 Roman Hodain 2018-08-30 11:30:13 UTC
From the CEE point of view we time to time need older logs, but usually, we do not diagnose logs that are more than two months old. The issue is in most cases noticed earlier. 

I am perfectly OK with 2 months, but I would suggest adding a chapter to the documentation where we explain the behaviour and provide some information on how to adjust that if needed.

Comment 18 Yedidyah Bar David 2018-12-20 10:24:56 UTC
Only now I realized that in 4.2 we do not have ovirt-host-mgmt logs anymore - as part of bug 1380498, we changed the code to use ansible instead of ovirt-host-mgmt (which is part of ovirt-host-deploy).

Martin already noted that in bug 1540201 comment 4 but I didn't understand :-(

So in 4.2 and later, logs in /var/log/ovirt-engine/host-deploy are only for actual host installations.

Anyone who still has there old ovirt-host-mgmt* files can safely remove them manually.

Can we close current bug, then?

Comment 19 Julio Entrena Perez 2018-12-20 10:34:59 UTC
$ ls -l sosreport-LogCollector-20171114164426/sosreport-n433987-20171114164203/var/log/ovirt-engine/host-deploy/ | wc -l
67304

$ ls -l sosreport-LogCollector-20171114164426/sosreport-n433987-20171114164203/var/log/ovirt-engine/host-deploy/ | grep ovirt-host-mgmt | wc -l
66760
$ ls -l sosreport-LogCollector-20171114164426/sosreport-n433987-20171114164203/var/log/ovirt-engine/host-deploy/ | grep  ovirt-host-mgmt | awk '{sum += $5} END {print sum}'
818166668

(780MB)

$ ls -l sosreport-LogCollector-20171114164426/sosreport-n433987-20171114164203/var/log/ovirt-engine/host-deploy/ | grep -v ovirt-host-mgmt | wc -l
544
$ ls -l sosreport-LogCollector-20171114164426/sosreport-n433987-20171114164203/var/log/ovirt-engine/host-deploy/ | grep -v ovirt-host-mgmt | awk '{sum += $5} END {print sum}'
32269661

(30MB)

Yes, the remaining files don't pose a problem.

Comment 22 Yedidyah Bar David 2018-12-23 07:00:20 UTC
OK, closing as not a bug (for 4.3, it's not, anymore). In principle could have been closed as duplicate of bug 1380498, because current was fixed by the changes in that one, but not really intentionally (AFAIU).


Note You need to log in before you can comment on or make changes to this bug.