Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traffic Monitor truncates log file when restarted #5604

Closed
rawlinp opened this issue Mar 4, 2021 · 0 comments · Fixed by #5655
Closed

Traffic Monitor truncates log file when restarted #5604

rawlinp opened this issue Mar 4, 2021 · 0 comments · Fixed by #5655
Labels
bug something isn't working as intended Traffic Monitor related to Traffic Monitor
Milestone

Comments

@rawlinp
Copy link
Contributor

rawlinp commented Mar 4, 2021

I'm submitting a ...

  • bug report

Traffic Control components affected ...

  • Traffic Monitor

Current behavior:

TM truncates its log file upon startup:

[root@foo log]# ll traffic_monitor.log
-rw-r--r-- 1 root root 3107262 Mar  4 09:11 traffic_monitor.log
[root@foo log]# systemctl stop traffic_monitor
[root@foo log]# ll traffic_monitor.log
-rw-r--r-- 1 root root 3107262 Mar  4 17:02 traffic_monitor.log
[root@foo log]# systemctl start traffic_monitor
[root@foo log]# ll traffic_monitor.log
-rw-r--r-- 1 root root 704 Mar  4 17:02 traffic_monitor.log

Observed on 5.0.0 with the following logging config in traffic_monitor.cfg:

        "log_location_event": "/opt/traffic_monitor/var/log/event.log",
        "log_location_error": "/opt/traffic_monitor/var/log/traffic_monitor.log",
        "log_location_warning": "/opt/traffic_monitor/var/log/traffic_monitor.log",
        "log_location_info": "null",
        "log_location_debug": "null",

Expected behavior:

Traffic Monitor should not truncate its config upon startup. Instead, it should append to the existing log file.

Minimal reproduction of the problem with instructions:

Restart Traffic Monitor with the above configuration.

@rawlinp rawlinp added bug something isn't working as intended Traffic Monitor related to Traffic Monitor labels Mar 4, 2021
@rawlinp rawlinp added this to the 5.1.1 milestone Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working as intended Traffic Monitor related to Traffic Monitor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant