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

Bug 1770273: Verify all containers are dead in stop_all_containers() function #1262

Conversation

retroflexer
Copy link
Contributor

@retroflexer retroflexer commented Nov 12, 2019

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.

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 12, 2019
@retroflexer
Copy link
Contributor Author

cc @hexfusion

@retroflexer
Copy link
Contributor Author

/retest

1 similar comment
@retroflexer
Copy link
Contributor Author

/retest

Copy link
Contributor

@hexfusion hexfusion left a 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 retroflexer changed the title DR: Verify all containers are dead in stop_all_containers() function Bug 1770273: Verify all containers are dead in stop_all_containers() function Nov 13, 2019
@openshift-ci-robot openshift-ci-robot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Nov 13, 2019
@openshift-ci-robot
Copy link
Contributor

@retroflexer: This pull request references Bugzilla bug 1770273, which is invalid:

  • expected the bug to target the "4.3.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1770273: Verify all containers are dead in stop_all_containers() function

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 retroflexer changed the title Bug 1770273: Verify all containers are dead in stop_all_containers() function BZ 1770273: Verify all containers are dead in stop_all_containers() function Nov 13, 2019
@openshift-ci-robot openshift-ci-robot removed the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Nov 13, 2019
@openshift-ci-robot
Copy link
Contributor

@retroflexer: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

BZ 1770273: Verify all containers are dead in stop_all_containers() function

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 retroflexer changed the title BZ 1770273: Verify all containers are dead in stop_all_containers() function Bug 1770273: Verify all containers are dead in stop_all_containers() function Nov 13, 2019
@openshift-ci-robot openshift-ci-robot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Nov 13, 2019
@openshift-ci-robot
Copy link
Contributor

@retroflexer: This pull request references Bugzilla bug 1770273, which is invalid:

  • expected the bug to target the "4.3.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1770273: Verify all containers are dead in stop_all_containers() function

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
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@retroflexer: This pull request references Bugzilla bug 1770273, which is invalid:

  • expected the bug to target the "4.3.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/bugzilla refresh

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 retroflexer force-pushed the bz1770273-crictl-error-in-stop-all-containers branch from 7e517c1 to 5aa8590 Compare November 13, 2019 14:55
@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 13, 2019
@retroflexer
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@retroflexer: This pull request references Bugzilla bug 1770273, which is invalid:

  • expected the bug to target the "4.3.0" release, but it targets "4.4.0" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/bugzilla refresh

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 retroflexer force-pushed the bz1770273-crictl-error-in-stop-all-containers branch from 5aa8590 to 189b23e Compare November 13, 2019 19:16
@retroflexer
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@retroflexer: This pull request references Bugzilla bug 1770273, which is invalid:

  • expected the bug to target the "4.3.0" release, but it targets "4.4.0" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/bugzilla refresh

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
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@retroflexer: This pull request references Bugzilla bug 1770273, which is invalid:

  • expected the bug to target the "4.3.0" release, but it targets "4.4.0" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/bugzilla refresh

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
Copy link
Contributor Author

/test e2e-aws-scaleup-rhel7

@runcom
Copy link
Member

runcom commented Nov 15, 2019

/approve

@hexfusion can you take a last look on this?

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 15, 2019
@sinnykumari
Copy link
Contributor

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@sinnykumari: This pull request references Bugzilla bug 1770273, which is invalid:

  • expected the bug to target the "4.3.0" release, but it targets "4.2.z" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/bugzilla refresh

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.

@sinnykumari
Copy link
Contributor

To merge this PR in master we need a valid BZ against 4.3, right now RHBZ#1770273 is targeted to 4.2.z

@openshift-ci-robot
Copy link
Contributor

@retroflexer: This pull request references Bugzilla bug 1770273, which is invalid:

  • expected the bug to target the "4.3.0" release, but it targets "4.2.z" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1770273: Verify all containers are dead in stop_all_containers() function

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 retroflexer changed the title Bug 1770273: Verify all containers are dead in stop_all_containers() function Bug 1772097: Verify all containers are dead in stop_all_containers() function Nov 19, 2019
@openshift-ci-robot
Copy link
Contributor

@retroflexer: This pull request references Bugzilla bug 1772097, which is invalid:

  • expected dependent Bugzilla bug 1770273 to be in one of the following states: VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), but it is NEW instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1772097: Verify all containers are dead in stop_all_containers() function

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
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@retroflexer: This pull request references Bugzilla bug 1772097, which is invalid:

  • expected dependent Bugzilla bug 1770273 to be in one of the following states: VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), but it is NEW instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/bugzilla refresh

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 retroflexer changed the title Bug 1772097: Verify all containers are dead in stop_all_containers() function Bug 1770273: Verify all containers are dead in stop_all_containers() function Nov 19, 2019
@openshift-ci-robot
Copy link
Contributor

@retroflexer: This pull request references Bugzilla bug 1770273, which is invalid:

  • expected the bug to target the "4.3.0" release, but it targets "4.2.z" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1770273: Verify all containers are dead in stop_all_containers() function

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
@openshift-ci-robot
Copy link
Contributor

@retroflexer: This pull request references Bugzilla bug 1770273, which is invalid:

  • expected the bug to target the "4.3.0" release, but it targets "4.2.z" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1770273: Verify all containers are dead in stop_all_containers() function

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.

Copy link
Contributor

@hexfusion hexfusion left a 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)"
Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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).

@hexfusion
Copy link
Contributor

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@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:

/bugzilla refresh

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.

@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Nov 20, 2019
@retroflexer retroflexer force-pushed the bz1770273-crictl-error-in-stop-all-containers branch from 189b23e to 35db287 Compare November 20, 2019 01:42
sleep 5
conids=$(crictl ps -q)
done
echo "All containers are stopped."
Copy link
Contributor Author

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.

@hexfusion
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 20, 2019
@openshift-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 2e560b2 into openshift:master Nov 20, 2019
@openshift-ci-robot
Copy link
Contributor

@retroflexer: All pull requests linked via external trackers have merged. Bugzilla bug 1770273 has been moved to the MODIFIED state.

In response to this:

Bug 1770273: Verify all containers are dead in stop_all_containers() function

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.

deads2k added a commit to deads2k/machine-config-operator that referenced this pull request Dec 13, 2019
…3-crictl-error-in-stop-all-containers"

This reverts commit 2e560b2, reversing
changes made to 5795bb4.
@retroflexer retroflexer deleted the bz1770273-crictl-error-in-stop-all-containers branch January 31, 2020 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants