chef-newrelic-sysmond
chef-newrelic-sysmond copied to clipboard
apt repository path is wrong
All of a sudden this started failing on ubuntu 14 with an error that it cannot find the newrelic repository packages. It is adding the apt_repository resource with the distribution name (trusty) but that is no longer on New Relics servers.
/etc/apt/sources.list.d/newrelic.list
deb "http://apt.newrelic.com/debian/" trusty newrelic non-free
which gives the error.
Err http://apt.newrelic.com trusty/newrelic amd64 Packages
404 Not Found
Err http://apt.newrelic.com trusty/non-free amd64 Packages
404 Not Found
If I remove the distribution "trusty" it works. Is the apt_repository resource adding the distribution automatically? It may need to be provided and an attribute to override.
1+
FWIW, It's the apt_repository
resource here that's adding the distro name.
In case it helps, here's the quick and dirty fix I'm using in my wrapper cookbook to get around this for now:
begin
r = resources(:apt_repository => "newrelic")
r.distribution = ""
rescue
Chef::Log.error "could not patch newrelic apt_repository"
end
I have submitted a pull request https://github.com/phlipper/chef-newrelic-sysmond/pull/31 that sets the default distribution = "" and tested locally and it works.
I will use this override in our wrapper for now, thanks.
+1
+1