cephadm-ansible
cephadm-ansible copied to clipboard
Fix prerequisites in cephadm-preflight
I noticed that clients configured with cephadm-preflight.yml
were not getting prerequisite packages installed. This was due to a wrong conditional in the playbook.
Also lvm2
is an official prerequisite as per the docs so I added it to the infra packages in the defaults as not all distros in all feature-flavors come with it installed.
I misinterpreted the clients group and what its purpose was supposed to be, hence my latest commit. But there is still the problem, that the clients group is left untouched by the preflight playbook. This is also fixed my this PR.
If you are still unsure as to what this is supposed to accomplish, here a comparison in playbook runs. Here rocky9-01 is admin, but not client and osd. The rest (02-04) is admin, client and osd.
existing prefligt playbook
TASK [install prerequisites packages on servers]
ok: [rocky9-01.testcluster.local]
changed: [rocky9-03.testcluster.local]
changed: [rocky9-02.testcluster.local]
changed: [rocky9-04.testcluster.local]
TASK [install prerequisites packages on clients]
skipping: [rocky9-01.testcluster.local]
skipping: [rocky9-02.testcluster.local]
skipping: [rocky9-03.testcluster.local]
skipping: [rocky9-04.testcluster.local]
As you can see, the clients are skipped, no packages are installed.
proposed preflight playbook
TASK [install prerequisites packages on servers]
changed: [rocky9-04.testcluster.local]
changed: [rocky9-03.testcluster.local]
changed: [rocky9-01.testcluster.local]
changed: [rocky9-02.testcluster.local]
TASK [install prerequisites packages on clients]
skipping: [rocky9-01.testcluster.local]
ok: [rocky9-04.testcluster.local]
ok: [rocky9-02.testcluster.local]
ok: [rocky9-03.testcluster.local]
The clients are now not immediately skipped anymore and the required packages are installed.
Requesting @asm0deuz for review.
jenkins test el8-functional
jenkins test el9-functional
@droidben It looks good to me but you need to squash your commits into one (now there are 5 commits)
@asm0deuz Commits have been squashed
@asm0deuz I recommend to merge this soon so the sourcebranch does not go into conflict again
@droidben There are still 3 commits, there should only be one "added lvm2 to infra packages". You need to stash and remove the 2 other ones
@asm0deuz There is only 1 commit from me, all others are because the branch got out of sync and I had to merge the upstream diffs.
@asm0deuz Could you please clarify what is taking so long? With the time more merge conflicts will inevitably appear. And if you, as per your last comment, do not want me to update my branch, please at least merge this soon.
In the meantime, I have reset to the original commit, so that you have to do the merging yourself if that's what you wanted.
@droidben Just rebase it and I'll do the merge if the tests pass.
@asm0deuz Rebased to match devel, tests are passing.
@droidben To fix this conflit, just do the following:
- Fix the conflict in
ceph_defaults/defaults/main.yml
keeping
- lvm2
- sos
-
git add ceph_defaults/defaults/main.yml
-
git commit -a --amend
-
git push -f <your remote> fix-prerequisites
This should fix the issue.
@asm0deuz This is exactly what was done, but due to the long wait there will be the merge conflict somewhere, we cannot forgo it. :) As you seem unhappy with this, I will open a new PR with a fresh fork.