You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rotated squid.log files have hostname coming from request #7922
CONFIG proxy.config.log.logging_enabled INT 3
CONFIG proxy.config.log.max_space_mb_for_logs INT 25000
CONFIG proxy.config.log.max_space_mb_headroom INT 1000
CONFIG proxy.config.log.rolling_enabled INT 1
CONFIG proxy.config.log.rolling_interval_sec INT 86400
CONFIG proxy.config.log.rolling_size_mb INT 10
CONFIG proxy.config.log.auto_delete_rolled_files INT 1
CONFIG proxy.config.log.periodic_tasks_interval INT 5
Which are correctly overridden in etc/trafficserver/logging.yaml
Thus, logrotate can be configured to rotate the logs and send a SIGUSR2 to the traffic_manager process which will then re-open its file descriptors. We (Yahoo!) are using logrotate and SIGUSR2 to handle log rotation.
I mention this in case it's helpful to plan ahead for when you move to 9.1.x. In the meantime I'll look into the issues you reported here.
I created a PR to address the issue where proxy.config.log.hostname is not respected when rotating the logs. That is indeed a bug and should be fixed with PR #7943.
In addition to proxy.config.log.hostname not being respected, you also mention that the default hostname used for the rotated logs changed from an IP address to the hostname of the machine between 8.x and 9.x. Is that an issue for you, or were you simply making an observation? That is, if #7943 is merged in and proxy.config.log.hostname is respected for the rotated logs, will that be a sufficient fix for you?
If I'll be able to use proxy.config.log.hostname then the default hostname change is not a problem for me anymore, just having #7943 is good enough, thanks.
Activity
bneradt commentedon Jun 15, 2021
Thank you for filing the issue. I'll look into this.
In case it's helpful, starting from 9.1.x, ATS supports external log rotation utilities (such as logrotate) via the SIGUSR2 signal:
https://docs.trafficserver.apache.org/en/9.1.x/appendices/command-line/traffic_manager.en.html?highlight=sigusr2#signals
Thus, logrotate can be configured to rotate the logs and send a SIGUSR2 to the traffic_manager process which will then re-open its file descriptors. We (Yahoo!) are using logrotate and SIGUSR2 to handle log rotation.
I mention this in case it's helpful to plan ahead for when you move to 9.1.x. In the meantime I'll look into the issues you reported here.
bneradt commentedon Jun 15, 2021
Hi @lukenowak,
I created a PR to address the issue where
proxy.config.log.hostnameis not respected when rotating the logs. That is indeed a bug and should be fixed with PR #7943.In addition to
proxy.config.log.hostnamenot being respected, you also mention that the default hostname used for the rotated logs changed from an IP address to the hostname of the machine between 8.x and 9.x. Is that an issue for you, or were you simply making an observation? That is, if #7943 is merged in andproxy.config.log.hostnameis respected for the rotated logs, will that be a sufficient fix for you?lukenowak commentedon Jun 16, 2021
If I'll be able to use
proxy.config.log.hostnamethen the default hostname change is not a problem for me anymore, just having #7943 is good enough, thanks.lukenowak commentedon Jun 16, 2021
That's excellent news, as soon as 9.1.x will be out I'll be happy to use it with logroration.