Skip to content

add step to enable pmm2-client repo before install clients - #2

Open
brenobaima wants to merge 1 commit into
zelmario:masterfrom
brenobaima:master
Open

add step to enable pmm2-client repo before install clients#2
brenobaima wants to merge 1 commit into
zelmario:masterfrom
brenobaima:master

Conversation

@brenobaima

Copy link
Copy Markdown

No description provided.

@zelmario

Copy link
Copy Markdown
Owner

Tested this on a Rocky 9 (os:el9) node with pmm-client:2.44.1-6, running from the source tree (local roles/ mounted into the ansible container), before → after.

Before (without this patch) — reproduces the bug:

TASK [install PMM client rpm packages]
fatal: FAILED! => {"failures": ["No package pmm2-client-2.44.1-6.el9 available."], "msg": "Failed to install some of the specified packages"}

percona-release is installed but no repo enables the pmm2-client package, so yum can't find it.

After (with this patch) — clean pass, and the new task fires:

TASK [enable pmm2-client repo]          ← added by this PR, runs for 2.x on EL
TASK [install PMM client rpm packages]  ← succeeds
TASK [Setup pmm-admin PMM2]
PLAY RECAP  node1 : ok=32  changed=17  failed=0

End-to-end registration against a real percona/pmm-server:2.44.1 also works:

MySQL           node1-mysql   127.0.0.1:3306
pmm_agent       Connected
node_exporter   Running
mysqld_exporter Running
vmagent         Running

The change is correct and minimal — it mirrors the existing enable pmm3-client task with the startswith('2') guard and the pmm2-client repo name; the package-name logic in roles/tools_and_monitoring/vars/main.yml already emitted pmm2-client-…, so this repo-enable step was the only missing piece. Only covers the RHEL/yum path, which is the affected one (Debian/Ubuntu install pmm2-client from direct .deb URLs and were never broken).

Note for release: this touches roles/, so the ansible Docker image needs a rebuild+push for binary-only users — the local-mount that made this testable doesn't apply to them.

LGTM. ✅

@zelmario zelmario left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified end-to-end on el9 with pmm-client:2.44.1-6: reproduced the failure without the patch and confirmed a clean install + full pmm-admin registration with it. Correct, minimal fix. Approving. (Reminder: rebuild+push the ansible image on release since roles/ changed.)

zelmario added a commit that referenced this pull request Jul 17, 2026
Mirror the pmm3-client repo-enable step for PMM 2.x clients: when
pmm_client_version starts with '2' on EL/RHEL-family distros, run
'percona-release enable pmm2-client' so the 2.x client rpm resolves.
Fixes PR #2.
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.

2 participants