admiral
admiral copied to clipboard
Enforce log compression and RollingPolicy on OVA's Admiral logs
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
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?
@sergiosagu @andrewtchin 1GB is a very huge file , we should not wait for more 200MB.
BTW Github has a limit of 10MB for attachment, I was not able to upload logs and had to send them over in Slack
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.
@sergiosagu Let us bring down the file size from 1GB to 200MB as a default setting
OK, we'll leave it 200MB and up to 25 files to keep the same amount of 1GB x 5 files logs.
The new log settings will be taken into account the the commit https://github.com/vmware/admiral/commit/452d39749878a095a7b3ee4231fa90ade7fe9d1c gets to the container image.
I'm leaving the issue open to explore the automatic log compression thing.