vmware-archive / vsphere-storage-for-docker

vSphere Storage for Docker
https://vmware.github.io/vsphere-storage-for-docker
Apache License 2.0
251 stars 95 forks source link

Handle case correction for Windows plugin #2022

Closed govint closed 6 years ago

govint commented 6 years ago

Modified plugin_utils:GetVolumeInfo() to handle case sensitivity for windows platform. This is not tested yet for the windows platform yet.

govint commented 6 years ago

Thanks to @shuklanirdesh82 and @ashahi1 for the Windows VM set up, verified the fix on Windows:

  1. Create a volume cvol1
  2. Run two containers with cvol1 and cvol1@vsanDatastore
  3. Check the volume names used for the two containers, PS C:\Users\root> docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 5d03844ef3fd microsoft/nanoserver "powershell" 11 minutes ago Up 11 minutes condescending_colden 7dd53858f664 microsoft/nanoserver "powershell" 15 minutes ago Up 14 minutes loving_torvalds

    "Mounts": [
        {
            "Type": "volume",
            "Name": "cvol1@vsandatastore", <------------
            "Source": "C:\\Windows\\system32\\config\\systemprofile\\AppData\\Local\\docker-volume-vsphere\\mounts\\cvol1@vs

    anDatastore\", "Destination": "c:\vol", "Driver": "vsphere", "Mode": "", "RW": true, "Propagation": "" } ],

And the second container,

    "Mounts": [
        {
            "Type": "volume",
            "Name": "cvol1", <----------------
            "Source": "C:\\Windows\\system32\\config\\systemprofile\\AppData\\Local\\docker-volume-vsphere\\mounts\\cvol1@vs

anDatastore\", "Destination": "c:\vol", "Driver": "vsphere", "Mode": "", "RW": true, "Propagation": "" } ],

govint commented 6 years ago

@shuklanirdesh82, do I merge the change, for some reason CI isn't showing up for this PR.

shuklanirdesh82 commented 6 years ago

https://github.com/vmware/docker-volume-vsphere/pull/2022#issuecomment-350554132

Yeah sure!