Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Fix KV files on clone. #2077

Merged
merged 5 commits into from Mar 27, 2018
Merged

Fix KV files on clone. #2077

merged 5 commits into from Mar 27, 2018

Conversation

govint
Copy link
Contributor

@govint govint commented Mar 18, 2018

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
Copy link
Contributor Author

govint commented Mar 18, 2018

Fixes #2074

Copy link
Contributor

@shuklanirdesh82 shuklanirdesh82 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Please merge after getting the CI green and addressing a minor comment.

# Fix up the KV for the destination
# Clone creates side cars with a random key and hence filename
# which need more work to figure out and use each time a volume
# op is performed. Remove the side car that hte clone created
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: hte => the

@govint
Copy link
Contributor Author

govint commented Mar 19, 2018

@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
Copy link
Contributor

#2077 (comment)

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

@ashahi1
Copy link
Contributor

ashahi1 commented Mar 19, 2018

#2077 (comment)
@shuklanirdesh82 looking at it.

@ashahi1
Copy link
Contributor

ashahi1 commented Mar 20, 2018

@ashahi1
Copy link
Contributor

ashahi1 commented Mar 27, 2018

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants