Francesco Romani has submitted this change and it was merged.
Change subject: hsm: Support checkStatus param in getDeviceList
......................................................................
hsm: Support checkStatus param in getDeviceList
In order to populate the 'status' field, the getDeviceList
verb perform a create PV test. This operation is expensive, and in
setups with large number of devices it will cause performance issue.
However, the 'status' field is not always needed. This patch
add an optional 'checkStatus' boolean parameter to getDeviceList.
By default it will be True to keep same behavior as before.
If specified as False, the PV create test will be skipped and the
'status' field will be populated as 'unknown'.
The flow before this patch was:
- Engine calls getDeviceList, VDSM perform status check for each
devices, possibly times out
- User select a few devices (typically one)
- Engine warn user about used devices
The flow with this patch:
- Engine calls getDeviceList, skipping status check
- User select a few devices (typically one)
- Engine calls getDeviceList, checking status only for selected
- Engine warn user about used devices
On a setup of 100 ISCSI devices, the command took 3s without
the PV create test against 58s with the test.
real 0m2.987s
user 0m0.263s
sys 0m0.028s
real 0m57.769s
user 0m0.265s
sys 0m0.024s
Examples:
getDeviceList
return all devices
getDeviceList FCP
return only FCP devices
getDeviceList FCP True
return only FCP devices and perform PV create test
getDeviceList ISCSI False guid1 guid2
return info for guid1 and guid2, assuming ISCSI type
without performing PV create test
Change-Id: Ic28954708f2fd7c7b721aa7f9a0fb6e1a6019597
Bug-Url:
https://bugzilla.redhat.com/1217401
Signed-off-by: Fred Rolland <frolland(a)redhat.com>
Reviewed-on:
https://gerrit.ovirt.org/45093
Continuous-Integration: Jenkins CI
Reviewed-by: Nir Soffer <nsoffer(a)redhat.com>
Reviewed-by: Allon Mureinik <amureini(a)redhat.com>
Reviewed-on:
https://gerrit.ovirt.org/45759
Reviewed-by: Francesco Romani <fromani(a)redhat.com>
---
M client/vdsClient.py
M vdsm/API.py
M vdsm/rpc/bindingxmlrpc.py
M vdsm/rpc/vdsmapi-schema.json
M vdsm/storage/hsm.py
5 files changed, 77 insertions(+), 29 deletions(-)
Approvals:
Jenkins CI: Passed CI tests
Allon Mureinik: Looks good to me, but someone else must approve
Francesco Romani: Looks good to me, approved
Freddy Rolland: Verified
--
To view, visit
https://gerrit.ovirt.org/45759
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic28954708f2fd7c7b721aa7f9a0fb6e1a6019597
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Freddy Rolland <frolland(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: automation(a)ovirt.org