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

luminous: ceph-volume: make `lvm batch` idempotent #24589

Merged
merged 23 commits into from Oct 16, 2018

Conversation

Projects
None yet
3 participants
@andrewschoen
Contributor

andrewschoen commented Oct 15, 2018

backport of #24404

andrewschoen added some commits Sep 26, 2018

ceph-volume: add vg_name to the Device class
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 619810c)
ceph-volume: adds a lvs property to the Device class
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 3dae324)
ceph-volume: adds a used_by_ceph property to the Device class
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 9d49a37)
ceph-volume: adds used_by_ceph to filestore singletype batch report
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 48d10c9)
ceph-volume: adds a 'changed' key to lvm batch --report
This will indicate if the command would result in any OSDs being created
or not. Other tooling can use that key for idempotency checks.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 10f1d57)
ceph-volume: pick strategy for batch with only the unused devices
This will pick a strategy, filter out any devices already been used by
ceph and then pick a strategy again. If the strategy has changed the
call should error, if the strategy is the same proceed. If there are no
unused devices then the command is a noop.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 4529f2d)
ceph-volume: add filtered_devices and used_by_ceph to all batch reports
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 0718d2e)
ceph-volume: consider block and data devices used_by_ceph
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 6751253)
ceph-volume: update tests to account for filtered_devices in batch
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 3639622)
ceph-volume: add tests for util.device.Device.used_by_ceph
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit a28e653)
ceph-volume: add functional tests to ensure lvm batch is idempotent
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 9752d03)
ceph-volume: raise a non zero exit code if strategy changes with batch
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 9dfc00f)
ceph-volume: fix strategy comparison in 'lvm batch'
This also fixes some small json reporting issues with the
filestore MixedType strategy

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 1dd1502)
ceph-volume: ignore failure to load ceph configuration for block.db size
If we fail to load a ceph configureation file when trying to get the
block.db size then just use defaults instead of throwing an error.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit a7ee36c)
ceph-volume: fix bluestore strategy json reporting and type
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit b3cf906)
ceph-volume: fix idempotency checks for lvm batch tests
The mixed type tests will change strategy after the idempotency test so
we need to handle that in test playbook.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 1143482)
ceph-volume: remove the used_by_ceph key in the json output
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 3b6d82a)
ceph-volume: add info about filtered devices to batch pretty reports
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 62426db)
ceph-volume: add rotational property to Device class
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 7f6bfaa)
ceph-volume: filter devices used by journals/block.db
If after filterering of data/block devices there are only
one device left it can not be used if it is an SSD and
has been used previously as a journal or block.db

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit fc9a10e)
ceph-volume: when all devices are filtered exit gracefully
Even if all devices are filtered we want to return a 0 exit code and
make sure the json reporting still works.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit aa4fcd6)
ceph-volume: failing to get block db size from conf logs an exception
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 172d4af)
ceph-volume: extracts batch.filter_devices from Batch._get_strategy
This allows us to easily provide tests for that method.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit df7ef53)

@ceph-jenkins ceph-jenkins added this to the luminous milestone Oct 15, 2018

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

@andrewschoen

This comment has been minimized.

Contributor

andrewschoen commented Oct 16, 2018

jenkins test ceph-volume tox

@andrewschoen andrewschoen merged commit 1cde6d6 into luminous Oct 16, 2018

4 of 5 checks passed

make check make check failed
Details
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 tox testing ceph-volume tox OK
Details

@alfredodeza alfredodeza deleted the backport-luminous-24404 branch Oct 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment