Comments (14)
Please let me know if v3.0.2 fixed this issue
from nssm.
Hi @dhoer, tried with version 3.0.2 and this is still an issue. Thanks for looking into it.
from nssm.
What platform and chef-client version is this occurring on?
from nssm.
This is on Windows Server 2012R2 with Chef 12.21.1
from nssm.
Does changing the attribute from ENV['WINDIR']
to '%WINDIR%'
fix the issue?
from nssm.
From #chef irc chat: <@cheeseplus> dhoer: based on my reading of that that, the place they're trying to put the file doesn't already exist
from nssm.
IMHO this is not completly related to nssm
cookbook but more due to consul
cookbook weird usage.
In consul cookbook the nssm.install_location
value is overridden from ENV['WINDIR']
to %WINDIR%
(https://github.com/johnbellone/consul-cookbook/blob/master/recipes/default.rb#L7)
I agreeat that it appears that a recent change in nssm
broke consul
behavior, but the faulty line in consul
cookbook shouldn't be here :)
I'm preparing a PR for the consul
cookbook to be compatible with #21
from nssm.
Has that PR been submitted to consul cookbook?
from nssm.
Not yet, I'm waiting for @dhoer to release the 4.0 version of nssm cookbook ^^
from nssm.
Understandable - do you know offhand what the last working pin would be? nssm 3.0.0 + consul 3.0.0? Looks like the referenced line (overriding install_location
to %WINDIR%
) has been around a long time.
from nssm.
the change from %WINDIR% to ENV['WINDIR'] was because on some systems it was failing to expand the %WINDIR% into the correct path. In ruby the correct method for getting environment variables is using the ENV[] syntax as that will work reliably.
This is from my experience in using the environment variables.
from nssm.
@aprice Also to answer your question, from what i can tell i think this issue might be chef version dependent because the attribute is being used directly in the remote_file resource (in versions <=3.0.1) and the paths no longer expanding may have been a change in more recent chef versions and how they copy files which broke the nssm cookbook and required the change to the proper ruby method for expanding that environment variable. 3.0.1 should be working otherwise the behavior of remote_file may have changed in chef.
@Annih the change in the consul cookbook to properly expand the environment attribute shouldn't depend on the release of 4.0 since the changes in 4.0 dont fix or break anything in that regard.
from nssm.
@axelrtgs I'm not saying the fix should depends on v4.0. I'm just saying I'll not provide a PR on consul cookbook until v4.0 is released :)
from nssm.
Makes sense, i was just thinking more form the interest of getting it fixed sooner but i also understand wanting to wait for the latest release
from nssm.
Related Issues (20)
- End support for chef versions below 12.7
- NSSM wont install due to previous version running HOT 4
- NSSM resource doesn't support whyrun HOT 8
- Version 3.0.1 breaking change & semantic versioning HOT 7
- Always trying to start service on every chef run HOT 5
- Default recipe unzip is not idempotent and always runs HOT 3
- install_nssm function on the nssm resource install action breaks why_run HOT 1
- Allow nssm installation to be controlled by an attribute HOT 1
- NSSM doesnt allow AppParameters (args property) to be null or not present HOT 2
- Parameters dont get reset when no longer present HOT 3
- Create tests for reset parameters functionality
- When using a before notification Remote_file in install freaks out HOT 5
- NSSM create an Error event when dumping info
- Failed to complete #converge action: [Bad HTTP response returned from server. Body(if present): (400).] on default-windows-2012R2 HOT 1
- Java Heap error HOT 1
- nssm resource is not idempotent HOT 2
- Idempotence - Does not modify the service if it is already installed HOT 4
- params is deprecated HOT 9
- nssm does not install on Windows 2008 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nssm.