There must be some broader issue of Ruby on my windows PC. I tried to run a knife command and got no output and it never completed.
It was a simple bootstrap for a single trivial cookbook. It never produced any output and ran in the ChefDK Powershell window for more than 12 hours.
I launched another cloud vm configured the client, copied all the files from the windows chefDK to the cloud vm new workstation, and was able to run the same knife bootstrap back to the same node I was trying to bootstrap from the windows ChefDK.
If I was going to dig into why the knife command never gets any output to STDOUT and hangs forever, do you have any pointers on how might I do that? tracing a command in powershell? tracing ruby execution?
Job
btm Chef Software Staff
November 29 |
Ruby is slower on Windows, but it shouldn’t be 10x slower.
Are you using the ChefDK Powershell that is added to the start menu, or are you opening powershell directly?
Have you watched the performance monitor to see if your disk, memory, or CPU bound?
What does Measure-Command { chef } in powershell return for time?
Visit Topic or reply to this email to respond.
You are receiving this because you enabled mailing list mode.
One thing I would do is run the knife command with -VV to get debug output to see if anything is emitted before the hang. I’d also look to see if the ruby process is running at all if no output is generated still.
-vv on Windows doesn’t seem to work. I can use --verbose or -V, but not the -vv (maximum verbosity), it doesn’t seem to understand that.
I’m a newbie to chef. my chef knife commands were using --attributes ipaddress, instead of the default of FQDN if you exclude it.
turning on verbose issued a warning showing me that because of the attribute i was passing to the knife ssh command (ipaddress), it was using the virtual cloud networks private IP in the SSH connection, causing a timeout. However, when I ran that same command in a cloud based workstation in the same virtual cloud network as the Chef Server and node, it didn’t have trouble resolving them.
It also seems that powershell though buffers all output to STDOUT. In other words, I don’t get any output to the screen, until the command finishes, at which point, I see everything it was doing during its run-time execution.
I’m sure I can figure out how to fix that.
There is definitely something amiss here and it isn’t buffering.
If I run a measure command on a knife node list command it take about 20 seconds.
A packet trace indicates that the actual request wasn’t issued to the chef server until after 18s
A single thread worth of CPU is consumed for those 18 seconds
This is also after a knife rehash, prior to that it was 48 seconds for the same command.
It is verging on unusable.
Terraform chef provider seems to be able to issue commands in rapid succession so it is all down to the ruby compile/interpretation or whatever it does. Replicated on numerous environments so it isn’t down to my build.
I am surprised there hasn’t been a revolt about this so I can only assume it doesn’t affect everybody…not sure where to go from here, I did do a procmon trace which I now can’t lay my hands on, no single thing jumped out at me but it did seem like it was doing the same thing over and over in a loop.
@ken.gaul Since you are necro-ing a thread from a long while ago, it would help if you specified which version of ChefDK you are running and which version of Windows.
Same thing for me on Windows 10 . I usually use CentOS or Ubuntu and this is a brand new W10 laptop, 32 GB of RAM and a quad core CPU.
As stated previously, borderline unusable.
This is an issue with the way ruby is compiled for windows. There are some ways people have tried to use WSL to get around the problem or a linux virtual machine is an option as well.