Skip to content

Conversation

@subramanian-neelakantan
Copy link
Contributor

@subramanian-neelakantan subramanian-neelakantan commented Feb 27, 2019

What type of PR is this?
/kind bug

What this PR does / why we need it:
This is a cherry-pick of PRs #72731 and PR #72687 to be merged into release-1.13. When this PR is merged, vSphere volumes will get placed as per zone requested in allowedTopologies property of a storage class. Also the newly created volume is labelled with the zone information. See the base PRs for more details.

Which issue(s) this PR fixes:

Fixes #73301
refers to issue #67703

Special notes for your reviewer:
All the existing vsphere e2e tests were run against this PR and found to be passing.

  1. This change ensures that volumes get provisioned based on the zone information provided in allowedTopologies.
Storage class spec:
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: fastpolicy1
provisioner: kubernetes.io/vsphere-volume
parameters:
    diskformat: zeroedthick
    storagePolicyName: vSAN Default Storage Policy
allowedTopologies:
- matchLabelExpressions:
  - key: failure-domain.beta.kubernetes.io/zone
    values:
    - zone1

PV creation Logs:

I0109 11:17:52.321372       1 vsphere.go:1147] Starting to create a vSphere volume with volumeOptions: &{CapacityKB:1048576 Tags:map[kubernetes.io/created-for/pvc/namespace:default kubernetes.io/created-for/pvc/name:pvcsc-1-policy kubernetes.io/created-for/pv/name:pvc-34650c12-1400-11e9-aef4-005056804cc9] Name:kubernetes-dynamic-pvc-34650c12-1400-11e9-aef4-005056804cc9 DiskFormat:zeroedthick Datastore: VSANStorageProfileData: StoragePolicyName:vSAN Default Storage Policy StoragePolicyID: SCSIControllerType: Zone:[zone1]}
...
I0109 11:17:59.430113       1 vsphere.go:1334] The canonical volume path for the newly created vSphere volume is "[vsanDatastore] 98db185c-6683-d8c7-bc55-0200435ec5da/kubernetes-dynamic-pvc-34650c12-1400-11e9-aef4-005056804cc9.vmdk"
  1. This change also applies zone labels to vSphere Volumes automatically. The zone labels are visible on the PV:
$ kubectl get pv --show-labels
NAME           CAPACITY   ACCESSMODES   STATUS    CLAIM            REASON    AGE       LABELS
pv-abc                5Gi        RWO                   Bound     default/claim1                    46s       failure-domain.beta.kubernetes.io/region=VC1,failure-domain.beta.kubernetes.io/zone=cluster-1

Does this PR introduce a user-facing change?:

Applies zone labels to vSphere Volumes and honors allowedTopologies when provisioning.

/sig vmware
/sig storage
/sig api-machinery
/cc @vladimirvivien @frapposelli

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. area/provider/vmware Issues or PRs related to vmware provider size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Feb 27, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @subramanian-neelakantan. Thanks for your PR.

I'm waiting for a kubernetes 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.

Details

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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. labels Feb 27, 2019
@frapposelli
Copy link

/ok-to-test

@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 Feb 27, 2019
@subramanian-neelakantan
Copy link
Contributor Author

/retest

@frapposelli
Copy link

/lgtm
/approve

/assign @tpepper

This is for the next 1.13 patch release

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 28, 2019
@frapposelli
Copy link

@roycaihw
Copy link
Member

cc @cheftako

@SandeepPissay
Copy link
Contributor

/approve

@tpepper
Copy link

tpepper commented Mar 1, 2019

In the future please use the cherry-pick automation.

As I read the description and saw the size/XL this came across as a feature. Then I looked at the resolved issue and it is marked as a feature. I need some convincing this is actually a cherry pick candidate.

@subramanian-neelakantan
Copy link
Contributor Author

subramanian-neelakantan commented Mar 2, 2019

In the future please use the cherry-pick automation.

Will do. Thanks for letting me know the right process.

As I read the description and saw the size/XL this came across as a feature. Then I looked at the resolved issue and it is marked as a feature. I need some convincing this is actually a cherry pick candidate.

This cherry-pick contains two related PRs - #72731 and #72687 - both of which fix slightly different issues. vSphere cloud provider already implements the zones interface. With Zones support the nodes get zone labels as per the tags in vcenter inventory and users could provision pods to zones. However it did not work well when volumes were not placed in specific configurations. PR #72687 fixes issue #73301 (zone labels need to be auto-applied to a volume, so that pod scheduler can choose the right pod as per volume) and PR #72731 fixes the issue of placing the volume in a datastore of the right zone. These issues were causing wrong and strange behaviour of volumes in a vsphere environment that uses zones when the datastore were not shared across all k8s nodes.

I apologize for not giving the reference of the right issues in the description. I have done that now. Kindly take another look and let me know if you have questions.

@subramanian-neelakantan
Copy link
Contributor Author

@tpepper PTAL

@tpepper tpepper added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Mar 18, 2019
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. label Mar 18, 2019
@subramanian-neelakantan
Copy link
Contributor Author

subramanian-neelakantan commented Mar 20, 2019

@deads2k @derekwaynecarr can you take a look at this PR for a cherry pick into 1.13? This needs your approve before it can be considered for a merge.

@derekwaynecarr
Copy link
Member

echo the sentiment on using the automation. the admission changes look fine.

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: derekwaynecarr, frapposelli, SandeepPissay, subramanian-neelakantan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 Mar 22, 2019
@subramanian-neelakantan
Copy link
Contributor Author

/test pull-kubernetes-integration

@k8s-ci-robot k8s-ci-robot merged commit 55c118a into kubernetes:release-1.13 Mar 22, 2019
@subramanian-neelakantan
Copy link
Contributor Author

Cleaned up the release notes in description.

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. area/provider/vmware Issues or PRs related to vmware provider cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. 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. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants