Comments (7)
Hi @GuyPaddock,
the server-monitoring-agent.rb runs the install action on the package (line 15) - not an upgrade.
Would you mind changing :install to :update and let me know whether that solves your issue? Let me know how it goes so I can update the recipe...
Thanks in advance for your feedback!
Kind regards,
David
from newrelic.
You don't want upgrades happening on chef client runs. This can be potentially damaging to systems. You want updates to software packages to be controlled and planned.
from newrelic.
I think that the decision whether to upgrade or not should be in the hands of the DevOp... What about having an attribute (default behaviour stays as it currently is :install), so you could change the behaviour easily to :update.
What do you think?
from newrelic.
Certainly better than changing default behaviour to update. I still think this is a process/procedure issue with how @GuyPaddock and his team are approaching upgrades, not a Chef issue.
from newrelic.
Hi @GuyPaddock,
I finally managed to have a look into the issue... The New Relic docs gave me the background on the error message you are getting.
You're using this cookbook's Python agent - this recipe installs the latest Python agent, but actually only when there hasn't been any version installed already.
# install latest python agent
python_pip 'newrelic' do
if node['newrelic']['python-agent']['python_venv']
virtualenv node['newrelic']['python-agent']['python_venv']
end
action :install
if node['newrelic']['python-agent']['python_version'] != 'latest'
version node['newrelic']['python-agent']['python_version']
end
end
...the documentation/comments are confusing as using "latest" doesn't actually mean that it will upgrade to a newer version whereas that is kind of what is suggested. Instead it uses the latest available version upon (first) installation.
Perhaps it makes sense to make the action configurable as mentioned above. Keep :install as default, but :upgrade would have the expected behaviour for your situation... That change would keep everyone happy, as you can make the call whether to go for install or upgrade.
Give it a go by forking the cookbook and modifying the recipe to :upgrade rather than :install - that should sort out your issue...
Thanks in advance for your feedback!
Kind regards,
David
from newrelic.
Just a head's up: upgrading the server monitor agent is failing with the following error:
Setting up newrelic-sysmond (2.0.2.111) ...
STDERR: Configuration file `/etc/newrelic/nrsysmond.cfg'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** nrsysmond.cfg (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing newrelic-sysmond (--configure):
EOF on stdin at conffile prompt
Errors were encountered while processing:
newrelic-sysmond
E: Sub-process /usr/bin/dpkg returned an error code (1)
---- End output of apt-get -q -y install newrelic-sysmond=2.0.2.111 ----
Ran apt-get -q -y install newrelic-sysmond=2.0.2.111 returned 100
[2015-02-25T16:27:49-08:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
I'll file a ticket, but I figured it was relevant to the folks on this thread. Also it would be nice to have the new properties for this listed in the docs :)
I'll try to find time to put together a PR, but if anyone wants to beat me to it, feel free!
from newrelic.
see #157 (@welearnednothing)
from newrelic.
Related Issues (20)
- Newrelic dot APM agent doesnot upgrade HOT 4
- doesn't support strip_command_line parameter HOT 2
- Every node attribute used a default value to a property needs a `lazy { }` around it. HOT 6
- Cannot overwrite windows newrelic-infra agent source HOT 1
- Cloning resource attributes for service[newrelic-daemon] from prior resource HOT 1
- [agent_dotnet] Add support for enabling distributed tracing on the newrelic.config.erb template HOT 1
- Error executing action `enable` on resource 'newrelic_agent_infrastructure[Install]' is failing on debian7
- Default value of 'windows_checksum' in newrelic/resources/agent_infrastructure.rb does not match computed checksum HOT 1
- Recipe newrelic::java_agent fails install with the `Error executing action run on resource execute[newrelic_install_newrelic.jar]` HOT 2
- hello-world
- Hi world HOT 1
- Distributed Tracing feature in PHP Agent cookbook doesn't work
- add max_procs for newrelic_infra.yml
- Saleem A. H
- Compile Error on server_monitor.rb HOT 2
- "platform?" bug after ugprading newrelic version HOT 2
- Adding add event_queue_depth attribute to newrelic-infra.yml file is not there
- Cookbook failed on chef-client 17.8.25 HOT 2
- Hello World
- Please add Ubuntu 22.04 support, Ubuntu 20.04 fails with malformed repository line
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 newrelic.