cephadm-ansible icon indicating copy to clipboard operation
cephadm-ansible copied to clipboard

Fix prerequisites in cephadm-preflight

Open droidben opened this issue 11 months ago • 5 comments

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.

droidben avatar Mar 19 '24 20:03 droidben

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.

droidben avatar Apr 01 '24 20:04 droidben

Requesting @asm0deuz for review.

droidben avatar Apr 01 '24 21:04 droidben

jenkins test el8-functional

asm0deuz avatar Apr 18 '24 14:04 asm0deuz

jenkins test el9-functional

asm0deuz avatar Apr 18 '24 14:04 asm0deuz

@droidben It looks good to me but you need to squash your commits into one (now there are 5 commits)

asm0deuz avatar Apr 18 '24 14:04 asm0deuz

@asm0deuz Commits have been squashed

droidben avatar May 14 '24 07:05 droidben

@asm0deuz I recommend to merge this soon so the sourcebranch does not go into conflict again

droidben avatar May 25 '24 22:05 droidben

@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 avatar May 29 '24 08:05 asm0deuz

@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.

droidben avatar May 29 '24 10:05 droidben

@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 avatar Jun 16 '24 21:06 droidben

@droidben Just rebase it and I'll do the merge if the tests pass.

asm0deuz avatar Jul 09 '24 14:07 asm0deuz

@asm0deuz Rebased to match devel, tests are passing.

droidben avatar Jul 09 '24 21:07 droidben

@droidben To fix this conflit, just do the following:

  1. Fix the conflict in ceph_defaults/defaults/main.yml keeping
 - lvm2
 - sos
  1. git add ceph_defaults/defaults/main.yml
  2. git commit -a --amend
  3. git push -f <your remote> fix-prerequisites

This should fix the issue.

asm0deuz avatar Jul 10 '24 15:07 asm0deuz

@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.

droidben avatar Jul 10 '24 18:07 droidben