Skip to content

Conversation

@katarimanojk
Copy link
Contributor

No description provided.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 12, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign dasm for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@katarimanojk katarimanojk force-pushed the fix_missing_packages_in_cephnodes branch from 2241460 to 0c9047f Compare December 12, 2025 14:28
ansible.builtin.include_role:
name: cifmw_cephadm
tasks_from: install_cephadm
when: cifmw_cephadm_install_on_all_nodes | default(false) | bool
Copy link
Contributor Author

Choose a reason for hiding this comment

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

cifmw_cephadm_install_on_all_nodes: true var will be used only by the adoption jobs which uses external ceph.

ansible.builtin.include_role:
name: cifmw_cephadm
tasks_from: install_cephadm
when: cifmw_cephadm_install_on_all_nodes | default(false) | bool
Copy link
Contributor

Choose a reason for hiding this comment

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

I see that the purpose here is to install the cephadm package in all the HCI nodes that are part of the ceph cluster. By doing this, when the migration happens (e.g. mons are moved from controller-0 to compute-0 and so forth) you have and available cephadm command to interact with the cluster.
Also I see you can't reuse pre.yaml because it is called in the bootstrap part that is run against the first mon.
I assume this task preserves backward compatibility due to default(false), so we can explicitly add it in that context.
I'd like to have @fultonj's opinion on this, because I'm not entirely sure if there's a better way to perform the same task in a different part of the process.
The other question is: should this be part of post_tasks or should be handled in it's own playbook (I see we have many playbooks here)?
It might result confusing having it within the "Distribute SSH keypairs ...", so I'm wondering if we should do things differently.

Copy link
Contributor

Choose a reason for hiding this comment

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

For example we could have a small "Prerequisites" playbook that does the cephadm install in the short term, and review what we do in general to have some common section that applies to all the involved nodes.
Just an idea, but I'd like to hear your opinions first.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@fmount Thanks for the feedback! You're right that having it within the SSH keypairs section is a bit confusing organizationally.

I think of two options:

Option 1: Update the play name from:
- name: Distribute SSH keypair to target nodes
to:
- name: Distribute SSH keypair to target nodes and prepare node prerequisites

The task would remain in post_tasks, called conditionally based on cifmw_cephadm_install_on_all_nodes and keep backward compatibility with default(false).

Option 2: Move this to a separate play in the same file:

- name: Ceph prerequisites
  hosts: "{{ cifmw_ceph_target | default('computes') }}"
  tasks:
    - name: Install cephadm package on all nodes
      ansible.builtin.include_role:
        name: cifmw_cephadm
        tasks_from: install_cephadm
      when: cifmw_cephadm_install_on_all_nodes | default(false) | bool


This way it can serve as a home for other prerequisite tasks in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@fultonj Need your opinion on this.

Copy link
Contributor

@fultonj fultonj Jan 12, 2026

Choose a reason for hiding this comment

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

It made sense to stick this under the play Distribute SSH keypair to target nodes because that's a play who's target hosts include all of the nodes. Otherwise they are not related.

Thus, I think option 2 (a separate play) makes sense. It can still be a prerequisite play targeting all nodes.

I like that cifmw_cephadm_install_on_all_nodes defaults to false. I think it's important to also add a comment like the following if you implement option 2:

# For standard deployments, cephadm only needs to be installed on the bootstrap node.
# This is handled by cifmw_cephadm/tasks/pre.yml. However, for adoption, it is useful to
# have cephadm on every node, so this play is used only in that case.

You could also have this PR include adding the following:

when: not (cifmw_cephadm_install_on_all_nodes | default(false) | bool)

to line 26 of this:

https://github.com/openstack-k8s-operators/ci-framework/blob/main/roles/cifmw_cephadm/tasks/pre.yml#L25

I realize it's idempotent, but it would save time to not re-run the install on the bootstrap node.

@github-actions
Copy link

This PR is stale because it has been for over 15 days with no activity.
Remove stale label or comment or this will be closed in 7 days.

@katarimanojk katarimanojk force-pushed the fix_missing_packages_in_cephnodes branch from 0c9047f to a27c4f4 Compare January 5, 2026 05:37
Copy link
Contributor

@fultonj fultonj left a comment

Choose a reason for hiding this comment

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

Would you please consider a few small changes?

ansible.builtin.include_role:
name: cifmw_cephadm
tasks_from: install_cephadm
when: cifmw_cephadm_install_on_all_nodes | default(false) | bool
Copy link
Contributor

@fultonj fultonj Jan 12, 2026

Choose a reason for hiding this comment

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

It made sense to stick this under the play Distribute SSH keypair to target nodes because that's a play who's target hosts include all of the nodes. Otherwise they are not related.

Thus, I think option 2 (a separate play) makes sense. It can still be a prerequisite play targeting all nodes.

I like that cifmw_cephadm_install_on_all_nodes defaults to false. I think it's important to also add a comment like the following if you implement option 2:

# For standard deployments, cephadm only needs to be installed on the bootstrap node.
# This is handled by cifmw_cephadm/tasks/pre.yml. However, for adoption, it is useful to
# have cephadm on every node, so this play is used only in that case.

You could also have this PR include adding the following:

when: not (cifmw_cephadm_install_on_all_nodes | default(false) | bool)

to line 26 of this:

https://github.com/openstack-k8s-operators/ci-framework/blob/main/roles/cifmw_cephadm/tasks/pre.yml#L25

I realize it's idempotent, but it would save time to not re-run the install on the bootstrap node.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants