Skip to content

[action] [PR:3071] route_check.py should not print too many outputs to stdout (#3071)#3092

Merged
mssonicbld merged 1 commit intosonic-net:202305from
mssonicbld:cherry/202305/3071
Dec 20, 2023
Merged

[action] [PR:3071] route_check.py should not print too many outputs to stdout (#3071)#3092
mssonicbld merged 1 commit intosonic-net:202305from
mssonicbld:cherry/202305/3071

Conversation

@mssonicbld
Copy link
Copy Markdown
Collaborator

Otherwise it fills up the pipe and print() will block. When this happens, route_check.py will timeout and eventually killed by monit after several minutes.

What I did

Add an option in print_message() to skip printing.

How I did it

Add an option write_to_stdout=True, in mitigate_installed_not_offloaded_frr_routes() call print_message() with write_to_stdout=False.

How to verify it

Manually run route_check.py, verify that the messages were shown in syslog but not in stdout.

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

…#3071)

Otherwise it fills up the pipe and print() will block. When this happens, `route_check.py` will timeout and eventually killed by `monit` after several minutes.

#### What I did
Add an option in `print_message()` to skip printing.

#### How I did it
Add an option `write_to_stdout=True`, in `mitigate_installed_not_offloaded_frr_routes()` call `print_message()` with `write_to_stdout=False`.

#### How to verify it
Manually run route_check.py, verify that the messages were shown in syslog but not in stdout.

#### Previous command output (if the output of a command-line utility has changed)

#### New command output (if the output of a command-line utility has changed)
@mssonicbld
Copy link
Copy Markdown
Collaborator Author

Original PR: #3071

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants