Comments (8)
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.
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.
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.
Hi @danapplegate,
any updates on this issue?
Thanks in advance!
Kind regards,
David
from newrelic.
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.
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.
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.
Fixed by @danapplegate in #85
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.