chef / knife-windows

Plugin for Chef's knife tool for working with Windows nodes
Apache License 2.0
152 stars 110 forks source link

Windows arch detection during bootstrap is incorrect for 32-bit #382

Closed glasschef closed 8 years ago

glasschef commented 8 years ago

Windows arch detection during bootstrap checks for X86 when it's actually x86 (in 32-bit Windows 7, at least, possibly other versions) so it falls back to 64-bit install, which can't install:

https://github.com/chef/knife-windows/blob/710bceb8c7c17cdde8f6f59591add920ce1d9d33/lib/chef/knife/bootstrap_windows_base.rb#L438

knife-windows Version

1.5.0

Platform Version

Windows 7 32-bit

Replication Case

Attempt a knife windows bootstrap winrm of 32bit Windows with the knife-windows plugin 1.5.0

Client Output

DEBUG: 10.211.192.138[552B1929-8A47-4272-A6D8-A933EA4BC9EF] => :run_command[echo %PROCESSOR_ARCHITECTURE%]
10.211.192.138 x86

...

10.211.192.138 powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File  C:\chef\wget.ps1 "https://www.chef.io/chef/download?p=windows&pv=2008r2&m=x86_64&DownloadContext=PowerShell&v=12" "C:\Users\clhadmin\AppData\Local\Temp\chef-client-latest.msi"

Stacktrace

10.211.192.155 C:\Users\clhadmin>msiexec /qn /log "C:\Users\clhadmin\AppData\Local\Temp\chef-client-msi5504.log" /i "C:\Users\clhadmin\AppData\Local\Temp\chef-client-latest.msi"
10.211.192.155 T h i s   i n s t a l l a t i o n   p a c k a g e   i s   n o t   s u p p o r t e d   b y   t h i s   p r o c e s s o r   t y p e .   C o n t a c t   y o u r   p r o d u c t   v e n d o r .
10.211.192.155
NimishaS commented 8 years ago

This issue gets fixed in https://github.com/chef/knife-windows/pull/380

charlesjohnson commented 8 years ago

Fixed via #380, #384.