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

Fix vSphere Cloud Provider to handle upgrade from k8s version less than v1.9.4 to v1.9.4+ #62919

Merged
merged 1 commit into from
Apr 23, 2018

Conversation

abrarshivani
Copy link
Contributor

@abrarshivani abrarshivani commented Apr 20, 2018

What this PR does / why we need it:
vSphere Cloud Provider in kubernetes master v1.9.4+ is not able to identify the kubernetes nodes of version less than 1.9.4. Hence, volume operations fail in this case. This PR fixes this.

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 #62435

Special notes for your reviewer:
Internally reviewed here: vmware-archive#477

Release note:

Fix in vSphere Cloud Provider to handle upgrades from kubernetes version less than v1.9.4 to v1.9.4 and above.

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 20, 2018
@abrarshivani
Copy link
Contributor Author

//cc @kubernetes/vmware

@k8s-ci-robot k8s-ci-robot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 20, 2018
@abrarshivani abrarshivani force-pushed the backward_comp branch 2 times, most recently from 8939884 to 21e1dd7 Compare April 20, 2018 21:56
@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 20, 2018
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Apr 20, 2018

@abrarshivani: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-e2e-gke 89398845712a0f72da1c779b380e24a4b233ebbc link /test pull-kubernetes-e2e-gke

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

@abrarshivani
Copy link
Contributor Author

/test pull-kubernetes-kubemark-e2e-gce

@divyenpatel
Copy link
Member

/assign divyenpatel

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

@divyenpatel divyenpatel left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abrarshivani, divyenpatel

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-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 63007, 62919, 62669, 62860). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 5752d1f into kubernetes:master Apr 23, 2018
@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 release-note-none Denotes a PR that doesn't merit a release note. labels Apr 24, 2018
k8s-github-robot pushed a commit that referenced this pull request Apr 25, 2018
…-upstream-release-1.10

Automatic merge from submit-queue.

Automated cherry pick of #62919: Fix vSphere Cloud Provider to handle upgrade from k8s version less than v1.9.4 to v1.9.4+

Cherry pick of #62919 on release-1.10.

#62919: Fix vSphere Cloud Provider to handle upgrade from k8s version less than v1.9.4 to v1.9.4+

```release-note
Fix in vSphere Cloud Provider to handle upgrades from kubernetes version less than v1.9.4 to v1.9.4 and above.
```
k8s-github-robot pushed a commit that referenced this pull request May 16, 2018
…-upstream-release-1.9

Automatic merge from submit-queue.

Automated cherry pick of #62919: Fix vSphere Cloud Provider to handle upgrade from k8s version less than v1.9.4 to v1.9.4+

Cherry pick of #62919 on release-1.9.

#62919: Fix vSphere Cloud Provider to handle upgrade from k8s version less than v1.9.4 to v1.9.4+

```release-note
Fix in vSphere Cloud Provider to handle upgrades from kubernetes version less than v1.9.4 to v1.9.4 and above.
```
@@ -542,3 +548,32 @@ func GetVMUUID() (string, error) {
func GetUUIDFromProviderID(providerID string) string {
return strings.TrimPrefix(providerID, ProviderPrefix)
}

func IsUUIDSupportedNode(node *v1.Node) (bool, error) {
newVersion, err := version.ParseSemantic("v1.9.4")
Copy link
Member

Choose a reason for hiding this comment

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

@divyenpatel @abrarshivani This change seems problematic, could we have not done this in a different way? Such as if - we can't find node using ProviderID then we could use SystemUUID? Some kubernetes distributions such as Openshift do not necessarily match kubernetes versioning schemes and hence the fix will not work for them.

Copy link
Member

@divyenpatel divyenpatel Aug 21, 2018

Choose a reason for hiding this comment

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

@gnufied in that case IsUUIDSupportedNode() is returning error?
If that is the case, then we need to correct func GetNodeUUID(node *v1.Node) (string, error) function.

Can you provide Openshift versioning schemes?

 

Copy link
Member

Choose a reason for hiding this comment

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

@divyenpatel no IsUUIDSupportedNode will always return true in Kubernetes distributions which do not necessarily track kube's version naming. Basically - openshift-3.9 == kube-1.9 but after initial release openshift does not follow release pattern of kubernetes and hence openshift-3.9.40 will still report kube-1.9.0..

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. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

Disks fail to detach when upgrading from 1.9.2 to 1.9.5
5 participants