Change in vdsm[master]: storage: Add path cap. & PV size to getDeviceList

frolland at redhat.com frolland at redhat.com
Thu Mar 12 15:40:09 UTC 2015


Hello Fred Rolland,

I'd like you to do a code review.  Please visit

    https://gerrit.ovirt.org/38675

to review the following change.

Change subject: storage: Add path cap. & PV size to getDeviceList
......................................................................

storage: Add path cap. & PV size to getDeviceList

Adding capacity of path in the path status section in
getDeviceList.

See output :
 'pathstatus': [{'capacity': '53687091200',
                  'lun': '4',
                  'physdev': 'sdf',
                  'state': 'active',
                  'type': 'iSCSI'}],

Adding size of PV in getDevicelist.

See output:
  'productID': 'fred2',
  'pvUUID': 'KsX3rW-UcXk-G4iO-TQUT-WFHe-9eP2-n0T1A0',
  'pvsize': '53687091200',

This information is important to discover difference between
the LUN size, path size and the PV size.

Relates-To: https://bugzilla.redhat.com/609689
Change-Id: Icfa5cf4321202362f5a00dad7c9a0347ba52ec71
Signed-off-by: Fred Rolland <frolland at redhat.com>
---
M vdsm/storage/hsm.py
M vdsm/storage/multipath.py
2 files changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/75/38675/1

diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 8c75277..0de237d 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -2022,12 +2022,15 @@
             pv = pvs.get(dev.get('guid', ""))
             if pv is not None:
                 pvuuid = pv.uuid
+                pvsize = pv.size
                 vguuid = pv.vg_uuid
             else:
                 pvuuid = ""
+                pvsize = ""
                 vguuid = ""
 
             devInfo = {'GUID': dev.get("guid", ""), 'pvUUID': pvuuid,
+                       'pvsize': str(pvsize),
                        'vgUUID': vguuid, 'vendorID': dev.get("vendor", ""),
                        'productID': dev.get("product", ""),
                        'fwrev': dev.get("fwrev", ""),
diff --git a/vdsm/storage/multipath.py b/vdsm/storage/multipath.py
index f12f798..73bd1b9 100644
--- a/vdsm/storage/multipath.py
+++ b/vdsm/storage/multipath.py
@@ -205,6 +205,7 @@
             pathInfo = {}
             pathInfo["physdev"] = slave
             pathInfo["state"] = pathStatuses.get(slave, "failed")
+            pathInfo["capacity"] = str(getDeviceSize(slave))
             try:
                 hbtl = getHBTL(slave)
             except OSError as e:


-- 
To view, visit https://gerrit.ovirt.org/38675
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icfa5cf4321202362f5a00dad7c9a0347ba52ec71
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Fred Rolland <frolland at redhat.com>


More information about the vdsm-patches mailing list