ceph-volume: revert partition as disk#25390
Conversation
|
Mind expanding how it breaks? There aren't details of this in the ticket either. The information is needed because the way the The functional tests in tests/functional/lvm will probably report breakage on any scenario |
|
jenkins test ceph-volume lvm all |
|
jenkins test ceph-volume batch all |
andrewschoen
left a comment
There was a problem hiding this comment.
The CI is finding failures with lvm zap because of this change. I think the correct thing to do here is modify ceph-volume inventory to handle this new format. However, if you still feel strongly about changing the structure then you'll also need to provide a fix for lvm zap to accommodate that along with the revert.
As I said I'm sure the zap functionality can be done with the existing code. I'll take a closer look. |
875a00a to
1879ba7
Compare
|
jenkins test ceph-volume lvm all |
It tries to print the
I'm wondering why the existing |
Seems like
I suspect the partition was added to the top-level to make it easy to access it's information. In |
1879ba7 to
b233973
Compare
|
jenkins test ceph-volume lvm all |
1 similar comment
|
jenkins test ceph-volume lvm all |
|
@andrewschoen What do you think of this?
Right, that would be straight forward. However I'd rather not see
Since the number of devices that need to be traversed is bounded (I expect we'll not see nodes with > 100 devices attached any time soon) I think this traversing overhead is bearable in exchange for a clean abstraction in |
alfredodeza
left a comment
There was a problem hiding this comment.
This addition doesn't have unit tests to go along with it, please add those. Also, it was mentioned that the inventory command broke, so I think a call to inventory should be done in the functional tests (located in tests/functional/). There are a few calls to ceph-volume lvm list for example, inventory could be run after that, or before too. That way a non-zero exit status will make our functional tests fail and we can catch this problem
b233973 to
1c03776
Compare
|
jenkins test ceph-volume lvm all |
|
@alfredodeza ping |
src/ceph-volume/ceph_volume/tests/functional/lvm/playbooks/test_bluestore.yml
Show resolved
Hide resolved
| if not sys_info.devices: | ||
| sys_info.devices = disk.get_devices() | ||
| self.sys_api = sys_info.devices.get(self.abspath, {}) | ||
| if not self.sys_api: |
There was a problem hiding this comment.
this looks great, thanks for updating
1c03776 to
e724879
Compare
|
@alfredodeza Can we please get this merged? |
|
Is this blocked by anything? I also ran into this bug and can confirm this as a valid solution. |
… in get_devices" This reverts commit 7f3c359. Fixes: http://tracker.ceph.com/issues/37506 Signed-off-by: Jan Fajerski <jfajerski@suse.com>
…vel keys" This reverts commit 6dc0177. Signed-off-by: Jan Fajerski <jfajerski@suse.com>
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
e724879 to
a183a28
Compare
|
@alfredodeza rebased |
|
jenkins test ceph-volume lvm all |
discussed over IRC, agreed to merge
|
@jan--f this doesn't look to be backported to luminous or mimic, could you please do so? Thanks! |
This reverts two commits from PR #25330. Really sorry I didn't catch this in the review. The main reason for this revert is, that it breaks
ceph-volume inventoryas it is not prepared to deal with partitions being reported as disks (and the dict carrying a different set of keys...see example output below).Fixes: http://tracker.ceph.com/issues/37506
Furthermore I think there're other arguments to be made against this change:
disk.get_devices()has done in the past and is very different from what the name suggests.disk.get_devices()