Skip to content

ci/tests: add timeout to ansible e2e #2045

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

Merged
merged 3 commits into from
Oct 14, 2019

Conversation

theishshah
Copy link
Member

Description of the change:
Add 60s timeout when deleting CRD's on the Ansible e2e tests

Motivation for the change:
If the deletion fails, it can take up to 4 hours for CI to timeout itself

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 11, 2019
Copy link
Member

@joelanford joelanford left a comment

Choose a reason for hiding this comment

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

Do we know why these deletions are failing? We don't need to hold this PR up to answer that, but I feel like part of our CI problem is that we're putting band-aids on it here and there and sometimes ignoring or putting off looking into the root causes of the failures and flakes.

@@ -44,8 +44,8 @@ remove_operator() {
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/service_account.yaml"
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/role.yaml"
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/role_binding.yaml"
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/crds/ansible.example.com_memcacheds_crd.yaml"
kubectl delete --wait=true --ignore-not-found=true -f "$OPERATORDIR/deploy/crds/ansible.example.com_foos_crd.yaml"
timeout 60s bash -c -- "kubectl delete --wait=true --ignore-not-found=true -f \"$OPERATORDIR/deploy/crds/ansible.example.com_memcacheds_crd.yaml\""
Copy link
Member

Choose a reason for hiding this comment

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

I think for these, we can use kubectl's --timeout flag rather than wrapping the bash timeout command.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree, just used bash initially since that's what came to mind. Re: why these are failing, I need to take a deeper dive, just trying to shorten the time to wait to fail right now

Copy link
Member

@joelanford joelanford left a comment

Choose a reason for hiding this comment

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

Can you add a TODO comment above these lines that says something about how these delete commands can hang for hours, that we're adding --timeout as a (hopefully temporary) stopgap, and that we need to investigate more. And then create a ticket in our Jira backlog about doing that investigation.

LGTM once we have that stuff in place.

Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 13, 2019
@theishshah theishshah merged commit 888dde5 into operator-framework:master Oct 14, 2019
@theishshah theishshah deleted the ans-e2e-timeout branch October 14, 2019 15:56
fabianvf pushed a commit to fabianvf/operator-sdk that referenced this pull request Oct 14, 2019
* ci/tests: add timeout to ansible e2e

* use kubectl inbuilt timeout

* add TODO comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants