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

Enables Mkdir and adds Mount, Unmount impl for Windows #1614

Merged

Conversation

venilnoronha
Copy link
Contributor

@venilnoronha venilnoronha commented Jul 20, 2017

Description

This PR enables directory creation, volume mounting and unmounting on the Windows platform.

  • Moves common Mkdir(..) from fs_linux.go to fs.go.
  • Adds PowerShell based Mount(..) and Unmount(..) impl to fs_windows.go.

Note: Go doesn't implement syscall.Mount(..) and syscall.Unmount(..) for Windows.

Output

Create Volume
screen shot 2017-07-20 at 12 34 49 pm

List Volumes
screen shot 2017-07-20 at 12 32 59 pm

Inspect Volume
screen shot 2017-07-20 at 12 33 43 pm

Attach Volume
screen shot 2017-07-20 at 1 06 54 pm

Create File (within Container)
screen shot 2017-07-20 at 1 06 26 pm

Verify File (from Host)
screen shot 2017-07-20 at 12 34 02 pm

Remove Volume
screen shot 2017-07-20 at 12 35 51 pm

Test Results

The test-all target passes locally, and following is the tail'd output.

--- PASS: TestCommands (0.68s)
	cmd_linux_test.go:30: 
		Creating Test Volume with name = [TestVol]...
PASS
coverage: 40.7% of statements
ssh  -kTax -o StrictHostKeyChecking=no root@10.192.122.236 /tmp/docker-volume-vsphere/docker-volume-vsphere.test -test.v \
		-v DefaultTestVol \
		-H1 tcp://10.192.122.236:2375 -H2 tcp://10.192.108.211:2375
=== RUN   TestSanity
2017-07-20T13:17:37-07:00 START: Running TestSanity on  tcp://10.192.122.236:2375 (may take a while)...
2017-07-20T13:17:43-07:00 END: Running TestSanity on  tcp://10.192.122.236:2375 (may take a while)...
--- PASS: TestSanity (5.79s)
	sanity_test.go:207: Successfully connected to tcp://10.192.122.236:2375
	sanity_test.go:207: Successfully connected to tcp://10.192.108.211:2375
	sanity_test.go:225: Creating vol=DefaultTestVol on client tcp://10.192.122.236:2375.
	sanity_test.go:111: Running cmd=&[touch /mnt/testvol/DefaultTestVol/file_to_touch] with vol=DefaultTestVol on client tcp://10.192.122.236:2375
	sanity_test.go:111: Running cmd=&[stat /mnt/testvol/DefaultTestVol/file_to_touch] with vol=DefaultTestVol on client tcp://10.192.122.236:2375
=== RUN   TestConcurrency
2017-07-20T13:17:43-07:00 Running concurrent tests on tcp://10.192.122.236:2375 and tcp://10.192.108.211:2375 (may take a while)...
2017-07-20T13:17:43-07:00 START: Running create/delete multi-host concurrent test ...
2017-07-20T13:17:52-07:00 END: Running create/delete multi-host concurrent test ...
Running same docker host concurrent create/delete test on tcp://10.192.122.236:2375...
2017-07-20T13:17:57-07:00 START: Running clone concurrent test...
2017-07-20T13:18:06-07:00 END: Running clone concurrent test...
--- PASS: TestConcurrency (22.83s)
	sanity_test.go:207: Successfully connected to tcp://10.192.122.236:2375
	sanity_test.go:207: Successfully connected to tcp://10.192.108.211:2375
PASS
coverage: 0.0% of statements

Copy link
Contributor

@shaominchen shaominchen left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Contributor

@msterin msterin left a comment

Choose a reason for hiding this comment

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

LGTM pending CI pass.
Performance is not good but we will rely on #1553 for perf improvements. I've change #1553 to P0

This commit enables directory creation, volume mounting and
unmounting on the Windows platform.

* Moves common Mkdir from fs_linux.go to fs.go.
* Adds PowerShell based Mount and Unmount impl to fs_windows.go.
@venilnoronha venilnoronha merged commit 5a7d3a6 into vmware-archive:master Jul 21, 2017
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants