-
Notifications
You must be signed in to change notification settings - Fork 40k
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
VSAN support for VSphere Volume Plugin #29172
VSAN support for VSphere Volume Plugin #29172
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
4 similar comments
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
be4ba68
to
9d248fa
Compare
Ping @googlebot as I've just added @abrarshivani in the vmware contributors group. |
ping @googlebot |
CLAs look good, thanks! |
9d248fa
to
b4f9dfc
Compare
45c59e3
to
9178fce
Compare
return uuid | ||
} | ||
|
||
//Gets virtual disk uuid by datastore path. Here, datastore path can be both containing vsan object name or uuid. |
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.
whats a vsan object name, is it a datastore vmdk path? does this mean volPath argument can be a uuid as well?
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.
Good catch @abhitap. I will adjust the comments to this:
// Gets virtual disk uuid by datastore (namespace) path
//
// volPath can be namespace path (e.g. "[vsanDatastore] volumes/test.vmdk") or
// uuid path (e.g. "[vsanDatastore] 59427457-6c5a-a917-7997-0200103eedbc/test.vmdk").
// `volumes` in this case would be a symlink to
// `59427457-6c5a-a917-7997-0200103eedbc`.
//
// We want users to use namespace path. It is good for attaching the disk,
// but for detaching the API requires uuid path. Hence, to detach the right
// device we have to convert the namespace path to uuid path.
9178fce
to
d2c7bd7
Compare
} | ||
return "", ErrNoDiskUUIDFound | ||
} | ||
|
||
func getVirtualDiskID(volPath string, vmDevices object.VirtualDeviceList) (string, error) { | ||
func formatVirtualDiskUUID(uuid string) string { | ||
|
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.
spurious newline
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.
Thanks for the comments! The newline is not needed.
d2c7bd7
to
56739bb
Compare
} | ||
|
||
func getVirtualDiskID(volPath string, vmDevices object.VirtualDeviceList, dc *object.Datacenter, client *govmomi.Client) (string, error) { | ||
|
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.
spurious newline
Just a couple nits and this LGTM. Does it need a release note? It sounds to me like it might be worthy of release note, but I'm not certain. |
56739bb
to
206ad4d
Compare
@pmorie This PR needs release note. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
- Fix unmount for vsanDatastore - Add support for vsan datastore
206ad4d
to
87e7535
Compare
@k8s-bot ok to test |
GCE e2e build/test passed for commit 87e7535. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit 87e7535. |
Automatic merge from submit-queue |
Automatic merge from submit-queue Back porting critical vSphere bug fixes to release 1.3 vSphere cloud provider plugin was first introduced in Kubernetes 1.3.0. The two PRs listed below contain critical volume attach/detach related fixes. Without these fixes, vSphere in 1.3 lacks the ability to consistently attach/detach volumes correctly especially in a busy cluster. These changes only affect the vSphere cloud provider. - #29172 - #30535
…BugFixes Automatic merge from submit-queue Back porting critical vSphere bug fixes to release 1.3 vSphere cloud provider plugin was first introduced in Kubernetes 1.3.0. The two PRs listed below contain critical volume attach/detach related fixes. Without these fixes, vSphere in 1.3 lacks the ability to consistently attach/detach volumes correctly especially in a busy cluster. These changes only affect the vSphere cloud provider. - kubernetes#29172 - kubernetes#30535
This PR does the following,
Tested:
- Created a K8s cluster on VSphere with VSAN datastore. Created a vmdk in VSAN datastore and created pod which uses this vmdk. Before fix (VSphere Volume doesn't unmount) it failed. After fix the volume gets successfully unmounted and detached.
- Created a K8s cluster on VSphere with VMFS datastore. Created a vmdk in subdirectory of root in VMFS datastore and created pod which uses this vmdk. Before fix (VSphere Volume doesn't unmount) it failed. After fix the volume gets successfully unmounted and detached.