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

Fix KV files on clone. #2077

Closed govint closed 6 years ago

govint commented 6 years ago

From ESX 6.5 onwards, the sidecars for the clone destination get created with a random key vs. the key thats used to create the source sidecars. Which is why the ESX service was unable to open and read/write the file after clone. Effectively clone was broken in 6.5 and later.

Fixed and now able to clone volumes fine.

docker volume ls DRIVER VOLUME NAME vsphere:latest test@datastore1

docker volume create -d vsphere clone -o clone-from=test clone

docker volume inspect clone [ { "Driver": "vsphere:latest", "Labels": {}, "Mountpoint": "/mnt/vmdk/clone/", "Name": "clone", "Options": { "clone-from": "test" }, "Scope": "global", "Status": { "access": "read-write", "attach-as": "independent_persistent", "capacity": { "allocated": "13MB", "size": "100MB" }, "clone-from": "test", "created": "Sun Mar 18 19:28:08 2018", "created by VM": "ubuntu-VM2.3 (1)", "datastore": "datastore1", "diskformat": "thin", "fstype": "ext4", "status": "detached" } } ]

govint commented 6 years ago

Fixes #2074

govint commented 6 years ago

@shuklanirdesh82, the build seems to fail with all products VDVS, vFile and Windows, with error

Problem accessing /job/VDVS%20Multibranch%20Pipeline%20-%20Temp/job/PR-2077/1/display/redirect. Reason: Not Found

Anyway I can restart the build

shuklanirdesh82 commented 6 years ago

https://github.com/vmware/vsphere-storage-for-docker/pull/2077#issuecomment-374331614

@ashahi1 can you please take a look at this CI failure?

ashahi1 commented 6 years ago

https://github.com/vmware/vsphere-storage-for-docker/pull/2077#issuecomment-374381718 @shuklanirdesh82 looking at it.

ashahi1 commented 6 years ago

Tests have started: http://hatchway.svc.eng.vmware.com/job/VDVS%20Multibranch%20Pipeline%20-%20Temp/view/change-requests/job/PR-2077/8/console

ashahi1 commented 6 years ago

All tests passed with latest changes.

Test results:

=> Running target test-esx Mon Mar 26 12:14:29 PDT 2018

OK
# ssh -i /Users/ashahi/.ssh/id_rsa -kTax -o StrictHostKeyChecking=no root@10.161.42.160 rm -rf /tmp/vmdk_ops_unittest10104

=> Running target test-vm Mon Mar 26 12:22:07 PDT 2018
=== RUN   TestCommands
time="2018-03-26T12:22:00-07:00" level=info msg="Directory doesn't exist, creating it " path="/tmp/docker-volumes/18155"
Detaching loopback device /dev/loop1001
Detaching loopback device /dev/loop1001
Detaching loopback device /dev/loop1001
--- PASS: TestCommands (0.89s)
    cmd_linux_test.go:30:
        Creating Test Volume with name = [TestVol]...
PASS
coverage: 40.7% of statements
=== RUN   TestSanity
2018-03-26T12:22:01-07:00 START: Running TestSanity on  tcp://10.161.63.129:2375 (may take a while)...
2018-03-26T12:22:08-07:00 END: Running TestSanity on  tcp://10.161.63.129:2375 (may take a while)...
--- PASS: TestSanity (7.10s)
--- PASS: TestConcurrency (23.41s)
    sanity_test.go:209: Successfully connected to tcp://10.161.63.129:2375
    sanity_test.go:209: Successfully connected to tcp://10.161.45.193:2375
PASS
Test results:

=> Running target test-e2e-runalways Mon Mar 26 19:24:48 UTC 2018
OK: 6 passed
--- PASS: Test (134.44s)
PASS

=> Running target test-e2e-runonce Mon Mar 26 19:27:05 UTC 2018
--- PASS: Test (1718.28s)
PASS
OK: 51 passed