Add patches to fix calculation of num_osd
#488
+134
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Original commit message:
Subject: [PATCH] ceph-config: fix calculation of
num_osds
The number of OSDs defined by the
lvm_volumes
variable is added tonum_osds
in taskCount number of osds for lvm scenario
. Therefore theses devices must not be counted in taskSet_fact num_osds (add existing osds)
.There are currently three problems with the existing approach:
lvm_volumes
supports a second notation to directly specify logical volumes instead of devices when thedata_vg
key exists. This scenario is not yet accounted for.difference
filter used to remove devices fromlvm_volumes
returns a list of unique elements, thus not accounting for multiple OSDs on a single deviceThe first problem is solved by filtering the list of logical volumes for devices used as
type
block
.For the second and third problem lists are created from
lvm_volumes
containing either paths to devices or logical volumes devices. For the second problem the output ofceph-volume
is simply filtered forlv_path
s appearing in the list of logical volume devices described above.To solve the third problem the remaining OSDs in the output are compiled into a list of their used devices, which is then filtered for devices appearing in the list of devices from
lvm_volumes
.Fixes: ceph/ceph-ansible#7435