Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drive has not been shared exception for mapped drives #5958

Closed
2 tasks
milolav opened this issue Mar 7, 2020 · 3 comments
Closed
2 tasks

Drive has not been shared exception for mapped drives #5958

milolav opened this issue Mar 7, 2020 · 3 comments

Comments

@milolav
Copy link

milolav commented Mar 7, 2020

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID:

Expected behavior

Starts container normally

Actual behavior

Throws "Drive has not been shared" exception

Information

I have drive V permanently mapped to E:\Virtual folder through registry

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices]
"V:"="\\??\\E:\\Virtual"

and I start container like docker run --rm -it -v v:\test1:/test1 alpine sh

That worked fine previously (docker 2.1.0.X) with windows shares, but it is not working anymore in the 2.2.0.X version with the new file sharing in place.

[19:13:17.911][ApiProxy          ][Info   ] time="2020-03-07T19:13:17Z" msg="proxy >> HEAD /_ping\n"
[19:13:17.913][ApiProxy          ][Info   ] time="2020-03-07T19:13:17Z" msg="proxy << HEAD /_ping (1.9633ms)\n"
[19:13:17.928][ApiProxy          ][Info   ] time="2020-03-07T19:13:17Z" msg="proxy >> POST /v1.40/containers/create\n"
[19:13:17.936][APIRequestLogger  ][Info   ] [d4ab6b9f] <Server start> POST http://unix/usage
[19:13:17.937][APIRequestLogger  ][Info   ] [d4ab6b9f] <Server end> POST http://unix/usage -> 200 OK (took 0ms)
[19:13:17.939][APIRequestLogger  ][Info   ] [715782fa] <Server start> POST http://unix/drive/share
[19:13:17.956][HttpExceptionLogger][Error  ] Unhandled exception: Drive has not been shared    at Docker.ApiServices.Mounting.DriveSharing.<Share>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.HttpApi.Controllers.DriveController.<ShareDrive>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__1`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()
[19:13:17.956][APIRequestLogger  ][Info   ] [715782fa] <Server end> POST http://unix/drive/share -> 500 InternalServerError (took 16ms)
[19:13:17.957][ApiProxy          ][Info   ] time="2020-03-07T19:13:17Z" msg="status code not OK but 500: {\"Message\":\"Unhandled exception: Drive has not been shared\"}"

Workaround is to enable drive E for file sharing in Docker settings. After that everything works using V drive letter paths like in the example above. Drive V doesn't even need to be enabled for file sharing in Docker settings.

  • Windows Version: Windows 10 Pro 1909 Build 18363.657
  • Docker Desktop Version: 2.2.0.3 (42716)
  • Are you running inside a virtualized Windows e.g. on a cloud server or on a mac VM: No

Steps to reproduce the behavior

  1. Map folder as drive through registry
  2. Reboot
  3. Mark drive available for file sharing in Docker settings
  4. Run a container mounting folder from that drive
@kazu1130
Copy link

kazu1130 commented Mar 19, 2020

I’m same.
v2.2.0.4(43472).

Is this by design?

@docker-robott
Copy link
Collaborator

Issues go stale after 90 days of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30 days of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Aug 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants