The /var/log/wtmp file in the VMware Cloud Director Appliance is not being rotated automatically.
VMware Cloud Director 10.4.x
VMware Cloud Director 10.5.x
VMware Cloud Director 10.6.x
Starting from logrotate 3.14.x, the log rotation configuration for /var/log/wtmp and /var/log/btmp was moved from /etc/logrotate.conf to individual files under the /etc/logrotate.d/ directory.
In th Photon OS packages used by the appliance, the default configuration files /etc/logrotate.d/wtmp and /etc/logrotate.d/btmp are missing.
To resolve this issue, manually create the missing logrotate configuration files.
tee /etc/logrotate.d/wtmp <<'EOF'
# no packages own wtmp -- we'll rotate it here
/var/log/wtmp {
missingok
monthly
create 0664 root utmp
minsize 1M
rotate 1
}
EOF
tee /etc/logrotate.d/btmp <<'EOF'
# no packages own btmp -- we'll rotate it here
/var/log/btmp {
missingok
monthly
create 0600 root utmp
rotate 1
}
EOF
chmod 644 /etc/logrotate.d/wtmp
chmod 644 /etc/logrotate.d/btmp