-
Notifications
You must be signed in to change notification settings - Fork 404
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
Bug 1770273: Verify all containers are dead in stop_all_containers() function #1262
Bug 1770273: Verify all containers are dead in stop_all_containers() function #1262
Conversation
cc @hexfusion |
/retest |
1 similar comment
/retest |
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.
@retroflexer thanks for the PR. If the ID does not exist we still fail.
#!/bin/bash
set -o errexit
set -o pipefail
# non existant id
conids=12
while [ ! -z "$conids" ]; do
crictl stop $conids
done
/tmp/test.sh ; echo "exit $?"
FATA[0000] Stopping the container "12" failed: rpc error: code = Unknown desc = container with ID starting with 12 not found: ID does not exist
exit 1
We should handle failure and retry.
@retroflexer: This pull request references Bugzilla bug 1770273, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@retroflexer: No Bugzilla bug is referenced in the title of this pull request. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@retroflexer: This pull request references Bugzilla bug 1770273, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/bugzilla refresh |
@retroflexer: This pull request references Bugzilla bug 1770273, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
7e517c1
to
5aa8590
Compare
/bugzilla refresh |
@retroflexer: This pull request references Bugzilla bug 1770273, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
5aa8590
to
189b23e
Compare
/bugzilla refresh |
@retroflexer: This pull request references Bugzilla bug 1770273, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/bugzilla refresh |
@retroflexer: This pull request references Bugzilla bug 1770273, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test e2e-aws-scaleup-rhel7 |
/approve @hexfusion can you take a last look on this? |
/bugzilla refresh |
@sinnykumari: This pull request references Bugzilla bug 1770273, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
To merge this PR in master we need a valid BZ against 4.3, right now RHBZ#1770273 is targeted to 4.2.z |
@retroflexer: This pull request references Bugzilla bug 1770273, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@retroflexer: This pull request references Bugzilla bug 1772097, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/bugzilla refresh |
@retroflexer: This pull request references Bugzilla bug 1772097, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@retroflexer: This pull request references Bugzilla bug 1770273, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
1 similar comment
@retroflexer: This pull request references Bugzilla bug 1770273, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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.
looks good, just one comment.
exit 1 | ||
fi | ||
crictl stop $conids || true | ||
echo "Waiting for all containers to stop... ($iterations/60)" |
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.
Optional nit/question would this be more informative to folks at the start of the loop?
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.
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.
OK. I will get rid of lineno. 333.
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.
I removed 333, and added 346 (just so that if we don't even get into the while loop, we will have a message).
/bugzilla refresh |
@hexfusion: This pull request references Bugzilla bug 1770273, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
189b23e
to
35db287
Compare
sleep 5 | ||
conids=$(crictl ps -q) | ||
done | ||
echo "All containers are stopped." |
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.
Added a message at the end, so that we provide information to the user even if we don't get into the while loop.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hexfusion, retroflexer, runcom The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@retroflexer: All pull requests linked via external trackers have merged. Bugzilla bug 1770273 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Verify all containers are dead in stop_all_containers() function.
Fixes: #1770273
- What I did
Added a while loop to validate that all containers have stopped.
- How to verify it
While running the DR function of restore.sh, verify that stop_all_containers function does indeed stop all containers.
- Description for the changelog
Verify all containers are stopped in stop_all_containers() function.