While working to certify Ubuntu 22.04 support in our Chef environment, this cookbook generated errors on Ubuntu.
It said that the deb repository line in the /etc/apt/sources.list.d/newrelic-infra.list was a malformed repository line.
* file[/etc/apt/sources.list.d/newrelic-infra.list] action create
- update content in file /etc/apt/sources.list.d/newrelic-infra.list from c81efd to 8c177b
--- /etc/apt/sources.list.d/newrelic-infra.list 2023-09-13 23:37:08.591295593 +0000
+++ /etc/apt/sources.list.d/.chef-newrelic-infra20230913-3151-7zpchn.list 2023-09-13 23:37:49.647491073 +0000
@@ -1 +1 @@
+deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt main
* execute[apt-cache gencaches] action run[2023-09-13T23:37:49+00:00] ERROR: execute[apt-cache gencaches] (vmn-newrelic::agent_infra line 415) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
---- Begin output of ["apt-cache", "gencaches"] ----
STDOUT:
STDERR: E: Malformed entry 1 in list file /etc/apt/sources.list.d/newrelic-infra.list (Component)
E: The list of sources could not be read.
---- End output of ["apt-cache", "gencaches"] ----
Ran ["apt-cache", "gencaches"] returned 100; ignore_failure is set, continuing
The latter set of commands installed the New Relic Infra agent on the Ubuntu 22.04 where the cookbook-generated commands had errors.
The apt-key add command generated a deprecation warning: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. It seems that the new process is to use gpg --dearmor instead.
While working to certify Ubuntu 22.04 support in our Chef environment, this cookbook generated errors on Ubuntu.
It said that the deb repository line in the /etc/apt/sources.list.d/newrelic-infra.list was a malformed repository line.
From New Relic's install page, https://docs.newrelic.com/docs/infrastructure/install-infrastructure-agent/linux-installation/install-infrastructure-monitoring-agent-linux/#ubuntu-version, the line being generated is incorrect and should be including the distribution name (xenial, bionic, groovy, jammy, etc).
For Ubuntu 22.04 this newrelic cookbook generated
where New Relic's install webpage has:
The commands that were being run by Chef on the Ubuntu 22.04 by this supermarket cookbook are
Where those on New Relic's Ubuntu install pages are:
The latter set of commands installed the New Relic Infra agent on the Ubuntu 22.04 where the cookbook-generated commands had errors.
apt-key add
command generated a deprecation warning:Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
It seems that the new process is to usegpg --dearmor
instead.