]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
config: reset num_osds
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 12 Mar 2021 14:49:15 +0000 (15:49 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 17 Mar 2021 16:35:52 +0000 (17:35 +0100)
commitdc2a11ce3f83f43e5d0b25752a03970418633ad9
treeb59491b31cc28234d08d5da3201254e909b5dd91
parent8b86b2ede39645fbf9a22faca33b6be7a2980966
config: reset num_osds

When collocating OSDs with other daemon, `num_osds` is incorrectly calculated
because `ceph-config` is called multiple times.

Indeed, the following code:
```
num_osds: "{{ lvm_list.stdout | default('{}') | from_json | length | int + num_osds | default(0) | int }}"
```

makes `num_osds` be incremented each time `ceph-config` is called.

We have to reset it in order to get the correct number of expected OSDs.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 31a0f2653db0a1ff57adb1249107e2e8986ac34b)
roles/ceph-config/tasks/main.yml