[英]knife bootstrap silent fail on windows 2008 x86
I use knife bootstrap on windows 2008 x86 server is silent fail. 我在Windows 2008 x86服务器上使用小刀引导程序失败。 It created windows batch file, but the batch file not executed and return code is 0. 它创建了Windows批处理文件,但该批处理文件未执行,返回码为0。
the version info is 版本信息是
knife-windows version:1.4.1 winrm version:1.8.1 刀-Windows版本:1.4.1 Winrm版本:1.8.1
and after digging, I think found that. 经过挖掘,我认为发现了这一点。 on knife-windows source code lib/chef/knife/winrm_session.rb "relay_command" method 在Windows Server上的源代码lib / chef / knife / winrm_session.rb“ relay_command”方法
remote_id = @winrm_session.open_shell
command_id = @winrm_session.run_command(remote_id, command)
=> it's not run batch file. =>它没有运行批处理文件。 just exit code is 0, and run other command is OK 只需退出代码为0,然后运行其他命令就可以了
@winrm_session.create_executor do |executor|
executor.run_cmd(cmd) do |stdout, stderr|
Chef::Log.info(cmdstdout)
Chef::Log.error(cmdstderr)
end
end
=> it's ok to run batch file. =>可以运行批处理文件。 but lt's bad idea because can't get real time log 但是这是个坏主意,因为无法获取实时日志
sound like the it is winrm_session run_command bug. 听起来像是winrm_session run_command错误。 but I'm not sure. 但我不确定。 how to fix this? 如何解决这个问题?
thanks. 谢谢。
它是通过https://github.com/chef/knife-windows/pull/389修复的,因此,当将knife-windows更新到最新版本时,就可以了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.