{"action":"created","issue":{"url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/818","repository_url":"https://api.github.com/repos/vmware/docker-volume-vsphere","labels_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/818/labels{/name}","comments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/818/comments","events_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/818/events","html_url":"https://github.com/vmware/docker-volume-vsphere/issues/818","id":195397365,"number":818,"title":"Not able to create vsphere docker volume (using short volume names) after renaming datastore","user":{"login":"shuklanirdesh82","id":22988730,"avatar_url":"https://avatars.githubusercontent.com/u/22988730?v=3","gravatar_id":"","url":"https://api.github.com/users/shuklanirdesh82","html_url":"https://github.com/shuklanirdesh82","followers_url":"https://api.github.com/users/shuklanirdesh82/followers","following_url":"https://api.github.com/users/shuklanirdesh82/following{/other_user}","gists_url":"https://api.github.com/users/shuklanirdesh82/gists{/gist_id}","starred_url":"https://api.github.com/users/shuklanirdesh82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shuklanirdesh82/subscriptions","organizations_url":"https://api.github.com/users/shuklanirdesh82/orgs","repos_url":"https://api.github.com/users/shuklanirdesh82/repos","events_url":"https://api.github.com/users/shuklanirdesh82/events{/privacy}","received_events_url":"https://api.github.com/users/shuklanirdesh82/received_events","type":"User","site_admin":false},"labels":[{"id":381170957,"url":"https://api.github.com/repos/vmware/docker-volume-vsphere/labels/component/server","name":"component/server","color":"bfd4f2","default":false},{"id":310972920,"url":"https://api.github.com/repos/vmware/docker-volume-vsphere/labels/kind/bug","name":"kind/bug","color":"fbca04","default":false},{"id":326563811,"url":"https://api.github.com/repos/vmware/docker-volume-vsphere/labels/P0","name":"P0","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-13T23:18:16Z","updated_at":"2016-12-14T06:36:36Z","closed_at":null,"body":"Short volume name reference: https://github.com/vmware/docker-volume-vsphere/blob/master/docs/misc/VolumeNames.md#short-volume-names\r\n\r\nSteps to reproduce:\r\n\r\n1)  create vsphere docker volume using following command (Let's say we have created photon1 docker host on TestDatastore)\r\n```\r\n# docker volume create --driver=vmdk --name=MyVol -o size=1gb\r\nMyVol\r\n```\r\n2) make sure volume is created successfully\r\n```\r\n[root@promc-2n-dhcp105-97:/var/log/vmware] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py ls\r\nVolume  Datastore       Created By VM  Created                   Attached To VM  Policy  Capacity  Used     Disk Format  Filesystem Type  Access      Attach As               \r\n------  --------------  -------------  ------------------------  --------------  ------  --------  -------  -----------  ---------------  ----------  ----------------------  \r\nMyVol   TestDatastore  photon2        Tue Dec 13 21:13:49 2016  detached        N/A     1.00GB    39.00MB  N/A          ext4             read-write  independent_persistent\r\n```\r\n3) rename the datastore which is hosting docker VM i.e. TestDatastore => TestDatastore1\r\n4) wait for some time ~30-60secs to propagate the name changes\r\n\r\n```\r\n[root@promc-2n-dhcp105-97:/var/log/vmware] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py ls\r\nVolume  Datastore       Created By VM  Created                   Attached To VM  Policy  Capacity  Used     Disk Format  Filesystem Type  Access      Attach As               \r\n------  --------------  -------------  ------------------------  --------------  ------  --------  -------  -----------  ---------------  ----------  ----------------------  \r\nMyVol   **TestDatastore1**  photon2        Tue Dec 13 21:13:49 2016  detached        N/A     1.00GB    39.00MB  N/A          ext4             read-write  independent_persistent\r\n\r\nNote: make sure 'Datastore' is reflected correctly i.e. with new name\r\n```\r\n5) invoke the volume creation command with different volume \r\n```\r\n# docker volume create --driver=vmdk --name=MyVol1 -o size=1gb\r\nError response from daemon: create MyVol1: VolumeDriver.Create: dockvols creation failed - Operation not permitted on TestDatastore  <===== driver is still referring to the old name\r\n```\r\n\r\n**Expectation**: volume creation should not complain if underlying datastore got renamed\r\n\r\nfrom ESX logs:\r\n\r\n```\r\n-----vmdk_ops.log-------\r\n12/13/16 22:59:11 2663252 [Thread-140] [WARNING] dockvols creation failed - Operation not permitted on TestDatastore\r\n12/13/16 22:59:11 2663252 [Thread-140] [INFO   ] executeRequest 'get' completed with ret={u'Error': 'dockvols creation failed - Operation not permitted on TestDatastore'}\r\n12/13/16 22:59:11 2663252 [Thread-141] [WARNING] dockvols creation failed - Operation not permitted on TestDatastore\r\n12/13/16 22:59:11 2663252 [Thread-141] [INFO   ] executeRequest 'create' completed with ret={u'Error': 'dockvols creation failed - Operation not permitted on TestDatastore'}\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/comments/266955186","html_url":"https://github.com/vmware/docker-volume-vsphere/issues/818#issuecomment-266955186","issue_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/818","id":266955186,"user":{"login":"govint","id":15854712,"avatar_url":"https://avatars.githubusercontent.com/u/15854712?v=3","gravatar_id":"","url":"https://api.github.com/users/govint","html_url":"https://github.com/govint","followers_url":"https://api.github.com/users/govint/followers","following_url":"https://api.github.com/users/govint/following{/other_user}","gists_url":"https://api.github.com/users/govint/gists{/gist_id}","starred_url":"https://api.github.com/users/govint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/govint/subscriptions","organizations_url":"https://api.github.com/users/govint/orgs","repos_url":"https://api.github.com/users/govint/repos","events_url":"https://api.github.com/users/govint/events{/privacy}","received_events_url":"https://api.github.com/users/govint/received_events","type":"User","site_admin":false},"created_at":"2016-12-14T06:36:36Z","updated_at":"2016-12-14T06:36:36Z","body":"One fix for this may be to not use VMM groupInfo to get the datastore and instead use the \"datastoreUrl\" in the VM config got via VIM api."}}
{"actor":{"display_login":"govint"}}