Skip to content

Commit

Permalink
improvement(stress): Report two lines of the error, instead of only 1…
Browse files Browse the repository at this point in the history
…00 characters

Fixes #8291
  • Loading branch information
pehala authored and soyacz committed Aug 26, 2024
1 parent 2c9561f commit 8ee79b6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdcm/stress/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,5 +151,7 @@ def format_stress_cmd_error(exc: Exception) -> str:
"""Format nicely the exception from a stress command failure."""

if hasattr(exc, "result") and exc.result.failed:
return f"Stress command completed with bad status {exc.result.exited}: {exc.result.stderr:.100}"
# Report only first two lines
message = "\n".join(exc.result.stderr.splitlines()[:2])
return f"Stress command completed with bad status {exc.result.exited}: {message}"
return f"Stress command execution failed with: {exc}"

0 comments on commit 8ee79b6

Please sign in to comment.