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

distribute services between 2 namespaces in e2e DNS scale services test #65599

Merged
merged 1 commit into from
Jul 2, 2018

Conversation

chrisohaver
Copy link
Contributor

@chrisohaver chrisohaver commented Jun 28, 2018

What this PR does / why we need it:

What: Alters the dns scale test, to distribute the scale load of 10K services between 2 namespaces, so that the test does not fail to create the services.
Why: To allow the dns test to proceed.

Expect to Fix #64774 but wont know until it's actually run in e2e tests, so not marking that issue to auto-close on merge. FWIW, it does pass in local tests using hack/local-up-cluster.sh.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):

Special notes for your reviewer:

Release note:

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 28, 2018
@chrisohaver
Copy link
Contributor Author

Copy link

@fturib fturib left a comment

Choose a reason for hiding this comment

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

LGTM

@rajansandeep
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 28, 2018
@rajansandeep
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 28, 2018
@idealhack
Copy link
Member

/test pull-kubernetes-e2e-gce

ns1, _ := f.CreateNamespace(f.BaseName, nil)
ns2, _ := f.CreateNamespace(f.BaseName, nil)

services := generateServicesInNamespaces([]string{ns1.Name, ns2.Name}, maxServicesPerCluster/2)
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 just introducing this maginc constant "2", can you please introduce a constant:
"maxServicesPerNamespace" (for now set it to 5000)

and then:

  • create necessary number of namesapces (maxServicesPerCluster + maxServicesPerNamespace - 1 / maxServicesPerNamespace)
  • in each of namespaces create necessary number of services?

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 29, 2018
@idealhack
Copy link
Member

/test pull-kubernetes-bazel-test
/test pull-kubernetes-e2e-gce

Copy link
Member

@wojtek-t wojtek-t left a comment

Choose a reason for hiding this comment

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

One nit - other than that LGTM.

@@ -50,10 +51,22 @@ var _ = SIGDescribe("[Feature:PerformanceDNS]", func() {

// answers dns for service - creates the maximum number of services, and then check dns record for one
It("Should answer DNS query for maximum number of services per cluster", func() {
services := generateServicesInNamespace(f.Namespace.Name, maxServicesPerCluster)

numNs := maxServicesPerCluster / maxServicesPerNamespace
Copy link
Member

Choose a reason for hiding this comment

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

Why not

numNs := (maxServicesPerCluster + maxServicesPerNamespace - 1) / maxServicesPerNamespace

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you help me understand the reasoning/logic behind your formula?

Common sense would say ...
( 10000 + 5000 + 1 ) / 5000 = 3.0002

But AFAIU, in Go this is instead "3", since it's an integer division, not a float division.

Why split between 3 namespaces? If we can fit them in 2...
And why the +1? To protect against float representation of 3 of 2.9999... ? I don't think thats necessary, since AFAIU the evaluation is all integer.

Copy link
Member

@wojtek-t wojtek-t Jul 2, 2018

Choose a reason for hiding this comment

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

Not +1, but -1.
Then you get:
(10000 + 5000 - 1) / 5000 = 2.99.. which will be 2 [updated].

(A+B-1)/B is integer ceiling of A/B

@chrisohaver
Copy link
Contributor Author

/test pull-kubernetes-e2e-gce

@@ -50,10 +51,21 @@ var _ = SIGDescribe("[Feature:PerformanceDNS]", func() {

// answers dns for service - creates the maximum number of services, and then check dns record for one
It("Should answer DNS query for maximum number of services per cluster", func() {
services := generateServicesInNamespace(f.Namespace.Name, maxServicesPerCluster)

Copy link
Member

Choose a reason for hiding this comment

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

nit - remove this empty line

}

services := generateServicesInNamespaces(namespaces, maxServicesPerCluster)

Copy link
Member

Choose a reason for hiding this comment

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

nit: this one too

@chrisohaver
Copy link
Contributor Author

/retest

@chrisohaver
Copy link
Contributor Author

/test pull-kubernetes-e2e-gce

@wojtek-t
Copy link
Member

wojtek-t commented Jul 2, 2018

/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 Jul 2, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrisohaver, rajansandeep, 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 Jul 2, 2018
@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 comment for consistent failures.

@chrisohaver
Copy link
Contributor Author

/test pull-kubernetes-e2e-gce

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 65348, 65599, 65635, 65688, 65691). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 5fa5b7d into kubernetes:master Jul 2, 2018
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New e2e testsuites for DNS scale fail to setup the cluster
8 participants