Project

General

Profile

Bug #37506

Change in util/disk.py get_devices() breaks inventory

Added by Jan Fajerski over 1 year ago. Updated 10 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
mimic, luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

Description

This commit https://github.com/ceph/ceph/commit/7f3c3598491e556ec1b93ea0a54f52144202fab6

breaks the inventory functionality as the result of get_devices no contains partitions of a device and these partition entries are not fully populated. E.g.:

{'/dev/vda': {'human_readable_size': '40.00 GB',
              'locked': 1,
              'model': '',
              'nr_requests': '256',
              'partitions': {'vda1': {'holders': [],
                                      'sectors': '83884032',
                                      'sectorsize': 512,
                                      'size': '40.00 GB',
                                      'start': '2048'}},
              'path': '/dev/vda',
              'removable': '0',
              'rev': '',
              'ro': '0',
              'rotational': '1',
              'sas_address': '',
              'sas_device_handle': '',
              'scheduler_mode': 'mq-deadline',
              'sectors': 0,
              'sectorsize': '512',
              'size': 42949672960.0,
              'support_discard': '',
              'vendor': '0x1af4'},
 '/dev/vda1': {'holders': [],
               'sectors': '83884032',
               'sectorsize': 512,
               'size': '40.00 GB',
               'start': '2048'},
}

Why are partitions considered top-level devices now?


Related issues

Copied to ceph-volume - Backport #38200: mimic: Change in util/disk.py get_devices() breaks inventory Resolved
Copied to ceph-volume - Backport #38201: luminous: Change in util/disk.py get_devices() breaks inventory Resolved

History

#1 Updated by Jan Fajerski over 1 year ago

inventory breaks because it tries to access the field 'human_readable_size' which the new 'partition devices' don't have.

#3 Updated by Jan Fajerski over 1 year ago

Waiting to backport this but https://github.com/ceph/ceph/pull/25351 and https://github.com/ceph/ceph/pull/25352 are not merged yet.

#4 Updated by Andrew Schoen over 1 year ago

  • Status changed from New to Pending Backport

#5 Updated by Nathan Cutler over 1 year ago

Jan Fajerski wrote:

Waiting to backport this but https://github.com/ceph/ceph/pull/25351 and https://github.com/ceph/ceph/pull/25352 are not merged yet.

Those PRs have been merged in the meantime, so I guess this backport can go forward?

#6 Updated by Jan Fajerski over 1 year ago

  • Copied to Backport #38200: mimic: Change in util/disk.py get_devices() breaks inventory added

#7 Updated by Jan Fajerski over 1 year ago

  • Copied to Backport #38201: luminous: Change in util/disk.py get_devices() breaks inventory added

#8 Updated by Jan Fajerski over 1 year ago

Thx for the reminder. Backport PR's are open.

#9 Updated by Nathan Cutler over 1 year ago

  • Backport set to mimic, luminous

#10 Updated by Nathan Cutler over 1 year ago

@Jan - if you're interested, there's a script that automates creation of the backport tracker issues. The workflow is:

1. fill out "Backport" field with the names of the stable versions you need to backport to (i.e. "mimic, luminous" or "mimic,luminous" or "mimic luminous" etc.)
2. set Status to "Pending Backport"
3. src/script/backport-create-issue [$REDMINE_ISSUE_NUMBER]

That said, until today (?) the ceph-volume project had not been using "Pending Backport" status at all.

#11 Updated by Jan Fajerski 10 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF