-
Notifications
You must be signed in to change notification settings - Fork 40.3k
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
Fix vSphere Cloud Provider to handle upgrade from k8s version less than v1.9.4 to v1.9.4+ #62919
Conversation
//cc @kubernetes/vmware |
80b1fd1
to
10f7d57
Compare
8939884
to
21e1dd7
Compare
21e1dd7
to
05fcd94
Compare
05fcd94
to
c15336e
Compare
@abrarshivani: The following test failed, say
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. |
/test pull-kubernetes-kubemark-e2e-gce |
/assign divyenpatel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[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 |
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. |
…-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. ```
…-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") |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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..
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: