Hi, I’m not sure what is going on here. I’ve tried the original recipe with the mods recommended by Microsoft in their article on getting WinRM to perform doublehops but
to no avail, same error everytime. I’ve also tried to use mount and file: “pathto = "\\dll.drops\\" + fname #copy = "\\\\" + managementServer + path + fname #Chef::Log.warn("Copying with #{copy}") Dir.chdir("d:/installs/") mount "T:" do action :mount device "\\\\#{managementServer}\\server.installs" end puts Dir.pwd Dir.chdir("T:") File "d:/installs/#{fname}" do atomic_update false content ::File.open(pathto).read end” Now I get an error when it tries to chdir to T: It is still acting as if the mount is not there or could not connect but I have nothing in the logs to back this up. I have the knife
command verbosed and the chef-client end in debug but I am getting nothing about a successful mapped drive or not. Here is knife output: “ATLQ-CHEF04.my.domain DEBUG: :relay_output_from_backend => ["ATLQ-CHEF04.my.domain", "\r\n================================================================================\r\nRecipe
Compile Error in c:/chef/cache/cookbooks/AW_DLLDrop/recipes/default.rb\r\n================================================================================\r\n\r\nErrno::ENOENT\r\n-------------\r\nNo such file or directory - T:\r\n\r\nCookbook Trace:\r\n---------------\r\n
c:/chef/cache/cookbooks/AW_DLLDrop/recipes/default.rb:37:in `chdir'\r\n c:/chef/cache/cookbooks/AW_DLLDrop/recipes/default.rb:37:in `from_file'\r\n\r\nRelevant File Content:\r\n----------------------\r\nc:/chef/cache/cookbooks/AW_DLLDrop/recipes/default.rb:\r\n\r\n
30: #Chef::Log.warn(\"Copying with \#{copy}\")\r\n 31: Dir.chdir(\"d:/installs/\")\r\n 32: mount \"T:\" do\r\n 33: action :mount\r\n 34: device \"\\\\\\\\\#{managementServer}\\\\server.installs\"\r\n 35: end\r\n 36: puts Dir.pwd\r\n 37>> Dir.chdir(\"T:\")\r\n
38: File \"d:/installs/\#{fname}\" do \r\n 39: atomic_update false\r\n 40: content ::File.open(pathto).read\r\n 41: end\r\n 42: \r\n 43: #unless File.exists?(\"D:\\installs\\\#{fname}\")\r\n 44: # batch 'dlldrop' do\r\n 45: # code copy\r\n
46: # action :run\r\n\r\n"] ATLQ-CHEF04.my.domain ATLQ-CHEF04.my.domain ================================================================================ ATLQ-CHEF04.my.domain Recipe Compile Error in c:/chef/cache/cookbooks/AW_DLLDrop/recipes/default.rb ATLQ-CHEF04.my.domain ================================================================================ ATLQ-CHEF04.my.domainDEBUG: ATLQ-CHEF04.my.domain[F51C4F0F-1E18-4147-8498-054B6B7A28B4] => :command_cleanup[chef-client -l debug
-L c:\chef\debug.log -c c:/chef/client.rb] ATLQ-CHEF04.my.domain Errno::ENOENT ATLQ-CHEF04.my.domain ------------- ATLQ-CHEF04.my.domain No such file or directory - T: ATLQ-CHEF04.my.domain ATLQ-CHEF04.my.domain Cookbook Trace: ATLQ-CHEF04.my.domain --------------- ATLQ-CHEF04.my.domain c:/chef/cache/cookbooks/AW_DLLDrop/recipes/default.rb:37:in `chdir' ATLQ-CHEF04.my.domain c:/chef/cache/cookbooks/AW_DLLDrop/recipes/default.rb:37:in `from_file' ATLQ-CHEF04.my.domain” Is there some way to get more output from it? From: Tensibai [mailto:
Le 2014-08-07 18:52,
">
a écrit :
Hi, Your problem is probably the multi-hop limitation in winrm http://msdn.microsoft.com/en-us/library/ee309365(v=vs.85).aspx I did get around this using the mount ressource and a file resource to manage file from network shares (The latest chef client (11.14.2 IIRC) has a fix about the file uri
file:///c:/ for ruby cp to work fine.) Hope this helps. |
Archive powered by MHonArc 2.6.16.