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 2103283: Add timeout to oc cp command to fix must-gather delays when routers are terminating #317

Merged
merged 1 commit into from Jul 6, 2022

Conversation

gcs278
Copy link
Contributor

@gcs278 gcs278 commented Jul 6, 2022

This fixes a bug where if router pods are stuck in terminating when doing a must-gather, the must-gather will timeout instead of waiting for the router pods to terminate. More specifically, we have a bug in 4.10 CI in which the e2e-aws-operator job consistently fails on e2e-aws-operator-gather-must-gather container test due to pods stuck in the terminating state.

Two reasons why this happens in CI:

  1. If the oc cp command is ran on terminating pods, it will hang until the pod is deleted.
  2. Router pods ignore SIGTERMs sent immediately after starting up and will get "stuck" in terminating state until the terminationGracePeriodSeconds sends a SIGKILL. This results in a number of old router pods just hanging out in the terminating state. Backport is pending for 4.10 https://bugzilla.redhat.com/show_bug.cgi?id=2098230.

Either way, seems like we should have a reasonable timeout on the oc cp command to protect against situations like this.

@openshift-ci openshift-ci bot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Jul 6, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 6, 2022

@gcs278: This pull request references Bugzilla bug 2103283, which is invalid:

  • expected the bug to target the "4.12.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 2103283: Add timeout to oc cp command to fix must-gather delays when routers are terminating

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.

@Miciah
Copy link

Miciah commented Jul 6, 2022

/lgtm
/bugzilla refresh

@openshift-ci openshift-ci bot 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 Jul 6, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 6, 2022

@Miciah: This pull request references Bugzilla bug 2103283, 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.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.12.0) matches configured target release for branch (4.12.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @ShudiLi

In response to this:

/lgtm
/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 openshift-ci bot requested a review from ShudiLi July 6, 2022 21:29
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 6, 2022
@@ -11,7 +11,7 @@ function gather_haproxy_config {
for IC in ${INGRESS_CONTROLLERS}; do
PODS=$(oc get pods -n openshift-ingress --no-headers -o custom-columns=":metadata.name" --selector ingresscontroller.operator.openshift.io/deployment-ingresscontroller="${IC}")
for POD in ${PODS}; do
oc cp openshift-ingress/"${POD}":/var/lib/haproxy/conf/haproxy.config "${HAPROXY_CONFIG_PATH}"/"${IC}"/"${POD}"/haproxy.config &
timeout -v 3m oc cp openshift-ingress/"${POD}":/var/lib/haproxy/conf/haproxy.config "${HAPROXY_CONFIG_PATH}"/"${IC}"/"${POD}"/haproxy.config &
Copy link
Contributor

Choose a reason for hiding this comment

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

Is a 3 min timeout really how long we want to wait with this?
This copy operation should be seconds; IE 10x (seconds) is likely a 1-1.5 m wait time (can we half this)?

Copy link
Contributor

Choose a reason for hiding this comment

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

@sferich888
Copy link
Contributor

What is terminationGracePeriodSeconds set to for router pods? Is it something in the order of minutes?

@sferich888
Copy link
Contributor

What is terminationGracePeriodSeconds set to for router pods? Is it something in the order of minutes?

terminationGracePeriodSeconds as specified in the router deployment, which is 1 hour.
xref: https://bugzilla.redhat.com/show_bug.cgi?id=2098230

@sferich888
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 6, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 6, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gcs278, Miciah, sferich888

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

openshift-ci bot commented Jul 6, 2022

@gcs278: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-ci openshift-ci bot merged commit 634f105 into openshift:master Jul 6, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 6, 2022

@gcs278: All pull requests linked via external trackers have merged:

Bugzilla bug 2103283 has been moved to the MODIFIED state.

In response to this:

Bug 2103283: Add timeout to oc cp command to fix must-gather delays when routers are terminating

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.

@gcs278
Copy link
Contributor Author

gcs278 commented Jul 6, 2022

/cherry-pick 4.11

@openshift-cherrypick-robot

@gcs278: cannot checkout 4.11: error checking out 4.11: exit status 1. output: error: pathspec '4.11' did not match any file(s) known to git

In response to this:

/cherry-pick 4.11

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.

@gcs278
Copy link
Contributor Author

gcs278 commented Jul 6, 2022

/cherry-pick release-4.11

@openshift-cherrypick-robot

@gcs278: new pull request created: #318

In response to this:

/cherry-pick release-4.11

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.

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/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants