Project

General

Profile

Bug #58045

orchestrator: incorrect size listed for devices in device ls

Added by Adam King 3 months ago. Updated 3 months ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
quincy, pacific
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

currently when printing out the size in `ceph orch device ls` the orchestrator is calling a function that continually divides the raw size by 1000 instead of 1024, resulting in an incorrect size being listed. For example with a 100G disk, ceph-volume reports

{
        "available": true,
        "ceph_device": false,
        "created": "2022-11-17T15:01:42.035999Z",
        "device_id": "",
        "human_readable_type": "hdd",
        "lsm_data": {},
        "lvs": [],
        "path": "/dev/vdm",
        "rejected_reasons": [],
        "sys_api": {
          "actuators": null,
          "device_nodes": "vdm",
          "human_readable_size": "100.00 GB",
          "locked": 0,
          "model": "",
          "nr_requests": "256",
          "partitions": {},
          "path": "/dev/vdm",
          "removable": "0",
          "rev": "",
          "ro": "0",
          "rotational": "1",
          "sas_address": "",
          "sas_device_handle": "",
          "scheduler_mode": "mq-deadline",
          "sectors": 0,
          "sectorsize": "512",
          "size": 107374182400.0,
          "support_discard": "0",
          "type": "disk",
          "vendor": "0x1af4" 
  }

and the orchestrator, given this info, reports

vm-00  /dev/vdm  hdd               107G  Yes        25m ago

incorrectly saying the device is 107G instead of 100G ( (107374182400 / (1024 ^ 3)) = 100)

History

#1 Updated by Adam King 3 months ago

  • Pull request ID set to 48937

Also available in: Atom PDF