Skip to content

mimic ceph-volume add device_id to inventory listing#25349

Merged
alfredodeza merged 2 commits intoceph:mimicfrom
alfredodeza:mimic-c-v-inventory-add-device_id
Dec 4, 2018
Merged

mimic ceph-volume add device_id to inventory listing#25349
alfredodeza merged 2 commits intoceph:mimicfrom
alfredodeza:mimic-c-v-inventory-add-device_id

Conversation

@alfredodeza
Copy link
Contributor

This PR changes the device_id implementation from using ID_SERIAL to ID_MODEL + _ + ID_SERIAL_SHORT (1) and adds an equivalent python implementation to ceph-volume (2).

  1. The reasoning is that the new implementation seem more reliable. ID_SERIAL often contains the model and serial, but sometimes only the serial.

  2. The python implementation is not equivalent yet for the FreeBSD case. In C++ this uses sysfs and ioctl with a (Free?)BSD specific constant. I'm not sure yet of the same call can be made with python's ioctl implementation. If so this should also be a RFC if we should move this to python/ceph-volume and call it from C++ to avoid the duplicate implementation.

Fixes: https://tracker.ceph.com/issues/37083
Backport of: #25201

Jan Fajerski added 2 commits November 30, 2018 14:01
This intends to mimic the C++ implementation in src/common/blkdev.cc.

Signed-off-by: Jan Fajerski <jfajerski@suse.com>
(cherry picked from commit 41da5e9)
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
(cherry picked from commit 58316e3)
@ceph-jenkins ceph-jenkins added this to the mimic milestone Nov 30, 2018
@alfredodeza alfredodeza requested a review from jan--f November 30, 2018 19:01
@alfredodeza alfredodeza merged commit 802ee23 into ceph:mimic Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants