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

Include error message from stderr if container-kill fails (#740) #741

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bjoky
Copy link

@bjoky bjoky commented Mar 5, 2025

What this PR does / why we need it:
Should the container-kill experiment fail with an error, the error message is not logged and it is not included included in the fault summary of the experiment run. This would happen if the command used to kill the container returns an exit code other than 0. It makes it hard to troubleshoot container-kill, if it isn't working as intended.

The problem is that text added to the error the description is taken from the stdout of the command rather than stderr.

To fix this I have used the common.RunCLICommand function to execute the command. This will use the output from stderr to be included the error message instead of stdout.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #740

Special notes for your reviewer:

Checklist:

  • Fixes Error when running container-kill is lost #740
  • PR messages has document related information
  • Labelled this PR & related issue with breaking-changes tag
  • PR messages has breaking changes related information
  • Labelled this PR & related issue with requires-upgrade tag
  • PR messages has upgrade related information
  • Commit has unit tests
  • Commit has integration tests
  • E2E run Required for the changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when running container-kill is lost
1 participant