Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions hooks/playbooks/ceph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,15 @@
cifmw_admin_prikey: "{{ private_key_get['content'] | b64decode }}"
cifmw_admin_distribute_private_key: true
no_log: true
post_tasks:
# In case of adoption cases with external ceph, cephadm and the
# dependant packages (lvm2) are missing on few ceph nodes, so
# installing cephadm on all nodes.
- 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
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.

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.


- name: Create Block Device on target nodes
tags: block
Expand Down
Loading