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

[LogAnalyzer] Ignore "sflowmgrd process is not running" warning in LogAnalyzer for master #2261

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tests/common/plugins/loganalyzer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ def loganalyzer(duthost, request):
logging.info("Load config and analyze log")
# Read existed common regular expressions located with legacy loganalyzer module
loganalyzer.load_common_config()
# sflowmgrd is configed in Monit, but not included in current master branch image
# So a workaround is added for master branch. Once the issue is adressed, we should
# rm this patch
if "master" in duthost.os_version:
Copy link
Collaborator

Choose a reason for hiding this comment

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

os_version contains 'master' is a very specific check that only works for images built by public Jenkins and/or no tag on the latest commit. not sure if we should keep it here or ignore the event in general until the fix is in?

Copy link
Contributor

Choose a reason for hiding this comment

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

What about adding a negative check?
if '201911' not in duthost.os_version:

Copy link
Collaborator Author

@bingwang-ms bingwang-ms Sep 24, 2020

Choose a reason for hiding this comment

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

os_version contains 'master' is a very specific check that only works for images built by public Jenkins and/or no tag on the latest commit. not sure if we should keep it here or ignore the event in general until the fix is in?

I add the check for master intendedly because I expect this patch only work for mater branch in a few days, as PR sonic-net/sonic-buildimage#5153 will address it. Will this issue exist in next 201911 build?

Copy link
Collaborator

Choose a reason for hiding this comment

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

If this ignore will only be needed for a few days, maybe it is better to update the common ignore file in jenkins just before running the tests?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh. That's quite a creative idea. I will apply this easy patch on Jenkins now. Thanks Xin.

log_to_ignore = [
r".*'sflowmgrd' process is not running"
]
loganalyzer.ignore_regex.extend(log_to_ignore)

yield loganalyzer
# Skip LogAnalyzer if case is skipped
Expand Down