Skip to content

Fix Amazon Linux 2023 support and improve version pinning idempotency#225

Open
AlaiaNakama wants to merge 7 commits into
newrelic:masterfrom
AlaiaNakama:master
Open

Fix Amazon Linux 2023 support and improve version pinning idempotency#225
AlaiaNakama wants to merge 7 commits into
newrelic:masterfrom
AlaiaNakama:master

Conversation

@AlaiaNakama

Copy link
Copy Markdown

Description
This PR addresses several issues regarding Amazon Linux 2023 (AL2023) compatibility and fixes a bug where providing a version string to nrinfragent_state caused the yum/dnf modules to fail.

Key Changes

  • AL2023 Support:

    • Skipped redhat-lsb-core installation on AL2023 (package unavailable).
    • Updated repository logic to correctly route AL2023 to the EL8 repository.
    • Set repo_gpgcheck: no specifically for AL2023 to bypass metadata signature requirements not supported by the current NR repo.
  • Version Pinning & Idempotency:

    • Refactored Install agent yum to allow nrinfragent_state to accept version strings (e.g., 1.71.4-1.el8) by moving the version to the package name and forcing state: present.
    • Isolated python-yaml dependency states from the global agent version string to prevent "invalid state" errors on legacy systems.
  • Dependency Management:

    • Updated python-pip package naming logic to support the python3-pip requirement on RHEL 8+ and AL2023.
    • Gated PyYAML installation via Pip to be non-blocking if Pip is unavailable.

Verification Results
Validated the following on clean AMI instances:

  • Amazon Linux 2023: Successful install, version pinning to 1.71.4-1.el8, and verified log forwarding (fluent-bit) activity.
  • RHEL 8: Successful install and verified python3-pip dependency resolution, and verified log forwarding (fluent-bit) activity.
  • Amazon Linux 2: Confirmed no regressions; correctly routed to EL7 repo and handled python-yaml dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant