Skip to content

Commit

Permalink
ceph-config: exclude already counted osds by lvm_volumes
Browse files Browse the repository at this point in the history
Exclude lvm_volumes defined disks from existing osds while it has been counted by the "count number of osds for lvm scenario" task.

Signed-off-by: Seena Fallah <[email protected]>
  • Loading branch information
clwluvw authored and asm0deuz committed Mar 17, 2023
1 parent 80b1ed9 commit 225ae38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roles/ceph-config/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@

- name: set_fact num_osds (add existing osds)
set_fact:
num_osds: "{{ lvm_list.stdout | default('{}') | from_json | length | int + num_osds | default(0) | int }}"
num_osds: "{{ num_osds | int + (lvm_list.stdout | default('{}') | from_json | dict2items | map(attribute='value') | flatten | map(attribute='devices') | sum(start=[]) | difference(lvm_volumes | default([]) | map(attribute='data')) | length | int) }}"

- name: set osd related config facts
when: inventory_hostname in groups.get(osd_group_name, [])
Expand Down

0 comments on commit 225ae38

Please sign in to comment.