]> 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>
Mon, 15 Mar 2021 09:41:28 +0000 (10:41 +0100)
commit31a0f2653db0a1ff57adb1249107e2e8986ac34b
treee4cb2cf237f29023f815d5f80f1dcd516c9966f0
parent5b86ac88014271cce1a48ecb10f3ecef96cb4ded
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>
roles/ceph-config/tasks/main.yml