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

[advanced-reboot] Improve error reporting in ansible log #903

Merged
merged 2 commits into from
May 9, 2019

Conversation

stepanblyschak
Copy link
Contributor

Description of PR

Summary: [advanced-reboot] Improve error reporting in ansible log
Fixes # (issue)

Type of change

  • Bug fix
  • [] Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

How did you do it?

Log error not only in ptf log file but also to ansible log.
Also fix a bug with threading even initialization and reachability watcher thread start order

How did you verify/test it?

From the ansible log there is only "Something went wrong message", now it is more verbose and outputs specific failure reason:
e.g.:

ok: [mts-sonic-dut-t0] => {
    "out.stdout_lines": [
        "WARNING: No route found for IPv6 destination :: (no default route?)",
        "advanced-reboot.ReloadTest ... FAIL",
        "",
        "======================================================================",
        "FAIL: advanced-reboot.ReloadTest",
        "----------------------------------------------------------------------",
        "Traceback (most recent call last):",
        "  File \"ptftests/advanced-reboot.py\", line 720, in runTest",
        "    self.assertTrue(is_good, errors)",
        "AssertionError: ",
        "",
        "Something went wrong. Please check output below:",
        "",
        "FAILED:dut:Control plane didn't come up within warm up timeout",
        "FAILED:dut:DUT is not ready for test",
        "",
        "",
        "----------------------------------------------------------------------",
        "Ran 1 test in 240.056s",
        "",
        "FAILED (failures=1)"
    ]
}
ok: [mts-sonic-dut-t0] => {
    "out.stdout_lines": [
        "WARNING: No route found for IPv6 destination :: (no default route?)",
        "advanced-reboot.ReloadTest ... FAIL",
        "",
        "======================================================================",
        "FAIL: advanced-reboot.ReloadTest",
        "----------------------------------------------------------------------",
        "Traceback (most recent call last):",
        "  File \"ptftests/advanced-reboot.py\", line 720, in runTest",
        "    self.assertTrue(is_good, errors)",
        "AssertionError: ",
        "",
        "Something went wrong. Please check output below:",
        "",
        "FAILED:dut:DUT hasn't shutdown in 300 seconds",
        "",
        "",
        "----------------------------------------------------------------------",
        "Ran 1 test in 382.915s",
        "",
        "FAILED (failures=1)"
    ]

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

Stepan Blyschak added 2 commits May 6, 2019 06:09
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
@yxieca yxieca merged commit 19299ff into sonic-net:master May 9, 2019
yxieca pushed a commit that referenced this pull request May 14, 2019
* [advanced-reboot] start watcher thread after initializing Event objects

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>

* [advanced-reboot] improve error messages when DUT is not ready for test

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
stepanblyschak added a commit to stepanblyschak/sonic-mgmt that referenced this pull request Jun 14, 2019
* [advanced-reboot] start watcher thread after initializing Event objects

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>

* [advanced-reboot] improve error messages when DUT is not ready for test

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
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.

3 participants