]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commit
ceph-{mon,osd}: move default crush variables
authorDimitri Savineau <dsavinea@redhat.com>
Mon, 10 Feb 2020 18:43:31 +0000 (13:43 -0500)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Mon, 17 Feb 2020 15:18:56 +0000 (10:18 -0500)
commit5f7778d59a03c8fcaee4797b4fc496c16b01b59f
tree41df5ac7ec289c540e2a4fa70d7b393ac9919a08
parentf78981bbf786a44dfc77f7e51599a12023822e6f
ceph-{mon,osd}: move default crush variables

Since ed36a11 we move the crush rules creation code from the ceph-mon to
the ceph-osd role.
To keep the backward compatibility we kept the possibility to set the
crush variables on the mons side but we didn't move the default values.
As a result, when using crush_rule_config set to true and wanted to use
the default values for crush_rules then the crush rule ansible task
creation will fail.

"msg": "'ansible.vars.hostvars.HostVarsVars object' has no attribute
'crush_rules'"

This patch move the default crush variables from ceph-mon to ceph-osd
role but also use those default values when nothing is defined on the
mons side.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1798864
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 1fc6b337142efdc76c10340c076653d298e11c68)
group_vars/mons.yml.sample
group_vars/osds.yml.sample
roles/ceph-mon/defaults/main.yml
roles/ceph-osd/defaults/main.yml
roles/ceph-osd/tasks/crush_rules.yml
roles/ceph-osd/tasks/main.yml