chef / knife-windows

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

knife winrm stops after 10 nodes #351

Closed spuder closed 8 years ago

spuder commented 8 years ago

Using knife winrm only executes on the first 10 nodes.

I have 25+ windows web servers, yet when I try and run the following, it quickly returns 10 nodes, and then stops

knife winrm "role:web-default" "hostname" -x example.com\foo
Enter your password:
WARNING: Unsupported version of httpclient. The supported major version of library is httpclient version 2.6. This code path monkey patches few methods in httpclient to support additional features. This could possibly work, but it is advised to extensively test your version. If you are aware of the impact of using 2.7.0, this warning can be disabled by setting USE_HTTPCLIENT_MAJOR to the major version 2.7.
lab-web39.ndlab.local lab-web39
lab-web39.ndlab.local
swat-ndr59.ndlab.local swat-ndr59
swat-ndr59.ndlab.local
lab-web23.ndlab.local lab-web23
lab-web23.ndlab.local
lab-web29.ndlab.local lab-web29
lab-web29.ndlab.local
qa-ecm2b.ndlab.local qa-ecm2b
qa-ecm2b.ndlab.local
lab-web30.ndlab.local lab-web30
lab-web30.ndlab.local
swat-ndr55.ndlab.local swat-ndr55
swat-ndr55.ndlab.local
swat-ndr63.ndlab.local swat-ndr63
swat-ndr63.ndlab.local
qa-ducotb.ndlab.local qa-ducotb
qa-ducotb.ndlab.local
swat-ndr50.ndlab.local swat-ndr50
swat-ndr50.ndlab.local
Terminate batch job (Y/N)? y
knife --version
Chef: 12.5.1
chefdk --version

I can reproduce this on both Windows and MacOSX using chefdk 0.10.0. Passing in the -V flag does not provide any additional information.

mwrock commented 8 years ago

Could you try with knife-windows 1.3.0?

spuder commented 8 years ago

Good idea. I just upgraded knife winrm to 1.7.0 and knife-windows to 1.3.0 on both my Mac and Windows workstations.

Ran the same command again with the same results on both machines. The first 10 nodes return, and then it seems to just freeze.

winrm2

mwrock commented 8 years ago

weird the warning at the beginning about httpclient version indicates this is an older knife-windows than 1.3. Could you try using chef gem if you agve the chefdk?

chef gem install knife-windows

Thanks!

spuder commented 8 years ago

I ran chef gem install knife-windows again. I can no longer reproduce this. Very strange since I can visually see in my history that I ran that same command yesterday.

Guess you have to install the gem twice.

mwrock commented 8 years ago

who knows...maybe you ran gem instead of chef gem which may not have updated the right spot. Ruby...so crazy. Anyways glad it is working.