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

Adjust nginx lb timeout depending on the cluster size in tests #82696

Merged
merged 1 commit into from Sep 17, 2019

Conversation

mm4tt
Copy link
Contributor

@mm4tt mm4tt commented Sep 13, 2019

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation

/kind failing-test

/kind feature
/kind flake

What this PR does / why we need it:
It adjusts the nginx ingress LoadBalancer timeout depending on the cluster size.
In addition we'll now delete the Service and LoadBalancer before ending to test to avoid the case when deleting the namespace times out due to long LB deletion.

This is to fix the #82695

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Sep 13, 2019
@mm4tt
Copy link
Contributor Author

mm4tt commented Sep 13, 2019

/assign @wojtek-t

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework area/test sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 13, 2019
@@ -873,6 +874,18 @@ func (cont *NginxIngressController) Init() {
framework.Logf("ingress controller running in pod %v", cont.pod.Name)
}

// TODO(mm4tt): Clean this up once we figure out a proper timeout.
func getNginxLoadBalancerTimeout() time.Duration {
Copy link
Member

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.

Done.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 13, 2019
@mm4tt mm4tt changed the title Add ability to configure nginx lb timeout via env in nginx ingress test Adjust nginx lb timeout depending on the cluster size in tests Sep 13, 2019
@mm4tt mm4tt force-pushed the nginx_custom_lb_timeout branch 2 times, most recently from da64051 to 4f1b77e Compare September 13, 2019 12:27
svc.Spec.Type = v1.ServiceTypeLoadBalancer
svc.Spec.Selector = map[string]string{"k8s-app": "nginx-ingress-lb"}
svc.Spec.Ports = []v1.ServicePort{
{Name: "http", Port: 80},
{Name: "https", Port: 443},
{Name: "stats", Port: 18080}}
})
svc := serviceJig.WaitForLoadBalancerOrFail(cont.Ns, "nginx-ingress-lb", e2eservice.LoadBalancerCreateTimeoutDefault)
serviceJig.SanityCheckService(svc, v1.ServiceTypeLoadBalancer)
cont.lbTimeout = e2eservice.LoadBalancerCreateTimeoutDefault
Copy link
Member

Choose a reason for hiding this comment

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

There is already a method for this: GetServiceLoadBalancerCreationTimeout

Please use it (and then you can remove lbTimeout from the struct - it won't be needed).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, done.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 16, 2019
@mm4tt
Copy link
Contributor Author

mm4tt commented Sep 16, 2019

@wojtek-t, PTAL

}
ginkgo.By("Deleting ingress")
jig.TryDeleteIngress()
nginxController.TearDown()
Copy link
Member

Choose a reason for hiding this comment

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

Instead of introducing this else above, can we add "defer nginxController.TearDown" before this if?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

In addition delete the service & lb before ending to test to avoid the case
when deleting the namespace times out due to long LB deletion.

Ref.  kubernetes#82695
@mm4tt
Copy link
Contributor Author

mm4tt commented Sep 16, 2019

/test pull-kubernetes-integration

@mm4tt
Copy link
Contributor Author

mm4tt commented Sep 16, 2019

/test pull-kubernetes-kubemark-e2e-gce-big

@wojtek-t
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 16, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mm4tt, wojtek-t

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 16, 2019
@mm4tt
Copy link
Contributor Author

mm4tt commented Sep 16, 2019

/test pull-kubernetes-e2e-gce-100-performance

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

1 similar comment
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@k8s-ci-robot k8s-ci-robot merged commit 1d72455 into kubernetes:master Sep 17, 2019
@k8s-ci-robot k8s-ci-robot added this to the v1.17 milestone Sep 17, 2019
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. area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/testing Categorizes an issue or PR as relevant to SIG Testing. 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.

None yet

4 participants