HCX - Log rotate functionality is broken for httpd path
search cancel

HCX - Log rotate functionality is broken for httpd path

book

Article ID: 321624

calendar_today

Updated On:

Products

VMware HCX VMware Cloud on AWS

Issue/Introduction

Identify and remediate a known issue with HCX log rotation workflow.

Symptoms:
During runtime, "/var/log/httpd" directory may filled up unexpectedly on a given HCX connector or cloud manager.


Cause

In existing HCX systems, the log rotation for httpd is non-functional due to mis-configuration found in the absolute path as described below:
root@hcx [ /etc/logrotate.d ]# cat access-log.conf
/var/log/httpd/access_log {
       copytruncate
       size=50M
       rotate 20
}

Resolution

The issue is fixed in HCX 4.5.0 release.

Workaround:
As a potential WA, we can clean up the content for access.log from below directory:
  • Login to HCX admin/root console.
  • Go to /var/log/httpd
  • Perform below command to cleanup the content from access.log.
> access.log

SAMPLE OUTPUT:
root@vmware-hcx [ ~ ]# cd /var/log/httpd
root@vmware-hcx [ /var/log/httpd ]# ls -l
total 296
-rw-r--r-- 1 root root 23293956 Oct  8 04:06 access.log >>>>>>
-rw-r--r-- 1 root root     3315 Feb 16 05:29 error.log

root@vmware-hcx [ /var/log/httpd ]# > access.log

root@vmware-hcx [ /var/log/httpd ]# ls -l
total 4
-rw-r--r-- 1 root root    0 Feb 16 05:33 access.log >>>>>>>
-rw-r--r-- 1 root root 3315 Feb 16 05:29 error.log



Additional Information

Impact/Risks:
  • There will NO operational impact in any migration & network extension functionality.
  • It may impact guest customization workflow during vSR Bulk Migration.
  • User may observe high usage for "/dev/sda3" or "/dev/sda2" partition in HCX Connector/Cloud manager.
Note: /dev/sda2 or /dev/sda3 partition is used for root directory. Refer to VMware Knowledge Base 90988 for more info.