Giter Site home page Giter Site logo

Comments (7)

djoos avatar djoos commented on August 16, 2024

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.

et304383 avatar et304383 commented on August 16, 2024

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.

djoos avatar djoos commented on August 16, 2024

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.

et304383 avatar et304383 commented on August 16, 2024

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.

djoos avatar djoos commented on August 16, 2024

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.

welearnednothing avatar welearnednothing commented on August 16, 2024

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.

djoos avatar djoos commented on August 16, 2024

see #157 (@welearnednothing)

from newrelic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.