Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Enforce log compression and RollingPolicy on OVA's Admiral logs #232

Open
lgayatri opened this issue Dec 6, 2017 · 7 comments
Open

Enforce log compression and RollingPolicy on OVA's Admiral logs #232

lgayatri opened this issue Dec 6, 2017 · 7 comments

Comments

@lgayatri
Copy link

lgayatri commented Dec 6, 2017

Build: https://storage.googleapis.com/vic-product-ova-releases/vic-v1.3.0-rc2-2628-9e2a95b6.ova

The log size is 458MB for an OVA which was up since 7 days.
root@vic-st-h2-132 [ /storage/log/admiral ]# uptime
07:36:59 up 7 days, 21:43, 0 users, load average: 0.78, 1.20, 1.14

root@vic-st-h2-132 [ /storage/log/admiral ]# ls -ltrh
total 458M
-rw-r--r-- 1 10000 10000 0 Nov 28 10:01 xenonHost.0.log.lck
-rw-r--r-- 1 10000 10000 458M Dec 6 07:32 xenonHost.0.log

We need to enforce RollingPolicy.

@sergiosagu @martin-borisov

@sergiosagu
Copy link
Contributor

sergiosagu commented Dec 6, 2017

Log rolling is already configured and we agreed with @andrewtchin to do it at 1GB size, see https://github.com/vmware/admiral/blob/master/host/logging-vic.properties

Are there any OVA requirements to do it more often?

On the other hand, the compression of the already rotated files is not supported out of the box by the Java logging framework. This we achieve it (for example in vRA) using the Linux-like system tool logrotate (e.g. https://www.systutorials.com/docs/linux/man/5-logrotate.conf/). If the OVA already uses logrotate we can change the default Admiral logging settings for VIC to stop doing the rotation and the integrate with logrotate to do the rotation + compression. @andrewtchin - any suggestion?

@lgayatri
Copy link
Author

lgayatri commented Dec 6, 2017

@sergiosagu @andrewtchin 1GB is a very huge file , we should not wait for more 200MB.

@lgayatri
Copy link
Author

lgayatri commented Dec 6, 2017

image

BTW Github has a limit of 10MB for attachment, I was not able to upload logs and had to send them over in Slack

@andrewtchin
Copy link

I don't care that much what the size is. My understanding was that the user can configure it if they want something different than the default. @morris-jason may be able to comment on if we use logrotate. My thought was that I wanted each component to be able to choose their logging policy based on their needs, not mandated by the platform.

@lgayatri
Copy link
Author

lgayatri commented Dec 8, 2017

@sergiosagu Let us bring down the file size from 1GB to 200MB as a default setting

@sergiosagu
Copy link
Contributor

OK, we'll leave it 200MB and up to 25 files to keep the same amount of 1GB x 5 files logs.

@sergiosagu
Copy link
Contributor

The new log settings will be taken into account the the commit 452d397 gets to the container image.

I'm leaving the issue open to explore the automatic log compression thing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants