Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[test_fdb_mac_move] Only output error level message into syslog if /v…
…ar/log size limitation (sonic-net#12467) What is the motivation for this PR? Exception: start-LogAnalyzer-test_fdb_mac_move.2024-02-25-07:03:31 was not found in /var/log Sometimes, the case failed because the log analyzer cannot locate the log. The log analyzer records the timestamp at the beginning of the case and analyzes the syslogs to check any error message generated during the case process. However, some devices with a small disk, have a limitation for the /var/log size. So during the log rotation, the previous syslog would be deleted, leading to the log analyzer failed to locate the log and return error. How did you do it? In this case, the swss logs consume a large space of /var/log. However, the output messages are expected and necessary for debugging in production. and log flooding is typically not a common occurrence in production. To fix this issue during the case, we need to modify the swss logs's location, but it needs image change. Therefore the fix introduced in this PR's is a workaround, it check the /var/log available size before test, if no enough space, modify the rsyslog config to only output error messages during the case. How did you verify/test it? Run the case.
- Loading branch information