Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix prerequisites in cephadm-preflight #308

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

droidben
Copy link
Contributor

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.

There is still the problem, that the clients group is left untouched by the preflight playbook. This is also fixed my this PR.
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.

fixed conditionals for installing prerequisites
fixed installing client prerequisites

Signed-off-by: Ben Dätwyler <[email protected]>
@droidben
Copy link
Contributor Author

Requesting @asm0deuz for review and merging

Copy link
Collaborator

@asm0deuz asm0deuz left a comment

Choose a reason for hiding this comment

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

LGTM

@asm0deuz asm0deuz added the backport-reef backport reef label Jul 10, 2024
@asm0deuz asm0deuz merged commit 8c7e6b9 into ceph:devel Jul 10, 2024
8 checks passed
asm0deuz added a commit that referenced this pull request Jul 11, 2024
Fix prerequisites in cephadm-preflight (backport #308)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-reef backport reef
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants