Skip to content

Comments

Add support for Yocto flavor on cephadm + some cephadm improvement#862

Open
dupremathieu wants to merge 5 commits intomainfrom
cephadmyocto
Open

Add support for Yocto flavor on cephadm + some cephadm improvement#862
dupremathieu wants to merge 5 commits intomainfrom
cephadmyocto

Conversation

@dupremathieu
Copy link
Member

  • add support for ceph.conf overrides using ceph_conf_overrides
  • only deploy OSDs on nodes that need them
  • add SEAPATH Yocto flavor support

@dupremathieu dupremathieu force-pushed the cephadmyocto branch 2 times, most recently from 258e75b to df3aa11 Compare February 16, 2026 15:16
@dupremathieu dupremathieu marked this pull request as ready for review February 16, 2026 15:16
@dupremathieu dupremathieu requested review from eroussy and insatomcat and removed request for eroussy February 16, 2026 15:16
- name: Set list of nodes that need OSDs
set_fact:
cephadm_nodes_needing_osds: "{{ groups['cluster_machines'] | map('extract', hostvars, 'hostname') | difference(cephadm_existing_osd_hosts) }}"
cephadm_nodes_needing_osds: "{{ groups['osds'] | map('extract', hostvars, 'hostname') | difference(cephadm_existing_osd_hosts) }}"
Copy link
Member

Choose a reason for hiding this comment

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

The 'osds' group is a leftover from ceph-ansible; do we really want to make it a prerequisite for the cephadm approach?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, because the cluster is either 3 hypervisors or 3 hypervisors and one observer
In that case, the observer is a cluster machine but not an osd

Copy link
Member

@insatomcat insatomcat Feb 17, 2026

Choose a reason for hiding this comment

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

We could use the cephadm spec file to define which node is what role (mon,mgr,osd...) instead of using the ceph-ansible way (mons, osds, mgrs, clients groups in the inventory).
Seems more appropriate since we are moving to cephadm.
Currently the spec file uses the osds group, but we can change that and set the default to "all cluster machines = osds" since we leave the possibility to override this spec file in the inventory.

Copy link
Member

Choose a reason for hiding this comment

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

I agree that we can drop all this mon,mgr and osd semantics
But I think it is better to handle the observer case directly in the inventory :
I don't want to "throw" the user in the cephadm_spec_file if they just want to switch between 3hypervisors to 2hypervisor+observer setup.
This specific configuration must be covered only in the ansible inventory. For more complex setup, I agree to use the cephadm_spec_file override.
What do you think ?

Copy link
Member Author

Choose a reason for hiding this comment

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

@insatomcat there is something I don't understand, you use ceph osds group inside the cephadm spec file.

Copy link
Member

Choose a reason for hiding this comment

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

we will keep the "hypervisors" and "observers" group, so we could have the spec file deploy osds only on the "hypervisors" groups (instead of "osds")

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, that seems fine to me
@dupremathieu ?

Copy link
Member Author

Choose a reason for hiding this comment

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

We can do that for the moment, but I agree that we should rely on only the cephadm spec file in the future.

I will try to rework this but probably not this week.

@insatomcat there is something else I want your opinion. In this commit:
df3aa11, I have tried to restore the old ceph.conf override feature. But it seems that, what I have done break the idempotency. The ceph.conf changes are ignored by cephadm once the ceph.conf file is deployed.

I have no idea how solving that.

Copy link
Member

Choose a reason for hiding this comment

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

I think this ceph.conf file is only taken into account when first bootstrapping the cluster, so to have idempotency maybe the ceph.conf override feature should be done by another task that will, after bootstrapping, just run "commands" to set the config items ("ceph config set ...") ?

Copy link
Member

@insatomcat insatomcat Feb 17, 2026

Choose a reason for hiding this comment

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

To also account for standalone, we should use something like
"{{ groups['hypervisors'] | intersect(groups['cluster_machines']) }}"
like we do here

Signed-off-by: Mathieu Dupré <mathieu.dupre@savoirfairelinux.com>
Remove the commented-out codes.

Signed-off-by: Mathieu Dupré <mathieu.dupre@savoirfairelinux.com>
Add some conditionals to the cephadm role to support the SEAPATH Yocto
flavor. In the Yocto flavor, the cephadm and containerized-ceph users
and groups are already created by the Yocto image, so we need to skip
their creation in the cephadm role. We also need to skip the sudoers
file creation for the cephadm user, for the same reason.

Signed-off-by: Mathieu Dupré <mathieu.dupre@savoirfairelinux.com>
Change the list of nodes that need OSDs to be based on the 'hypervisors'
group instead of 'cluster_machines'. This ensures that OSDs are only
deployed on nodes that are actually designated to have OSDs, rather than
all cluster machines. Observers machines are part of the
'cluster_machines' group but it most the cases they don't have OSDs.

Signed-off-by: Mathieu Dupré <mathieu.dupre@savoirfairelinux.com>
As it was the case with the previous implementation base on
ceph-ansible, this commit adds support for overriding ceph.conf values
using the `ceph_conf_overrides` variable. This variable allows users to
specify custom configuration values for both the global section and
other specific sections (like mon, osd, mds, etc.) of the ceph.conf
file.

Signed-off-by: Mathieu Dupré <mathieu.dupre@savoirfairelinux.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants