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

Enable volume limit feature by default #69225

Merged
merged 2 commits into from Oct 3, 2018

Conversation

@gnufied
Member

gnufied commented Sep 28, 2018

Also add more tests for it.

Fixes #69224

/sig storage

cc @saad-ali @msau42

Enable AttachVolumeLimit feature
@msau42

This comment has been minimized.

Show comment
Hide comment
@msau42

msau42 Sep 28, 2018

Member

Can we also add an e2e test? I don't know if this is something that unit tests would have caught.

Member

msau42 commented Sep 28, 2018

Can we also add an e2e test? I don't know if this is something that unit tests would have caught.

existingNode: generateNode(
nil, /*nodeIDs*/
nil, /*labels*/
map[v1.ResourceName]resource.Quantity{

This comment has been minimized.

@verult

verult Sep 29, 2018

Contributor

Could you add a testcase for deletion against a node that previously doesn't contain attach limit info?

@verult

verult Sep 29, 2018

Contributor

Could you add a testcase for deletion against a node that previously doesn't contain attach limit info?

This comment has been minimized.

@gnufied

gnufied Oct 1, 2018

Member

Now that we run the test in all cases, I think this should be covered by that

@gnufied

gnufied Oct 1, 2018

Member

Now that we run the test in all cases, I think this should be covered by that

inputNodeID: "",
expectFail: true,
},
{

This comment has been minimized.

@verult

verult Sep 29, 2018

Contributor

Could you add a test case with pre-existing attach limit on the node?

@verult

verult Sep 29, 2018

Contributor

Could you add a test case with pre-existing attach limit on the node?

This comment has been minimized.

@gnufied

gnufied Oct 1, 2018

Member

done

@gnufied

gnufied Oct 1, 2018

Member

done

Show outdated Hide outdated pkg/volume/csi/nodeinfomanager/nodeinfomanager_test.go
@neolit123

This comment has been minimized.

Show comment
Hide comment
@neolit123

neolit123 Sep 30, 2018

Member

thanks for addressing!
/kind bug

Member

neolit123 commented Sep 30, 2018

thanks for addressing!
/kind bug

@k8s-ci-robot k8s-ci-robot added kind/bug and removed needs-kind labels Sep 30, 2018

@gnufied

This comment has been minimized.

Show comment
Hide comment
@gnufied

gnufied Oct 1, 2018

Member

@msau42 @verult fixed. Also added a small e2e to make sure node has limits. PTAL

Member

gnufied commented Oct 1, 2018

@msau42 @verult fixed. Also added a small e2e to make sure node has limits. PTAL

Show outdated Hide outdated test/e2e/storage/volume_limits.go
volumeLimits := getVolumeLimit(&node)
if len(volumeLimits) == 0 {
framework.Failf("Expected volume limits to be set")
}

This comment has been minimized.

@msau42

msau42 Oct 1, 2018

Member

can we also launch a pod that uses the entire volume limit? You could potentially reuse this test case and just set a different numVolumes: https://sourcegraph.com/github.com/kubernetes/kubernetes/-/blob/test/e2e/storage/persistent_volumes.go#L319

@msau42

msau42 Oct 1, 2018

Member

can we also launch a pod that uses the entire volume limit? You could potentially reuse this test case and just set a different numVolumes: https://sourcegraph.com/github.com/kubernetes/kubernetes/-/blob/test/e2e/storage/persistent_volumes.go#L319

This comment has been minimized.

@gnufied

gnufied Oct 1, 2018

Member

We could but for gce - it appears that the limit on the selected node starts at 64. So, we will have to create a pod with 64+ volumes

@gnufied

gnufied Oct 1, 2018

Member

We could but for gce - it appears that the limit on the selected node starts at 64. So, we will have to create a pod with 64+ volumes

This comment has been minimized.

@msau42

msau42 Oct 1, 2018

Member

64 1gi volumes should be within our quota...

@msau42

msau42 Oct 1, 2018

Member

64 1gi volumes should be within our quota...

This comment has been minimized.

@gnufied

gnufied Oct 1, 2018

Member

okay, I think that will also make this test serial because no other workload(guess just with volumes but we don't have that level of granularity) can be scheduled on the node while this test runs on it. I can do that as a follow up PR while fixing #68912

@gnufied

gnufied Oct 1, 2018

Member

okay, I think that will also make this test serial because no other workload(guess just with volumes but we don't have that level of granularity) can be scheduled on the node while this test runs on it. I can do that as a follow up PR while fixing #68912

@bertinatto

This comment has been minimized.

Show comment
Hide comment
@bertinatto

bertinatto Oct 2, 2018

Member

/retest

Member

bertinatto commented Oct 2, 2018

/retest

@bertinatto

This comment has been minimized.

Show comment
Hide comment
@bertinatto

bertinatto Oct 2, 2018

Member

Just for the record, as I can't /lgtm:

I went through the code and it seems OK to me; and the unit test seems to have good coverage as well. +1 for another test case that extrapolates the volume limit.

Member

bertinatto commented Oct 2, 2018

Just for the record, as I can't /lgtm:

I went through the code and it seems OK to me; and the unit test seems to have good coverage as well. +1 for another test case that extrapolates the volume limit.

@msau42

This comment has been minimized.

Show comment
Hide comment
@msau42

msau42 Oct 2, 2018

Member

/lgtm

Member

msau42 commented Oct 2, 2018

/lgtm

@saad-ali

This comment has been minimized.

Show comment
Hide comment
@saad-ali

saad-ali Oct 2, 2018

Member

/lgtm
/approve

Member

saad-ali commented Oct 2, 2018

/lgtm
/approve

@k8s-ci-robot

This comment has been minimized.

Show comment
Hide comment
@k8s-ci-robot

k8s-ci-robot Oct 2, 2018

Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gnufied, msau42, saad-ali

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

Contributor

k8s-ci-robot commented Oct 2, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gnufied, msau42, saad-ali

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

@fejta-bot

This comment has been minimized.

Show comment
Hide comment
@fejta-bot

fejta-bot Oct 2, 2018

/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.

fejta-bot commented Oct 2, 2018

/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.

@k8s-ci-robot k8s-ci-robot merged commit 2d67d78 into kubernetes:master Oct 3, 2018

18 checks passed

cla/linuxfoundation gnufied authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gke Skipped
pull-kubernetes-e2e-kops-aws Job succeeded.
Details
pull-kubernetes-e2e-kubeadm-gce Skipped
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped
pull-kubernetes-local-e2e-containerized Skipped
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
tide In merge pool.
Details

k8s-ci-robot added a commit that referenced this pull request Oct 4, 2018

Merge pull request #69375 from gnufied/automated-cherry-pick-of-#69225-…
…upstream-release-1.12

Automated cherry pick of #69225: Enable volume limit feature by default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment