Add support for Yocto flavor on cephadm + some cephadm improvement#862
Add support for Yocto flavor on cephadm + some cephadm improvement#862dupremathieu wants to merge 5 commits intomainfrom
Conversation
258e75b to
df3aa11
Compare
roles/cephadm/tasks/main.yml
Outdated
| - 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) }}" |
There was a problem hiding this comment.
The 'osds' group is a leftover from ceph-ansible; do we really want to make it a prerequisite for the cephadm approach?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
@insatomcat there is something I don't understand, you use ceph osds group inside the cephadm spec file.
There was a problem hiding this comment.
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")
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 ...") ?
There was a problem hiding this comment.
To also account for standalone, we should use something like
"{{ groups['hypervisors'] | intersect(groups['cluster_machines']) }}"
like we do here
df3aa11 to
75af0fa
Compare
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>
75af0fa to
9312d68
Compare
ceph_conf_overrides