infrastructure-agent icon indicating copy to clipboard operation
infrastructure-agent copied to clipboard

RHEL9 Changes Needed

Open travisroberts-sf opened this issue 1 year ago • 3 comments

Description

Running the Infrastructure Agent on RHEL9 hosts is showing a couple of warnings in the journalctl, specifically for MemoryLimit and PIDFile.

  • MemoryLimit parameter in newrelic-infra.service has been deprecated in RHEL9 and will be completely removed in RHEL10. The fix is to change the service file to use MemoryMax.

  • The default PIDFile location for services on RHEL9 has been moved from /var/run to /run. The recommendation is to change the PIDFile parameter in the newrelic-infra.services file from 'PIDFile=/var/run/newrelic-infra/newrelic-infra.pid' to 'PIDFile=/run/newrelic-infra/newrelic-infra.pid'

Expected Behavior

No errors/warnings in journalctl

Troubleshooting

changed both parameters as suggested above and received no errors.

Steps to Reproduce

The newrelic-infra.service file is installed by default as is. there is no step to reproduce this issue.

Your Environment

RHEL9 New Relic Infrastructure Agent version: 1.48.1, GoVersion: go1.20.8, GitCommit: 1242f680d6b12932f6dbf80994d4ef7980866e71, BuildDate: 2023-11-02T16:44:32

travisroberts-sf avatar Feb 15 '24 17:02 travisroberts-sf

https://new-relic.atlassian.net/browse/NR-228834

for context here's the errors I am seeing in journalctl Jan 30 23:21:11 phx-nrelc-lp903 systemd[1]: /etc/systemd/system/newrelic-infra.service:9: Unit uses MemoryLimit=; please use MemoryMax= instead. Support for MemoryLimit= will be removed soon. Jan 30 23:21:11 phx-nrelc-lp903 systemd[1]: /etc/systemd/system/newrelic-infra.service:16: PIDFile= references a path below legacy directory /var/run/, updating /var/run/newrelic-infra/newrelic-infra.pid → /run/newrelic-infra/newrelic-infra.pid; please update the unit file accordingly.

travisroberts-sf avatar Feb 15 '24 17:02 travisroberts-sf

thanks for reporting this, we'll make sure this is updated for newer RHEL versions

josemore avatar Feb 19 '24 09:02 josemore