-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 1703885: test/extended/router: Fix curl timeout, log dumping, template parameters, and router readiness probes #23614
Bug 1703885: test/extended/router: Fix curl timeout, log dumping, template parameters, and router readiness probes #23614
Conversation
Fix waitForRouteToRespond, waitForRouterOKResponseExec, and expectRouteStatusCodeRepeatedExec to honor their timeout parameter values and to specify a timeout for each curl invocation. Before this change, each function used its timeout parameter value as the number of times to retry the curl command and did not specify a timeout value to that command. As a result, each command invocation could keep trying indefinitely, and the function could keep retrying the command for far longer than the timeout period that the caller indicated. Follow-up to commit 6593d0c and commit 9ddee4f. * test/extended/router/config_manager.go (waitForRouteToRespond): * test/extended/router/scoped.go (waitForRouterOKResponseExec) (expectRouteStatusCodeRepeatedExec): Keep retrying until the amount of time that is indicated by the timeout value has elapsed. Specify a timeout value of 5 seconds to curl using the "-m" option.
Fix the prefix for the pod name used in the unprivileged router test so that the pod's logs will be dumped on test failures. Follow-up to commit 409ac8b. * test/extended/router/unprivileged.go: Call DumpPodLogsStartingWith with the "router-" prefix instead of the "unprivileged-router" prefix.
Delete the SCOPE template parameter in the various router template fixtures, and add ROUTER_NAME (default value "test-scoped") and UPDATE_STATUS (default value "true") parameters to the router-scoped.yaml template fixture. Most tests were not using the SCOPE parameter, and in the one test that did, its use evoked the following warning from oc new-app: warning: --param no longer accepts comma-separated lists of values. * test/extended/router/unprivileged.go: * test/extended/testdata/router/router-scoped.yaml: Replace the SCOPE template parameter with ROUTER_NAME and UPDATE_STATUS parameters. * test/extended/testdata/router/router-override-domains.yaml: * test/extended/testdata/router/router-override.yaml: Delete the SCOPE parameter. * test/extended/testdata/bindata.go: Regenerate.
Fix the router template test fixtures that use the router's /healthz/ready endpoint for their readiness probes to enable HAProxy metrics, which are required for the endpoint to return OK. Without HAProxy metrics enabled, the router pods that tests created using these fixtures never became ready. Follow-up to commit b343fb7. * test/extended/testdata/router/router-override-domains.yaml: * test/extended/testdata/router/router-override.yaml: * test/extended/testdata/router/router-scoped.yaml: Enable HAProxy metrics. * test/extended/testdata/bindata.go: Regenerate.
@Miciah: This pull request references a valid Bugzilla bug. 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. |
/test e2e-cmd |
/approve Thanks, this looks helpful |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ironcladlou, Miciah 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 |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
I'm hoping #23622 will fix one of the test failures. |
@Miciah: All pull requests linked via external trackers have merged. The Bugzilla bug 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. |
@Miciah: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. |
/cherrypick release-4.1 |
@Miciah: #23614 failed to apply on top of branch "release-4.1":
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. |
Since it doesn't apply cleanly and since 4.1 EOL is approaching, it would be nice to understand 4.1's CI status going forward to help decide whether this is worth manually backporting... |
test/extended/router
: Fix curl timeout logicFix
waitForRouteToRespond
,waitForRouterOKResponseExec
, andexpectRouteStatusCodeRepeatedExec
to honor their timeout parameter values and to specify a timeout for each curl invocation.Before this change, each function used its timeout parameter value as the number of times to retry the curl command and did not specify a timeout value to that command. As a result, each command invocation could keep trying indefinitely, and the function could keep retrying the command for far longer than the timeout period that the caller indicated.
Follow-up to #12346 and #19073.
test/extended/router/config_manager.go
(waitForRouteToRespond
):test/extended/router/scoped.go
(waitForRouterOKResponseExec
)(
expectRouteStatusCodeRepeatedExec
): Keep retrying until the amount of time that is indicated by the timeout value has elapsed. Specify a timeout value of 5 seconds to curl using the-m
option.test/extended/router/unprivileged
: Fix log dumpFix the prefix for the pod name used in the unprivileged router test so that the pod's logs will be dumped on test failures.
Follow-up to #21557.
test/extended/router/unprivileged.go
: CallDumpPodLogsStartingWith
with the "router-" prefix instead of the "unprivileged-router" prefix.test/extended/router
: DeleteSCOPE
template paramDelete the
SCOPE
template parameter in the various router template fixtures, and addROUTER_NAME
(default value "test-scoped") andUPDATE_STATUS
(default value "true") parameters to therouter-scoped.yaml
template fixture.Most tests were not using the
SCOPE
parameter, and in the one test that did, its use evoked the following warning fromoc new-app
:test/extended/router/unprivileged.go
:test/extended/testdata/router/router-scoped.yaml
: Replace theSCOPE
template parameter withROUTER_NAME
andUPDATE_STATUS
parameters.test/extended/testdata/router/router-override-domains.yaml
:test/extended/testdata/router/router-override.yaml
: Delete theSCOPE
parameter.test/extended/testdata/bindata.go
: Regenerate.test/extended/router
: Enable metrics, fix readinessFix the router template test fixtures that use the router's
/healthz/ready
endpoint for their readiness probes to enable HAProxy metrics, which are required for the endpoint to return OK.Without HAProxy metrics enabled, the router pods that tests created using these fixtures never became ready.
Follow-up to #21592.
test/extended/testdata/router/router-override-domains.yaml
:test/extended/testdata/router/router-override.yaml
:test/extended/testdata/router/router-scoped.yaml
: Enable HAProxy metrics.test/extended/testdata/bindata.go
: Regenerate.