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

subset of supported topology keys are not working for waitforfirstconsumer #421

Merged
merged 1 commit into from
Apr 1, 2020

Conversation

pawanpraka1
Copy link
Contributor

@pawanpraka1 pawanpraka1 commented Mar 11, 2020

What type of PR is this?
/kind feature

What this PR does / why we need it:

fixes:- #420

If waitforfirstconsumer is used and if the driver supports multiple topology keys,
mentioning single key(or less than supported keys) in the storageclass is not working.
The csi-provisioner gets list of all the topology keys from the csinode object
and gets the values for those keys from the node object. Now this key-value term
is matched against the topology mentioned in the storageclass and it should match
entirely which is not correct as even if topology mentioned in the storageclass
is subset of the key-value term supported by the driver, then the node is a valid condidate.

Instead of strictly checking for the equality of the selected node's topology with
the allowedTopologies mentioned in the storageclass, we should check if allowedTopologies
is subset of selected node's topology.

Does this PR introduce a user-facing change?:

We can now provide few keys in the allowedtopologies of all the keys supported by the driver in late binding case.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Mar 11, 2020
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Mar 11, 2020
@k8s-ci-robot
Copy link
Contributor

Welcome @pawanpraka1!

It looks like this is your first PR to kubernetes-csi/external-provisioner 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-csi/external-provisioner has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 11, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @pawanpraka1. Thanks for your PR.

I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 11, 2020
@pawanpraka1 pawanpraka1 force-pushed the topology branch 2 times, most recently from 95441d4 to 28d2999 Compare March 11, 2020 08:58
@pawanpraka1
Copy link
Contributor Author

I signed it

@pawanpraka1
Copy link
Contributor Author

I signed it

@pawanpraka1
Copy link
Contributor Author

I signed it

1 similar comment
@pawanpraka1
Copy link
Contributor Author

I signed it

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Mar 11, 2020
@pawanpraka1 pawanpraka1 changed the title subset of supported keys is not working for waitforfirstconsumer subset of supported topology keys is not working for waitforfirstconsumer Mar 11, 2020
@pawanpraka1 pawanpraka1 changed the title subset of supported topology keys is not working for waitforfirstconsumer subset of supported topology keys are not working for waitforfirstconsumer Mar 11, 2020
@msau42
Copy link
Collaborator

msau42 commented Mar 12, 2020

/ok-to-test
/assign @verult

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 12, 2020
@pawanpraka1
Copy link
Contributor Author

/assign @msau42

pkg/controller/topology_test.go Outdated Show resolved Hide resolved
pkg/controller/topology_test.go Show resolved Hide resolved
pkg/controller/topology_test.go Show resolved Hide resolved
@msau42
Copy link
Collaborator

msau42 commented Mar 18, 2020

/assign @pohly

@k8s-ci-robot
Copy link
Contributor

@pawanpraka1: The label(s) kind/documentatinon cannot be applied, because the repository doesn't have them

In response to this:

What type of PR is this?
/kind bug
/kind documentation

What this PR does / why we need it:

fixes:- #420

If waitforfirstconsumer is used and if the driver supports multiple topology keys,
mentioning single key(or less than supported keys) in the storageclass is not working.
The csi-provisioner gets list of all the topology keys from the csinode object
and gets the values for those keys from the node object. Now this key-value term
is matched against the topology mentioned in the storageclass and it should match
entirely which is not correct as even if topology mentioned in the storageclass
is subset of the key-value term supported by the driver, then the node is a valid condidate.

Instead of strictly checking for the equality of the selected node's topology with
the allowedTopologies mentioned in the storageclass, we should check if allowedTopologies
is subset of selected node's topology.

Special notes for your reviewer:

Does this PR introduce a user-facing change?:
/kind documentatinon
When we are using few keys of all the supported keys by the driver in the storageclass allowedtopologies, the volume provisioning was failing. There was a bug in matching the allowedtopologies mentioned in the storageclass with the topologies supported by the driver. It was assuming all the keys supported by the driver to be present in the allowed topologies. Fixed this relaxing this assumption.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Mar 31, 2020
@pawanpraka1
Copy link
Contributor Author

Can you also add a release note for this?

done @msau42 .

@msau42
Copy link
Collaborator

msau42 commented Apr 1, 2020

/kind feature
/remove-kind documentation

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. and removed kind/documentation Categorizes issue or PR as related to documentation. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Apr 1, 2020
@msau42
Copy link
Collaborator

msau42 commented Apr 1, 2020

/lgtm
/approve
Thanks for working on this!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 1, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: msau42, pawanpraka1

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 Apr 1, 2020
@pawanpraka1
Copy link
Contributor Author

@msau42 travis has passed but status has not updated yet, Please check.

@msau42
Copy link
Collaborator

msau42 commented Apr 1, 2020

Can you try force pushing your branch again? I'm not sure why travis reporting is stuck

@pawanpraka1
Copy link
Contributor Author

/retest

@pawanpraka1
Copy link
Contributor Author

@msau42 can you restart the travis build?

@msau42
Copy link
Collaborator

msau42 commented Apr 1, 2020

I'm not able to restart it, I think it is triggered based on git pushes. Maybe try squashsing your commits and then force pushing?

If waitforfirstconsumer is used and if the driver supports multiple keys,
mentioning single key(or less than supported keys) in the storageclass is not working.
The csi-provisioner gets list of all the topology keys from the csinode object
and gets the values for those keys from the node object. Now this key-value term
is matched against the topology mentioned in the storageclass and it should match
entirely which is not correct as even if topology mentioned in the storageclass
is subset of the key-value term supported by the driver, then the node is a valid condidate.

Instead of strictly checking for the equality of the selected node's topology with
the allowedTopologies mentioned in the storageclass, we should check if allowedTopologies
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 1, 2020
@pawanpraka1
Copy link
Contributor Author

@msau42 done, forced push the changes.

@msau42
Copy link
Collaborator

msau42 commented Apr 1, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 1, 2020
@pawanpraka1
Copy link
Contributor Author

@msau42 same issue, again.

@msau42
Copy link
Collaborator

msau42 commented Apr 1, 2020

I will just force merge the PR, all the other checks have passed. Thanks!

@msau42 msau42 merged commit e706892 into kubernetes-csi:master Apr 1, 2020
@pawanpraka1
Copy link
Contributor Author

thanks @msau42 .

kbsonlong pushed a commit to kbsonlong/external-provisioner that referenced this pull request Dec 29, 2023
…go_modules/k8s.io/csi-translation-lib-0.26.2

Bump k8s.io/csi-translation-lib from 0.26.1 to 0.26.2
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

5 participants