{"action":"created","issue":{"url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/957","repository_url":"https://api.github.com/repos/vmware/docker-volume-vsphere","labels_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/957/labels{/name}","comments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/957/comments","events_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/957/events","html_url":"https://github.com/vmware/docker-volume-vsphere/issues/957","id":209840924,"number":957,"title":"Identify tests for multi-esx scenario","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":322259699,"url":"https://api.github.com/repos/vmware/docker-volume-vsphere/labels/Investigate","name":"Investigate","color":"0052cc","default":false},{"id":326575896,"url":"https://api.github.com/repos/vmware/docker-volume-vsphere/labels/kind/test","name":"kind/test","color":"006b75","default":false}],"state":"open","locked":false,"assignee":{"login":"ashahi1","id":23107823,"avatar_url":"https://avatars.githubusercontent.com/u/23107823?v=3","gravatar_id":"","url":"https://api.github.com/users/ashahi1","html_url":"https://github.com/ashahi1","followers_url":"https://api.github.com/users/ashahi1/followers","following_url":"https://api.github.com/users/ashahi1/following{/other_user}","gists_url":"https://api.github.com/users/ashahi1/gists{/gist_id}","starred_url":"https://api.github.com/users/ashahi1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashahi1/subscriptions","organizations_url":"https://api.github.com/users/ashahi1/orgs","repos_url":"https://api.github.com/users/ashahi1/repos","events_url":"https://api.github.com/users/ashahi1/events{/privacy}","received_events_url":"https://api.github.com/users/ashahi1/received_events","type":"User","site_admin":false},"assignees":[{"login":"ashahi1","id":23107823,"avatar_url":"https://avatars.githubusercontent.com/u/23107823?v=3","gravatar_id":"","url":"https://api.github.com/users/ashahi1","html_url":"https://github.com/ashahi1","followers_url":"https://api.github.com/users/ashahi1/followers","following_url":"https://api.github.com/users/ashahi1/following{/other_user}","gists_url":"https://api.github.com/users/ashahi1/gists{/gist_id}","starred_url":"https://api.github.com/users/ashahi1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashahi1/subscriptions","organizations_url":"https://api.github.com/users/ashahi1/orgs","repos_url":"https://api.github.com/users/ashahi1/repos","events_url":"https://api.github.com/users/ashahi1/events{/privacy}","received_events_url":"https://api.github.com/users/ashahi1/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/vmware/docker-volume-vsphere/milestones/11","html_url":"https://github.com/vmware/docker-volume-vsphere/milestone/11","labels_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/milestones/11/labels","id":2293445,"number":11,"title":"0.12","description":"","creator":{"login":"pdhamdhere","id":16676511,"avatar_url":"https://avatars.githubusercontent.com/u/16676511?v=3","gravatar_id":"","url":"https://api.github.com/users/pdhamdhere","html_url":"https://github.com/pdhamdhere","followers_url":"https://api.github.com/users/pdhamdhere/followers","following_url":"https://api.github.com/users/pdhamdhere/following{/other_user}","gists_url":"https://api.github.com/users/pdhamdhere/gists{/gist_id}","starred_url":"https://api.github.com/users/pdhamdhere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdhamdhere/subscriptions","organizations_url":"https://api.github.com/users/pdhamdhere/orgs","repos_url":"https://api.github.com/users/pdhamdhere/repos","events_url":"https://api.github.com/users/pdhamdhere/events{/privacy}","received_events_url":"https://api.github.com/users/pdhamdhere/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":28,"state":"open","created_at":"2017-02-01T20:13:27Z","updated_at":"2017-02-28T00:31:27Z","due_on":"2017-02-28T08:00:00Z","closed_at":null},"comments":4,"created_at":"2017-02-23T18:13:08Z","updated_at":"2017-02-28T10:19:03Z","closed_at":null,"body":"## Multi-Esx tests\r\n\r\n**Testbed setup**:\r\n\r\n1. 2 ESX hosts (E1 & E2) \r\n2. E1 is having access to local-vmfs, vsan, shared-vmfs ( the same for E2)\r\n3. 2 VMs per each datastore from ESX (e.g. 2 vms on local/vsan/shared-vmfs backed by E1 i.e. total 6 vms)\r\n\r\n**Note**: atleast one vm is mandatory (more than 1 is recommended for complex scenario testing\r\n\r\nfor our test scenario\r\n```\r\n- vm1_shared_E1 & vm11_shared_E1 created on shared vmfs backed by E1\r\n- vm2_shared_E2 & vm22_shared_E2 created on shared vmfs backed by E2\r\n- vm3_vsan_E1 & vm33_vsan_E1 created on vsan backed by E1\r\n- vm4_vsan_E2 & vm44_vsan_E2 created on vsan backed by E2\r\n- vm5_local_E1 & vm55_local_E1 created on local vmfs backed by E1\r\n- vm6_local_E2 & vm66_local_E2 created on local vmfs backed by E2\r\n```\r\n\r\n- [x] **Scenario1** (with fresh install + _DEFAULT tenant behavior)\r\n\r\nSteps: \r\n```\r\n1. create one volume from each vms and make sure each has the accessibility to volumes created on the datastore backed by ESX where vm is resided (means no visibility to volumes created on local datastore backed by E2)\r\n\r\ne.g. \"docker volume ls\" on vm1_shared_E1 should has access to volumes created by following vms\r\n\r\n- vm1_shared_E1 \r\n- vm11_shared_E1\r\n- vm2_shared_E2  \r\n- vm22_shared_E2\r\n- vm3_vsan_E1 \r\n- vm33_vsan_E1\r\n- vm4_vsan_E2 \r\n- vm44_vsan_E2\r\n- vm5_local_E1 \r\n- vm55_local_E1 \r\n\r\n2. verifies attach/detach from above vms one by one (make sure vms can manipulate data)\r\n3. verifies vm6_local_E2 is not having any access volumes created by vm5_local_E1 & vm55_local_E1\r\n4. Perform volume delete from some vms which has access to created volumes\r\n```\r\n\r\n- [x] **Scenario 2** (user created tenant to check tenancy is per ESX)\r\nSteps:\r\n```\r\n\r\n1. create tenant T1 from E1 & E2\r\n2. add vm33_vsan_E1 to T1 on ESX E1\r\n3. add vm44_vsan_E2 to T1 on ESX E2\r\n4. invoke \"docker volume ls\" from vm33_vsan_E1 & vm44_vsan_E2 makes sure no volumes are visible after moving to T1\r\n5. make sure volumes created by above both VMs are still visible from other docker_hosts which are part of _DEFAULT tenant\r\n6. create volume from above vms with short names and validates tenancy access is per ESX and above vms can't see each others Volumes\r\n7. on E1: set default datastore for T1 as vsan datastore\r\n8. on E2: set default datastore for T1 as shared vmfs\r\n9.  create volume from above vms with short names and validates tenancy access is per ESX and above vms can't see each others Volumes\r\n10. make sure other vms, are part of _DEFAULT, will not have access to such volumes and vice versa\r\n11. deletes created volumes\r\n\r\n```\r\n\r\n- [x] **Scenario 3** (vsan policy)\r\nSteps:\r\n```\r\n\r\n1. create a valid vsan policy from E1 and E2\r\n2. create two volumes from vm3_vsan_E1 one with policy created on E1 and another with E2\r\n3. #2 for vm4_vsan_E2\r\n4. perform attach/detach for all 4 volumes from both vms and perform data manipulation as well\r\n5. on vm3_vsan_E1: remove volumes created by vm4_vsan_E2\r\n6. on vm4_vsan_E2: remove volumes created by vm3_vsan_E1\r\n\r\n```\r\n\r\n- [x] **Scenario 4** (fail-over for docker host created on vsan)\r\nSteps:\r\n```\r\n\r\n1. create a valid vsan policy from E1 and E2\r\n2. create two volumes from vm3_vsan_E1 one with policy created on E1 and another with E2\r\n3. #2 for vm4_vsan_E2\r\n4. perform attach/detach for all 4 volumes from both vms and perform data manipulation as well\r\n5. on vm3_vsan_E1: attach volume created by vm3_vsan_E1\r\n6. on E1: kill the vm vm3_vsan_E1 to test fail over\r\n7. on E2: try to attach the same volume which was in attached state on vm3_vsan_E1\r\n8. make sure attach operation succeeds\r\n9. perform data manipulation\r\n10. perform detach and remove the volume\r\n\r\n```\r\n\r\n- [x] **Scenario 5** ( fail-over for docker host created on shared vmfs)\r\nSteps: Perform above steps for vm1_shared_E1 & vm2_shared_E2\r\n\r\n- [x] **Scenario 6** (upgrade testing from vspherDockerVolume 0.11 or earlier => 0.11.2 or latest)\r\nSteps:\r\n```\r\nPerform steps mentioned in scenario 1 on the system which is having vmdk plugin & driver 0.11 or earlier version\r\nupdate vmdk plugin & driver (Note: plugin is not mandatory)\r\nfollow the upgrade steps\r\nverify the pre-upgrade setup is intact and perform attach/detach/creation/deletion.\r\n```"},"comment":{"url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/comments/283000170","html_url":"https://github.com/vmware/docker-volume-vsphere/issues/957#issuecomment-283000170","issue_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/957","id":283000170,"user":{"login":"ashahi1","id":23107823,"avatar_url":"https://avatars.githubusercontent.com/u/23107823?v=3","gravatar_id":"","url":"https://api.github.com/users/ashahi1","html_url":"https://github.com/ashahi1","followers_url":"https://api.github.com/users/ashahi1/followers","following_url":"https://api.github.com/users/ashahi1/following{/other_user}","gists_url":"https://api.github.com/users/ashahi1/gists{/gist_id}","starred_url":"https://api.github.com/users/ashahi1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashahi1/subscriptions","organizations_url":"https://api.github.com/users/ashahi1/orgs","repos_url":"https://api.github.com/users/ashahi1/repos","events_url":"https://api.github.com/users/ashahi1/events{/privacy}","received_events_url":"https://api.github.com/users/ashahi1/received_events","type":"User","site_admin":false},"created_at":"2017-02-28T10:19:03Z","updated_at":"2017-02-28T10:19:03Z","body":"Scenario 3 (vsan policy)\r\n-\r\n\r\n1. create a valid vsan policy from E1 and E2\r\n```\r\n[root@sc-rdops-vm02-dhcp-48-54:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py policy create --name some-policy-E2 --content '((\"proportionalCapacity\" i50)''(\"hostFailuresToTolerate\" i0))'\r\nSuccessfully created policy: some-policy-E2\r\n[root@sc-rdops-vm02-dhcp-48-54:~]\r\n\r\n[root@sc-rdops-vm02-dhcp-32-249:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py policy create --name some-policy-E1 --content '((\"proportionalCapacity\" i50)''(\"hostFailuresToTolerate\" i0))'\r\nSuccessfully created policy: some-policy-E1\r\n[root@sc-rdops-vm02-dhcp-32-249:~]\r\n\r\n```\r\n2. create two volumes from vm on vsan on one with policy created on E1 and another with E2\r\n```\r\nroot@photon-xVmYMbyTn [ ~ ]# docker volume create --driver=vmdk --name=Vol1VsanE1 -o size=500mb -o vsan-policy-name=some-policy-E1\r\nVol1VsanE1\r\nroot@photon-xVmYMbyTn [ ~ ]# docker volume create --driver=vmdk --name=Vol2VsanE1 -o size=500mb -o vsan-policy-name=some-policy-E2\r\nVol2VsanE1\r\nroot@photon-xVmYMbyTn [ ~ ]#\r\n\r\n[root@sc-rdops-vm02-dhcp-32-249:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py policy ls\r\nPolicy Name     Policy Content                                               Active\r\n--------------  -----------------------------------------------------------  -------------------\r\nsome-policy-E1  ((\"proportionalCapacity\" i50)(\"hostFailuresToTolerate\" i0))  In use by 1 volumes\r\nsome-policy-E2  ((\"proportionalCapacity\" i50)(\"hostFailuresToTolerate\" i0))  In use by 1 volumes\r\n\r\n[root@sc-rdops-vm02-dhcp-32-249:~]\r\n\r\n\r\n[root@sc-rdops-vm02-dhcp-32-249:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py ls\r\nVolume      Datastore      Created By VM  Created                   Attached To VM (name/uuid)      Policy          Capacity  Used   Disk Format  Filesystem Type  Access      Attach As             \r\n----------  -------------  -------------  ------------------------  ------------------------------  --------------  --------  -----  -----------  ---------------  ----------  ----------------------\r\nVol1VsanE1  vsanDatastore  VM1-249-Vsan1  Mon Feb 27 23:17:46 2017  detached                        some-policy-E1  500MB     256MB  thin         ext4             read-write  independent_persistent\r\nVol2VsanE1  vsanDatastore  VM1-249-Vsan1  Mon Feb 27 23:17:58 2017  detached                        some-policy-E2  500MB     256MB  thin         ext4             read-write  independent_persistent\r\n\r\n[root@sc-rdops-vm02-dhcp-32-249:~]\r\n```\r\n3. create two volumes from vm on vsan on one with policy created on E1 and another with E2\r\n```\r\nroot@photon-xVmYMbyTn [ ~ ]# docker volume create --driver=vmdk --name=Vol1VsanE2 -o size=500mb -o vsan-policy-name=some-policy-E2\r\nVol1VsanE2\r\nroot@photon-xVmYMbyTn [ ~ ]# docker volume create --driver=vmdk --name=Vol2VsanE2 -o size=500mb -o vsan-policy-name=some-policy-E2\r\nVol2VsanE2\r\nroot@photon-xVmYMbyTn [ ~ ]#\r\n```\r\n\r\n```\r\n[root@sc-rdops-vm02-dhcp-48-54:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py ls\r\nVolume      Datastore      Created By VM  Created                   Attached To VM (name/uuid)  Policy          Capacity  Used   Disk Format  Filesystem Type  Access      Attach As\r\n----------  -------------  -------------  ------------------------  --------------------------  --------------  --------  -----  -----------  ---------------  ----------  ----------------------\r\nVol1VsanE1  vsanDatastore  VM1-249-Vsan1  Mon Feb 27 23:17:46 2017  detached                    some-policy-E1  500MB     256MB  thin         ext4             read-write  independent_persistent\r\nVol2VsanE1  vsanDatastore  VM1-249-Vsan1  Mon Feb 27 23:17:58 2017  detached                    some-policy-E2  500MB     256MB  thin         ext4             read-write  independent_persistent\r\nVol1VsanE2  vsanDatastore  VM2-54-Vsan1   Mon Feb 27 23:21:07 2017  detached                    some-policy-E2  500MB     256MB  thin         ext4             read-write  independent_persistent\r\nVol2VsanE2  vsanDatastore  VM2-54-Vsan1   Mon Feb 27 23:21:20 2017  detached                    some-policy-E2  500MB     256MB  thin         ext4             read-write  independent_persistent\r\n\r\n[root@sc-rdops-vm02-dhcp-48-54:~]\r\n```\r\n\r\n4. perform attach/detach for all 4 volumes from both vms and perform data manipulation as well\r\n```\r\nroot@photon-xVmYMbyTn [ ~ ]# docker run -it --volume-driver=vmdk -v Vol1VsanE1@vsanDatastore:/vol1 -v Vol1VsanE2@vsanDatastore:/vol2 -v Vol2VsanE1@vsanDatastore:/vol3 -v Vol2VsanE2@vsanDatastore:/vol4 --name ubE1 ubuntu\r\nUnable to find image 'ubuntu:latest' locally\r\nlatest: Pulling from library/ubuntu\r\n\r\nd54efb8db41d: Pull complete\r\nf8b845f45a87: Pull complete\r\ne8db7bf7c39f: Pull complete\r\n9654c40e9079: Pull complete\r\n6d9ef359eaaa: Pull complete\r\nDigest: sha256:dd7808d8792c9841d0b460122f1acf0a2dd1f56404f8d1e56298048885e45535\r\nStatus: Downloaded newer image for ubuntu:latest\r\nroot@a2a09d754abc:/# ls\r\nbin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var  vol1  vol2  vol3  vol4\r\nroot@a2a09d754abc:/# echo \" vol1 from vm1\" > vol1/hellos\r\nroot@a2a09d754abc:/# echo \" vol2 from vm1\" > vol2/hellos\r\nroot@a2a09d754abc:/# exit\r\nexit\r\nroot@photon-xVmYMbyTn [ ~ ]#\r\n```\r\n```\r\nroot@photon-xVmYMbyTn [ ~ ]# docker run -it --volume-driver=vmdk -v Vol1VsanE1@vsanDatastore:/vol1 -v Vol1VsanE2@vsanDatastore:/vol2 -v Vol2VsanE1@vsanDatastore:/vol3 -v Vol2VsanE2@vsanDatastore:/vol4 --name ubE2 ubuntu\r\nroot@9bfc575610dd:/# ls\r\nbin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var  vol1  vol2  vol3  vol4\r\nroot@9bfc575610dd:/# cat vol1/hellos\r\n vol1 from vm1\r\nroot@9bfc575610dd:/# cat vol2/hellos\r\n vol2 from vm1\r\nroot@9bfc575610dd:/# echo \" vol3 from vm2\" > vol3/hellos\r\nroot@9bfc575610dd:/# echo \" vol4 from vm2\" > vol4/hellos\r\nroot@9bfc575610dd:/# exit\r\nexit\r\nroot@photon-xVmYMbyTn [ ~ ]#\r\n```\r\n5. on vm3_vsan_E1: remove volumes created by vm4_vsan_E2\r\n```\r\nroot@photon-xVmYMbyTn [ ~ ]# docker stop $(docker ps -a -q)\r\na2a09d754abc\r\nroot@photon-xVmYMbyTn [ ~ ]# docker rm $(docker ps -a -q)\r\na2a09d754abc\r\nroot@photon-xVmYMbyTn [ ~ ]# docker volume rm Vol1VsanE2@vsanDatastore Vol2VsanE2@vsanDatastore\r\nVol1VsanE2@vsanDatastore\r\nVol2VsanE2@vsanDatastore\r\nroot@photon-xVmYMbyTn [ ~ ]#\r\n```\r\n6. On vm4_vsan_E2: remove volumes created by vm3_vsan_E1\r\n```\r\nroot@photon-xVmYMbyTn [ ~ ]# docker stop $(docker ps -a -q)\r\n9bfc575610dd\r\nroot@photon-xVmYMbyTn [ ~ ]# docker rm $(docker ps -a -q)\r\n9bfc575610dd\r\nroot@photon-xVmYMbyTn [ ~ ]# docker volume rm Vol1VsanE1@vsanDatastore Vol2VsanE1@vsanDatastore\r\nVol1VsanE1@vsanDatastore\r\nVol2VsanE1@vsanDatastore\r\nroot@photon-xVmYMbyTn [ ~ ]#\r\n```"}}
{"actor":{"display_login":"ashahi1"}}