Git Product home page Git Product logo

Comments (8)

danapplegate avatar danapplegate commented on September 26, 2024

Digging into NewRelic's docs on the newrelic-install script, it looks like the command is intended to be run in interactive mode, but can be run in silent mode and controlled by environment variables. Perhaps this is a recent update to the newrelic-install script that forces interactive mode, whereas before it defaulted to silent mode and was able to complete successfully in an automated run a la Chef?

I will investigate using these environment variables to force newrelic-install to run silently for the php-agent.

from newrelic.

danapplegate avatar danapplegate commented on September 26, 2024

Changing the newrelic-install block to the following does work and does not result in a "terminated by signal 9" error message.

# run newrelic-install
execute 'newrelic-install' do
  command 'NR_INSTALL_SILENT=1 newrelic-install install'
  action :nothing
  notifies :restart, "service[#{node['newrelic']['php-agent']['web_server']['service_name']}]", :delayed
end

Is this problem reproducible by anyone else? If so, I will work on a pull request to make the newrelic-install execute resource work in silent mode. I could also have it determine some of the other environment variable configuration settings from the php cookbook (such as the php install prefix). What do you think?

from newrelic.

djoos avatar djoos commented on September 26, 2024

Hi @danapplegate,

thanks for getting in touch!

I'll try to replicate the issue in test-kitchen, but in case of it being a matter of setting the NR_INSTALL_SILENT environment variable, I'd suggest doing it via the environment attribute on the execute command. ( eg. environment => {"ENV_VARIABLE" => "VALUE"} )

Allowing the install to be done like this might not be a bad idea anyway... What do you think?

Thanks in advance for your feedback!

Kibd regards,
David

from newrelic.

djoos avatar djoos commented on September 26, 2024

Hi @danapplegate,

any updates on this issue?

Thanks in advance!

Kind regards,
David

from newrelic.

danapplegate avatar danapplegate commented on September 26, 2024

Sorry for the delay!

The fix I mentioned above does in fact work. I will put together a small pull request tonight to try to close out this ticket. I've never written ChefSpec tests nor used Test Kitchen, but I will give it a shot.

Were you able to replicate the error in your Test Kitchen?

from newrelic.

djoos avatar djoos commented on September 26, 2024

Hi Dan,

I didn't have the time to look any deeper into the issue unfortunately. Don't worry about the ChefSpec and Test Kitchen for now, submit your PR and we'll take it from there, ok?

Thanks in advance!
David

from newrelic.

danapplegate avatar danapplegate commented on September 26, 2024

Hi @djoos! Thank you for your patience!

It's not much of a pull request as it stands, but I'm eager to hear your suggestions for improvement. Let me know what else you'd like to see included!

from newrelic.

djoos avatar djoos commented on September 26, 2024

Fixed by @danapplegate in #85

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.