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

mimic Additional work on ceph-volume to add some choose_disk capabilities #24782

Merged
merged 6 commits into from Oct 29, 2018

Conversation

Projects
None yet
4 participants
@alfredodeza
Copy link
Contributor

alfredodeza commented Oct 26, 2018

This patchset is about :

  • adding new filtering capabilities to allow rejecting some devices that doesn't suit ceph's expectations.
  • reporting additional storage capabilities : that gives more precision on filtering devices by their capabilties

Fixes: http://tracker.ceph.com/issues/36446
Backport of: #24504

ErwanAliasr1 added some commits Oct 9, 2018

ceph_volume: Adding Device.is_valid()
A block device can be filtered-out/ignored because it have features that
doesn't match Ceph's expectations.

As of today, the current code was rejected removable devices but it was
pretty hidden from the user, and implicit in the get_devices() function.

This patch is creating a new is_valid() function to perform all the
rejection tests and returns if this device can be used in the Ceph
context or not.

If is_valid() is returning False, the 'rejected_reasons' list reports all
the reasons why that devices got rejected.

Signed-off-by: Erwan Velu <erwan@redhat.com>
(cherry picked from commit d8fdf0b)
ceph_volume: Rejecting Read-only devices
If a devices is said to be read-only, there is no chance we can actually
use it. So let's report it as unusable.

Signed-off-by: Erwan Velu <erwan@redhat.com>
(cherry picked from commit f1a9435)

@ceph-jenkins ceph-jenkins added this to the mimic milestone Oct 26, 2018

ErwanAliasr1 added some commits Oct 9, 2018

ceph_volume: Reporting firmware revision
We are already reporting model & vendor of a given disk, let's also
report the revision of the firmware. That is useful to filter-out some
known broken revisions.

Signed-off-by: Erwan Velu <erwan@redhat.com>
(cherry picked from commit 5972079)
ceph_volume: Reporting nr_requests
We are already reporting the rotational & scheduler of a disk device.
Reporting the nr_requests could be useful to get how many concurrent IOs
the device supports/reports.

That could help detecting badly detected/configured devices.

Signed-off-by: Erwan Velu <erwan@redhat.com>
(cherry picked from commit e0ea3d4)
ceph_volume: Rejecting locked devices
If we cannot open a block device in O_RDWR in exclusive mode, it means
someone is actually using it like a raw database or similar.

In that case, the device should be considered as unusable as OSDs will
not be in a position to use it.

Signed-off-by: Erwan Velu <erwan@redhat.com>
(cherry picked from commit d5de958)
ceph_volume: Checking device validity at init time
When initializing the Device structure, it have to run is_valid() to
ensure the data structures (_is_valid & rejected_reasons) to be
populated accordingly to the device state.

Signed-off-by: Erwan Velu <erwan@redhat.com>
(cherry picked from commit ef0ceef)

@alfredodeza alfredodeza requested a review from andrewschoen Oct 28, 2018

@andrewschoen andrewschoen merged commit bac4665 into ceph:mimic Oct 29, 2018

37 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
ceph-volume batch testing centos7-bluestore-mixed_type OK
Details
ceph-volume batch testing centos7-bluestore-mixed_type_dmcrypt OK
Details
ceph-volume batch testing centos7-bluestore-single_type OK
Details
ceph-volume batch testing centos7-bluestore-single_type_dmcrypt OK
Details
ceph-volume batch testing centos7-filestore-mixed_type OK
Details
ceph-volume batch testing centos7-filestore-mixed_type_dmcrypt OK
Details
ceph-volume batch testing centos7-filestore-single_type OK
Details
ceph-volume batch testing centos7-filestore-single_type_dmcrypt OK
Details
ceph-volume batch testing xenial-bluestore-single_type OK
Details
ceph-volume batch testing xenial-bluestore-single_type_dmcrypt OK
Details
ceph-volume batch testing xenial-filestore-single_type OK
Details
ceph-volume batch testing xenial-filestore-single_type_dmcrypt OK
Details
ceph-volume lvm testing centos7-bluestore-create OK
Details
ceph-volume lvm testing centos7-bluestore-dmcrypt OK
Details
ceph-volume lvm testing centos7-filestore-create OK
Details
ceph-volume lvm testing centos7-filestore-dmcrypt OK
Details
ceph-volume lvm testing xenial-bluestore-create OK
Details
ceph-volume lvm testing xenial-bluestore-dmcrypt OK
Details
ceph-volume lvm testing xenial-filestore-create OK
Details
ceph-volume lvm testing xenial-filestore-dmcrypt OK
Details
ceph-volume simple testing centos7-bluestore-activate OK
Details
ceph-volume simple testing centos7-bluestore-dmcrypt_luks OK
Details
ceph-volume simple testing centos7-bluestore-dmcrypt_plain OK
Details
ceph-volume simple testing centos7-filestore-activate OK
Details
ceph-volume simple testing centos7-filestore-dmcrypt_luks OK
Details
ceph-volume simple testing centos7-filestore-dmcrypt_plain OK
Details
ceph-volume simple testing xenial-bluestore-activate OK
Details
ceph-volume simple testing xenial-bluestore-dmcrypt_luks OK
Details
ceph-volume simple testing xenial-bluestore-dmcrypt_plain OK
Details
ceph-volume simple testing xenial-filestore-activate OK
Details
ceph-volume simple testing xenial-filestore-dmcrypt_luks OK
Details
ceph-volume simple testing xenial-filestore-dmcrypt_plain OK
Details
ceph-volume tox tests OK
Details
make check make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment