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

Add quotas to density and load tests #59917

Merged
merged 1 commit into from Feb 16, 2018
Merged

Conversation

gmarek
Copy link
Contributor

@gmarek gmarek commented Feb 15, 2018

@kubernetes/sig-scalability-misc

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. sig/scalability Categorizes an issue or PR as relevant to SIG Scalability. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 15, 2018
if err := wait.PollImmediate(2*time.Second, 30*time.Second, func() (bool, error) {
var err error
quotaTemplate.Name = ns.Name + "-quota"
got, err = f.ClientSet.CoreV1().ResourceQuotas(ns.Name).Create(quotaTemplate)
Copy link
Member

Choose a reason for hiding this comment

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

_, err

Copy link
Member

Choose a reason for hiding this comment

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

Why do you need to capture the resourcequota?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right. I don't need it anymore.

quotaTemplate.Name = ns.Name + "-quota"
got, err = f.ClientSet.CoreV1().ResourceQuotas(ns.Name).Create(quotaTemplate)
if err != nil {
framework.Logf("Unexpected error while creating resource quota: %v", err)
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 you shouldn't be retrying failures unconditionally for the CREATE request. There are some non-retriable errors (i.e AlreadyExists).

Some earlier discussion about this -
#55860 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a check for AlreadyExists.

for _, ns := range namespaces {
var got *v1.ResourceQuota
if err := wait.PollImmediate(2*time.Second, 30*time.Second, func() (bool, error) {
var err error
Copy link
Member

Choose a reason for hiding this comment

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

I guess you don't need to define here. You can just directly define it inside the 'if' command.

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.

@shyamjvs
Copy link
Member

I've left some comments. LGTM overall.

}
return true, nil
}); err != nil {
return err
Copy link
Member

Choose a reason for hiding this comment

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

fmt.Errorf("Failed to create quota: %v", err)?
Otherwise sth less informative like "timed out waiting for condition" will show up.

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.

@shyamjvs
Copy link
Member

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

Let's try (we now have higher quota, so we should be able to run it).

@shyamjvs
Copy link
Member

/lgtm
/hold

Thanks for change. Feel free to cancel the hold once the kubemark-500 presubmit passes.

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Feb 16, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gmarek, shyamjvs

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

@gmarek gmarek removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 16, 2018
@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit ada9400 into kubernetes:master Feb 16, 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. sig/scalability Categorizes an issue or PR as relevant to SIG Scalability. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants