-
Notifications
You must be signed in to change notification settings - Fork 715
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
disk_check: Collect system data on failure #4546
Conversation
2) Added to kvm tests
1) Use skip_release from common 2) Wait until instead of blind sleep
…opped 2) If reboot command may fail, retry 3) Wait for ssh port to be started and give a time for stabilizing
2) In case of failure, collect more data
This pull request fixes 1 alert when merging 5c24fd6 into 0b702ba - view on LGTM.com fixed alerts:
|
This pull request introduces 1 alert and fixes 3 when merging e49eeb6 into d972c21 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request fixes 2 alerts when merging c546be7 into d972c21 - view on LGTM.com fixed alerts:
|
This pull request fixes 2 alerts when merging 32cda4e into 5197339 - view on LGTM.com fixed alerts:
|
This pull request fixes 2 alerts when merging 4893369 into 021206d - view on LGTM.com fixed alerts:
|
This pull request fixes 1 alert when merging affd630 into d7ac28b - view on LGTM.com fixed alerts:
|
def set_syslog_dest(duthost): | ||
syslog_dir = "/run/mount/logs/" | ||
res = duthost.shell("mkdir -p {}".format(syslog_dir)) | ||
assert res["rc"] == 0, "failed to create {}".format(syslog_dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assert is unnecessary because when rc is not 0, the duthost.shell call will raise an exception unless argument ignore_module_errors=True
is supplied.
duthost.copy(src=out_file, dest=duthost_fpath) | ||
|
||
res = duthost.shell("ls -l {}".format(duthost_fpath)) | ||
assert res["rc"] == 0, "failed to create {}".format(duthost_fpath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary rc
check.
assert res["rc"] == 0, "failed to create {}".format(duthost_fpath) | ||
|
||
res = duthost.shell("systemctl restart rsyslog") | ||
assert res["rc"] == 0, "failed to restart rsyslog" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary rc
check.
|
||
# remove the file. So no impact upon reboot | ||
res = duthost.shell("rm -f {}".format(duthost_fpath)) | ||
assert res["rc"] == 0, "failed to remove {}".format(duthost_fpath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary rc
check.
def test_ro_disk(localhost, duthosts, enum_rand_one_per_hwsku_hostname, creds_all_duts, check_tacacs): | ||
"""test tacacs rw user | ||
""" | ||
duthost = duthosts[enum_rand_one_per_hwsku_hostname] | ||
skip_release(duthost, ["201911", "201811"]) | ||
|
||
# Enable failthrough to allow admin access | ||
res = duthost.shell("config aaa authentication failthrough enable") | ||
assert res["rc"] == 0, "failed to enable failthrough" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary rc
check.
Description of PR
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
How did you do it?
How did you verify/test it?
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation