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

[route_check]Add an option for route_check to control whether log is writen to syslog #1215

Merged
merged 1 commit into from
Nov 4, 2020

Conversation

bingwang-ms
Copy link
Contributor

@bingwang-ms bingwang-ms commented Nov 4, 2020

Fix sonic-net/sonic-buildimage#5804
- What I did
By default, route_check.py will report an ERROR in syslog if route mismatch is detected, which is out of the control of monit config file and cause LogAnalyzer to report test error. This commit add an option (-s) to control this behavior. And log is not writen to syslog in default.

- How I did it
Add an option (-s) for route_checker.py.

- How to verify it
The update is verified on Arista-7260.

  1. Add a static route whose nexthop is not reachable.
ip route add 1.1.1.1 via 192.168.1.101
  1. Run route_check.py, and error msg is only printed on stdout. Nothing is writen to syslog
  2. Run route_check.py -s. and error msg is writen to both stdout and syslog
  3. Wait for 15 minutes, and confirm that monit will report the error
Nov  4 09:30:36.917367 str-7260cx3-acs-2 ERR monit[631]: 'routeCheck' status failed (255) -- results: { {#012    "missed_ROUTE_TABLE_routes": [#012        "1.1.1.1/32"#012    ]#012} }#012 Failed. Look at reported mismatches above

- Previous command output (if the output of a command-line utility has changed)
Output is not changed.

- New command output (if the output of a command-line utility has changed)
Output is not changed.

route_check.py will report an ERROR in syslog if route mismatch is
found, which is out control of monit config file. This commit add an
option (-s) to control whether error will be reported in syslog.

Signed-off-by: bingwang <bingwang@microsoft.com>
Copy link
Contributor

@renukamanavalan renukamanavalan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@lguohan lguohan merged commit acfa824 into sonic-net:master Nov 4, 2020
@bingwang-ms bingwang-ms deleted the update_check_route branch November 5, 2020 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[route_check] route_check is still reporting transient route mismatch
3 participants