Nir Soffer has uploaded a new change for review.
Change subject: hsm: Report vg name in getDeviceList
......................................................................
hsm: Report vg name in getDeviceList
Hosted engine needs the iscsi session info used by the hosted engine
storage domain. getDeviceList() seems to include the needed info, but it
does not report the vg name for each device, making it hard to match the
iscsi session info and the hosted engine storage domain.
We return now the vg name of each device, which seems to be useful info
regardless of hosted engine needs, and can be used on the engine side
for reconstructing host state or validating engine view vs host view.
Change-Id: I116714cb5143ea92f5cb54c3f80f895c07ada536
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M vdsm/rpc/vdsmapi-schema.json
M vdsm/storage/hsm.py
2 files changed, 11 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/23/45823/1
diff --git a/vdsm/rpc/vdsmapi-schema.json b/vdsm/rpc/vdsmapi-schema.json
index e0e95b9..1b2a171 100644
--- a/vdsm/rpc/vdsmapi-schema.json
+++ b/vdsm/rpc/vdsmapi-schema.json
@@ -1473,6 +1473,10 @@
#
# @status: The device status (free/used/unknown)
#
+# @vgname: The LVM volume group name, if this device is used as
+# a physical volume. This is typically a storage domain
+# UUID.
+#
# Since: 4.10.0
#
# Notes: The value of @serial may be dependent on the current host so this
@@ -1490,7 +1494,8 @@
'pathstatus': ['BlockDevicePathInfo'],
'pathlist': ['IscsiSessionInfo'], 'logicalblocksize':
'uint',
'physicalblocksize': 'uint', 'partitioned':
'bool',
- 'pvsize': 'uint', 'status':
'BlockDeviceStatus'}}
+ 'pvsize': 'uint', 'status':
'BlockDeviceStatus',
+ 'vgname': 'str'}}
##
# @Host.getDeviceList:
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 1b8c064..32e16c3 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -2019,14 +2019,18 @@
pvuuid = pv.uuid
pvsize = pv.size
vguuid = pv.vg_uuid
+ vgname = pv.vg_name
else:
pvuuid = ""
pvsize = ""
vguuid = ""
+ vgname = ""
devInfo = {'GUID': dev.get("guid", ""),
'pvUUID': pvuuid,
'pvsize': str(pvsize),
- 'vgUUID': vguuid, 'vendorID':
dev.get("vendor", ""),
+ 'vgUUID': vguuid,
+ 'vgname': vgname,
+ 'vendorID': dev.get("vendor", ""),
'productID': dev.get("product", ""),
'fwrev': dev.get("fwrev", ""),
"serial": dev.get("serial", ""),
--
To view, visit
https://gerrit.ovirt.org/45823
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I116714cb5143ea92f5cb54c3f80f895c07ada536
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>