Log rotate fails for /var/log/vmware on NSX-T Manager and Edge Nodes
book
Article ID: 322441
calendar_today
Updated On:
Products
VMware NSXVMware vSphere ESXi
Issue/Introduction
The partition '/var/log/vmware' grow in size.
The following files may grow quite large:
integrity_checker.log
top-mem.log
top-cpu.log
The support bundle export fails.
If you run the command:
/usr/sbin/logrotate -d /etc/logrotate.conf 2>&1 | less
The following errors are displayed ... error: appliance-config:3 bad size '12.8' ... error: appliance-config:17 bad size '51.2'
Note: The command '/usr/sbin/logrotate -d /etc/logrotate.conf 2>&1 | less' is a debug command and will only read the configuration file to check its correctness.
Environment
VMware NSX
Cause
This issue is caused due to a extra decimal point in the configuration file. This converts the number to a float, which the code does not accept.
Resolution
In VMware NSX-T 3.1.1 the issue with top-mem.log and top-cpu.log is resolved. However the issue with integrity_checker.log is resolved in VMware NSX-T 3.1.2 and VMware NSX-T 3.2.
Workaround:
Log in as root on the impacted NSX-T Manager or Edge node.
Change directory to: /etc/logrotate.d
Then copy the original file as a backup:
cp appliance-config /tmp/appliance-config.bak
To edit and replace with correct values, run the following command:
sed -i 's/12.8M/13M/g' appliance-config
sed -i 's/51.2M/52M/g' appliance-config
Remove 'su syslog adm' line from integrity_checker.log file rotate config section:
sed -i '/su syslog adm/d' appliance-config
There is no need to restart any services, as there is a cronjob which will read these values the next time it runs.