Skip to content

Kitchen converge fails on Windows 10 syncing initial cookbooks #407

@brandonhawbaker

Description

@brandonhawbaker

System Information:

Host: Windows 10 Enterprise
Guest: Windows 10 Enterprise (Custom Virtual Box)
Kitchen: 2.2.5
ChefDK: 4.2.0
Chef Infra Client version: 15.1.36
Ruby: 2.6.3p62 (2019-04-16 revision 67580) [x64-mingw32]
Vagrant: 2.2.4
Kitchen-Vagrant: 1.5.2

I create a Windows 10 box, which works fine with vagrant up, etc. Chef can connect to the box and run commands, but the kitchen converge command only succeeds if I pre-create the c:\tmp\kitchen\cookbooks directory, otherwise I get the following:

>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Failed to complete #converge action: [[WinRM::FS::Core::FileTransporter] Upload failed (exitcode: 0), but stderr present
Cannot create "C:\tmp\kitchen" because a file or directory with the same name already exists.
At line:12 char:40
+   $path | ? {-not (test-path $_)} | % {$null = mkdir $_}
+                                        ~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (C:\tmp\kitchen\cookbooks:String) [New-Item], IOException
    + FullyQualifiedErrorId : CreateDirectoryIOError,Microsoft.PowerShell.Commands.NewItemCommand
Could not find a part of the path 'C:\tmp\kitchen\cookbooks\'.
At line:47 char:17
+   dir $unpack | cp -dest "$dst/" -force -recurse
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (metadata.rb:FileInfo) [Copy-Item], DirectoryNotFoundException
    + FullyQualifiedErrorId : CopyDirectoryInfoItemIOError,Microsoft.PowerShell.Commands.CopyItemCommand
Could not find a part of the path 'C:\tmp\kitchen\cookbooks\'.
At line:47 char:17
+   dir $unpack | cp -dest "$dst/" -force -recurse
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (README.md:FileInfo) [Copy-Item], DirectoryNotFoundException
    + FullyQualifiedErrorId : CopyDirectoryInfoItemIOError,Microsoft.PowerShell.Commands.CopyItemCommand
Could not find a part of the path 'C:\tmp\kitchen\cookbooks\'.
At line:47 char:17
+   dir $unpack | cp -dest "$dst/" -force -recurse
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (default.rb:FileInfo) [Copy-Item], DirectoryNotFoundException
    + FullyQualifiedErrorId : CopyDirectoryInfoItemIOError,Microsoft.PowerShell.Commands.CopyItemCommand
Cannot create "C:\tmp\kitchen" because a file or directory with the same name already exists.
At line:12 char:40
+   $path | ? {-not (test-path $_)} | % {$null = mkdir $_}
+                                        ~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (C:\tmp\kitchen\cache:String) [New-Item], IOException
    + FullyQualifiedErrorId : CreateDirectoryIOError,Microsoft.PowerShell.Commands.NewItemCommand
] on default-BPA-TEST
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions