Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quincy: ceph-volume: fix a bug in get_lvm_fast_allocs() (batch) #52062

Merged
merged 1 commit into from Jul 12, 2023

Conversation

guits
Copy link
Contributor

@guits guits commented Jun 14, 2023

backport tracker: https://tracker.ceph.com/issues/61153


backport of #51343
parent tracker: https://tracker.ceph.com/issues/59640

this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh

`get_lvm_fast_allocs()` in `devices/lvm/batch.py` calls the property
`Device.used_by_ceph` in order to filter out devices that are already
used by ceph. The issue is that `Device.used_by_ceph()` itself filters
out journal devices (db/wal) given that a db/wal device can be shared
between multiple OSDs. The consequence is that `Device.used_by_ceph()`
always returns False for a db/wal device (even if it is actually
already used by ceph) so `get_lvm_fast_allocs()` always returns the
full list of the passed db/wal devices on the `lvm batch` CLI command.
Finally, the logic in `devices.lvm.batch.get_deployment_layout()`
checks whether the length of the list returned by `get_lvm_fast_allocs()`
is equal to `num_osds` (the number of OSD being created), if not it fails.

Fixes: https://tracker.ceph.com/issues/59640

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit 8da98bf)
@guits guits requested a review from a team as a code owner June 14, 2023 20:13
@guits guits added this to the quincy milestone Jun 14, 2023
Copy link
Contributor

@asm0deuz asm0deuz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@guits guits merged commit 2fa9367 into ceph:quincy Jul 12, 2023
11 checks passed
@guits guits deleted the wip-61153-quincy branch July 12, 2023 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants