Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nodejs_npm WinRM timeout in test-kitchen on Windows #148

Closed
glennmate opened this issue Dec 9, 2016 · 1 comment
Closed

nodejs_npm WinRM timeout in test-kitchen on Windows #148

glennmate opened this issue Dec 9, 2016 · 1 comment

Comments

@glennmate
Copy link

I know this is a bit out of scope for what the cookbook supports, but figured I'd raise an issue to see if anyone has seen this behavior. I'm currently using a homegrown cookbook to install NPM for windows. Given that npm is available via a shellout, I should be able to use the nodejs_npm resource to install NPM packages (nothing contained within this LWRP is OS-specific).

Using test-kitchen, when using resource nodejs_npm 'gulp' I find the debug output:

       [2016-12-09T07:24:40+00:00] DEBUG: Providers for generic execute resource enabled on node include: [Chef::Provider::Execute]
       [2016-12-09T07:24:40+00:00] DEBUG: Provider for action run on resource execute[install NPM package gulp] is Chef::Provider::Execute

             [execute] npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
                npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
                npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls gr
aceful-fs' to find it in the tree.
                C:\Users\azure\AppData\Roaming\npm\gulp -> C:\Users\azure\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js
                C:\Users\azure\AppData\Roaming\npm
                `-- gulp@3.9.1

D      [WinRM] retrying receive request after timeout

When logging in locally and running the same command npm install -g gulp I get the below output:

PS C:\Users\azure> npm install -g gulp
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update t
o graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
C:\Users\azure\AppData\Roaming\npm\gulp -> C:\Users\azure\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js
C:\Users\azure\AppData\Roaming\npm
`-- gulp@3.9.1

PS C:\Users\azure>

Outputs are the same, it just seems that WinRM doesn't release the shell back to Chef after the command is done installing. Anyone seen this issue before? It may be nodejs specific.

@glennmate
Copy link
Author

Appears to be an issue with the way nodejs_npm is checking for packages on windows; it's obviously not supported in this cookbook. I'm going to be forking this and making some changes to accommodate windows for my specific use case (won't likely result in a PR fix as I'm going to break some logic that makes linux installation nonfunctional).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant