簡體   English   中英

Windows 2008 x86上的刀引導程序靜音失敗

[英]knife bootstrap silent fail on windows 2008 x86

我在Windows 2008 x86服務器上使用小刀引導程序失敗。 它創建了Windows批處理文件,但該批處理文件未執行,返回碼為0。

版本信息是

刀-Windows版本:1.4.1 Winrm版本:1.8.1

經過挖掘,我認為發現了這一點。 在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)

=>它沒有運行批處理文件。 只需退出代碼為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錯誤。 但我不確定。 如何解決這個問題?

謝謝。

它是通過https://github.com/chef/knife-windows/pull/389修復的,因此,當將knife-windows更新到最新版本時,就可以了。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM