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

Fixes volume predicate handler for equiv class #59335

Merged
merged 1 commit into from Feb 15, 2018

Conversation

@resouer
Member

resouer commented Feb 5, 2018

What this PR does / why we need it:

Per discussion in #58797 , we are missing some predicate handler in factory.go.

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

Ref #58222

Special notes for your reviewer:

Kindly ping @msau42

Release note:

Fixes volume predicate handler for equiv class
@@ -491,8 +534,6 @@ func (c *configFactory) invalidatePredicatesForPvcUpdate(old, new *v1.Persistent
}
// The bound volume type may change
invalidPredicates.Insert(maxPDVolumeCountPredicateKeys...)
// The bound volume's label may change
invalidPredicates.Insert("NoVolumeZoneConflict")

This comment has been minimized.

@resouer

resouer Feb 5, 2018

Member

This only happen for PV update, so let's remove it.

@wgliang

Need fix tests failed.

func (c *configFactory) invalidatePredicatesForPvUpdate(old, new *v1.PersistentVolume) {
invalidPredicates := sets.NewString()
for k, v := range newPV.Labels {

This comment has been minimized.

@wgliang

wgliang Feb 5, 2018

Member

newPV should new.

This comment has been minimized.

@resouer

resouer Feb 5, 2018

Member

OH! bad rebase, fixing!

invalidPredicates := sets.NewString()
for k, v := range newPV.Labels {
// If PV update modifies the zone/region labels.
if isZoneRegionLabel(k) && !reflect.DeepEqual(v, oldPV.Labels[k]) {

This comment has been minimized.

@wgliang
@msau42

This comment has been minimized.

Member

msau42 commented Feb 5, 2018

/assign

Equiv class volume fixes
Generated bazel
@resouer

This comment has been minimized.

Member

resouer commented Feb 6, 2018

@msau42 The bazel test is flaky due to #59432

I think you can go ahead to review whenever got time :)

@msau42

This comment has been minimized.

Member

msau42 commented Feb 6, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm label Feb 6, 2018

@resouer

This comment has been minimized.

Member

resouer commented Feb 6, 2018

@resouer

This comment has been minimized.

Member

resouer commented Feb 14, 2018

Kindly ping @bsalamat for final pass and approve.

This fix is straightfoward, PTAL :)

@bsalamat

Looks generally good to me, but I would like @msau42 to take a look as well.

for k, v := range newPV.Labels {
// If PV update modifies the zone/region labels.
if isZoneRegionLabel(k) && !reflect.DeepEqual(v, oldPV.Labels[k]) {
invalidPredicates.Insert("NoVolumeZoneConflict")

This comment has been minimized.

@bsalamat

bsalamat Feb 14, 2018

Contributor

Please use predicates.NoVolumeZoneConflictPred instead of the string literal.

This comment has been minimized.

@resouer

resouer Feb 14, 2018

Member

Yep, and I will also replace all predicate key names to const in this file.

This comment has been minimized.

@bsalamat

bsalamat Feb 15, 2018

Contributor

Ok, I lgtm this one and wait for your next PR to replace these literals with the const.

@msau42

This comment has been minimized.

Member

msau42 commented Feb 14, 2018

Yup, I already looked at it, thanks!

@bsalamat

This comment has been minimized.

Contributor

bsalamat commented Feb 15, 2018

/lgtm

@k8s-ci-robot

This comment has been minimized.

Contributor

k8s-ci-robot commented Feb 15, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bsalamat, msau42, resouer

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-merge-robot

This comment has been minimized.

Contributor

k8s-merge-robot commented Feb 15, 2018

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

@fejta-bot

This comment has been minimized.

fejta-bot commented Feb 15, 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-merge-robot

This comment has been minimized.

Contributor

k8s-merge-robot commented Feb 15, 2018

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

@k8s-merge-robot

This comment has been minimized.

Contributor

k8s-merge-robot commented Feb 15, 2018

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

@k8s-merge-robot k8s-merge-robot merged commit 4949b63 into kubernetes:master Feb 15, 2018

13 of 14 checks passed

Submit Queue Required Github CI test is not green: pull-kubernetes-e2e-gce
Details
cla/linuxfoundation resouer 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-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gke Skipped
pull-kubernetes-e2e-kops-aws Job succeeded.
Details
pull-kubernetes-e2e-kubeadm-gce-canary Skipped
pull-kubernetes-kubemark-e2e-gce Job succeeded.
Details
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-unit Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details

@resouer resouer deleted the resouer:equiv-vol branch Feb 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment