-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
fixed: win_copy failure from a VirtualBox share to a local path #33576
fixed: win_copy failure from a VirtualBox share to a local path #33576
Conversation
Looks like VirtualBox doesn't uses SMBv1 when presenting a network share and that doesn't support enumerating ACL's hence the error. We've spoken about this internally and think we should just get rid of the ACL stuff in
If you can update your PR to remove the ACL stuff we can merge and backport to 2.4. |
In the case when a source file/folder is on a VirtualBox share then win_copy task fails. E.g. - name: Copy file from VirtualBox share win_copy: src: \\vboxsvr\share\file dest: c:\local\path remote_src: true The reason is that .GetAccessControl method fails somehow for a file/folder on a VirtualBox share. PS c:\Users\vboxuser> $file = Get-Item -Path \\vboxsvr\share\file PS c:\Users\vboxuser> $file.GetAccessControl(); Exception calling "GetAccessControl" with "0" argument(s): "Method failed with unexpected error code 1." ... <Jordan Borean (jborean93@gmail.com)> (@jborean93) said (see GitHub PR !33576): > ... we should just get rid of the ACL stuff in win_copy because; > > - There is a bug right now and it isn't actually working > - When copying a file in Windows manually, it does not bring across the > ACL of the source file anyway > - We can add in a future option that copies the ACL but we should set a > flag instead to do this So, remove the ACL stuff Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com> Reviewed-by: <Jordan Borean (jborean93@gmail.com)>
220d8cc
to
185bdeb
Compare
@jborean93, Thank you I've updated the PR. Removed the ACL stuff and updated the commit message. |
(cherry picked from commit f136567)
Thanks for the fix @ashumkin, I've cherry-picked the changes to the stable-2.4 branch so it will be available in the 2.4.3.0 beta 1 release. |
SUMMARY
In the case when a source file/folder is on a VirtualBox share then
win_copy
task fails.ISSUE TYPE
COMPONENT NAME
lib/ansible/modules/windows/win_copy.ps1
ANSIBLE VERSION
ADDITIONAL INFORMATION
Create a playbook with a
win_copy
taskRun it against a host
At first time task fails. But file
c:\local\path
appears (as it intended to). Subsequent task calls succeed (as file already exists).before
The reason is that
.GetAccessControl
method fails somehow for a file/folder on a VirtualBox share.Fix it by suppressing the error, just print out a warning.
after