【问题标题】:knife bootstrap silent fail on windows 2008 x86在 Windows 2008 x86 上刀引导静默失败
【发布时间】:2016-06-25 10:00:06
【问题描述】:

我在 windows 2008 x86 服务器上使用刀引导程序是静默失败。 它创建了windows批处理文件,但是批处理文件没有执行,返回码为0。

版本信息是

knife-windows 版本:1.4.1 winrm版本:1.8.1

在挖掘之后,我认为找到了。关于刀窗源代码 lib/chef/knife/winrm_session.rb "relay_command" 方法

remote_id = @winrm_session.open_shell
command_id = @winrm_session.run_command(remote_id, command)

=> 它没有运行批处理文件。退出码为0,运行其他命令即可

@winrm_session.create_executor do |executor|
  executor.run_cmd(cmd) do |stdout, stderr|
     Chef::Log.info(cmdstdout)
     Chef::Log.error(cmdstderr)
  end
end

=> 可以运行批处理文件。但这是个坏主意,因为无法获取实时日志

听起来像是 winrm_session run_command 错误。但我不确定。 如何解决这个问题?

谢谢。

【问题讨论】:

    标签: ruby windows x86 chef-infra winrm


    【解决方案1】:

    已通过https://github.com/chef/knife-windows/pull/389 修复 所以当knife-windows更新到最新版本时,就可以了。

    【讨论】:

      猜你喜欢
      • 2017-10-06
      • 1970-01-01
      • 1970-01-01
      • 2011-06-04
      • 1970-01-01
      • 1970-01-01
      • 2015-11-29
      • 1970-01-01
      • 2011-09-29
      相关资源
      最近更新 更多