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

Enable PersistentVolumeLabel admission plugin #9822

Merged
merged 1 commit into from
Jul 14, 2016

Conversation

ncdc
Copy link
Contributor

@ncdc ncdc commented Jul 13, 2016

Enable PersistentVolumeLabel admission plugin. This labels AWS and GCE volumes with their zone, so the scheduler can limit the nodes for a pod to only those in the same zone as the peristent volumes being used by the pod.

Fixes bug 1356010

@smarterclayton @deads2k @liggitt

@@ -318,6 +318,7 @@ var (
"SCCExecRestrictions",
quotaadmission.PluginName,
"ClusterResourceQuota",
"PersistentVolumeLabel",
Copy link
Contributor

Choose a reason for hiding this comment

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

quota needs to go last

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems like a comment is in order for that so the next poor soul doesn't do this too

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like a comment is in order for that so the next poor soul doesn't do this too

Probably test worthy. There's already some tests for consistency.

@deads2k
Copy link
Contributor

deads2k commented Jul 13, 2016

Seems like this is something that deserves a test. Is there one you can enable from upstream in our conformance suite?

@smarterclayton
Copy link
Contributor

I think those rely on cloud providers. Until Steve turns on the "deploy to AWS" stuff we're probably blocked. Can we fake it in an integration test?

@ncdc
Copy link
Contributor Author

ncdc commented Jul 13, 2016

Agreed that this is cloud provider specific. However there is an upstream unit test: https://github.com/kubernetes/kubernetes/blob/master/plugin/pkg/admission/persistentvolume/label/admission_test.go

@@ -317,6 +317,9 @@ var (
"LimitPodHardAntiAffinityTopology",
"SCCExecRestrictions",
quotaadmission.PluginName,
"PersistentVolumeLabel",
Copy link
Contributor

Choose a reason for hiding this comment

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

before both quota plugins.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ugh. Ok.

@deads2k
Copy link
Contributor

deads2k commented Jul 13, 2016

Agreed that this is cloud provider specific.

Ok, if it can't be tested automatically, is there somewhere we have to make a mark to be sure that test checks it during a regression suite?

@ncdc
Copy link
Contributor Author

ncdc commented Jul 13, 2016

[test]

Enable PersistentVolumeLabel admission plugin. This labels AWS and GCE volumes with their zone, so
the scheduler can limit the nodes for a pod to only those in the same zone as the peristent volumes
being used by the pod.
@ncdc ncdc force-pushed the enable-pv-label-admission branch from d8df3e3 to b66d87f Compare July 13, 2016 18:32
@ncdc
Copy link
Contributor Author

ncdc commented Jul 13, 2016

Updated PTAL

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to b66d87f

@deads2k
Copy link
Contributor

deads2k commented Jul 13, 2016

lgtm [merge]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/6221/)

@openshift-bot
Copy link
Contributor

openshift-bot commented Jul 13, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/6279/) (Image: devenv-rhel7_4589)

@ncdc
Copy link
Contributor Author

ncdc commented Jul 14, 2016

[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to b66d87f

@openshift-bot openshift-bot merged commit ff15d54 into openshift:master Jul 14, 2016
@smarterclayton
Copy link
Contributor

Ok, this merged but is disabled in the admission_sync_test.go. Why didn't it fail?

@ncdc
Copy link
Contributor Author

ncdc commented Sep 9, 2016

It didn't fail because the plugin is now both registered & used. Previously it was registered but not used (and the test case marks it as not used). If you change from registered/not-used/marked-not-used to registered/used/marked-not-used, the test will pass.

The test only tries to catch

  1. we aren't trying to specify plugins in the kube admission chain that aren't registered
  2. if new kube admission plugins show up, we either add them to origin.KubeAdmissionPlugins, or we add them to the list of not-used plugins in the test case

I'll submit a PR to remove PersistentVolumeLabel from the list of not-used plugins.

@ncdc
Copy link
Contributor Author

ncdc commented Sep 9, 2016

#10862

@smarterclayton
Copy link
Contributor

I'm doing it in the rebase - don't worry.

On Sep 9, 2016, at 9:31 AM, Andy Goldstein [email protected] wrote:

It didn't fail because the plugin is now both registered & used. Previously
it was registered but not used (and the test case marks it as not used). If
you change from registered/not-used/marked-not-used to
registered/used/marked-not-used, the test will pass.

The test only tries to catch

  1. we aren't trying to specify plugins in the kube admission chain that
    aren't registered
  2. if new kube admission plugins show up, we either add them to
    origin.KubeAdmissionPlugins, or we add them to the list of not-used plugins
    in the test case

I'll submit a PR to remove PersistentVolumeLabel from the list of not-used
plugins.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#9822 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABG_p3qGB7diRgKnbvBHmYlS865zeDUWks5qoV_DgaJpZM4JLpNH
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants