Hello Ayal Baron, Sandro Bonazzola, Sergey Gotliv,
I'd like you to do a code review. Please visit
to review the following change.
Change subject: stats: return domain lockspace status ......................................................................
stats: return domain lockspace status
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1019273 Change-Id: I7069781f9945b4e4637b769a22562de30a6d681d Signed-off-by: Federico Simoncelli fsimonce@redhat.com Reviewed-on: http://gerrit.ovirt.org/20099 Reviewed-by: Ayal Baron abaron@redhat.com Reviewed-by: Sergey Gotliv sgotliv@redhat.com Tested-by: Sandro Bonazzola sbonazzo@redhat.com --- M vdsm/sampling.py M vdsm/storage/hsm.py M vdsm_api/vdsmapi-schema.json 3 files changed, 15 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/93/20193/1
diff --git a/vdsm/sampling.py b/vdsm/sampling.py index dd446c4..0a0ab9c 100644 --- a/vdsm/sampling.py +++ b/vdsm/sampling.py @@ -518,11 +518,14 @@ self._imagesStatus._refreshStorageDomains() now = time.time() for sd, d in self._imagesStatus.storageDomains.iteritems(): - stats['storageDomains'][sd] = {'code': d['code'], - 'delay': d['delay'], - 'lastCheck': d['lastCheck'], - 'valid': d['valid'], - 'version': d['version']} + stats['storageDomains'][sd] = { + 'code': d['code'], + 'delay': d['delay'], + 'lastCheck': d['lastCheck'], + 'valid': d['valid'], + 'version': d['version'], + 'acquired': d['acquired'], + } stats['elapsedTime'] = int(now - self.startTime) if len(self._samples) < 2: return stats diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py index 01edb44..d73d0f7 100644 --- a/vdsm/storage/hsm.py +++ b/vdsm/storage/hsm.py @@ -3629,6 +3629,8 @@ 'delay': str(domStatus.readDelay), 'valid': (domStatus.error is None), 'version': domStatus.version, + # domStatus.hasHostId can also be None + 'acquired': domStatus.hasHostId is True, },
'disktotal': disktotal, diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json index 60b4bd5..898ab5c 100644 --- a/vdsm_api/vdsmapi-schema.json +++ b/vdsm_api/vdsmapi-schema.json @@ -1449,12 +1449,16 @@ # # @version: Indicates the Storage Domain version # +# @acquired: Indicates if the lockspace on the Storage Domain has been +# acquired and therefore if it's possible to run (sanlock) +# protected VMs +# # Since: 4.10.0 # XXX: Add an enum for return codes and their meanings ## {'type': 'StorageDomainVitals', 'data': {'code': 'int', 'delay': 'float', 'lastCheck': 'float', - 'valid': 'bool', 'version': 'int'}} + 'valid': 'bool', 'version': 'int', 'acquired': 'bool'}}
## # @PathStats:
Sandro Bonazzola has posted comments on this change.
Change subject: stats: return domain lockspace status ......................................................................
Patch Set 2:
Any chance to have this in oVirt 3.3.2 ?
Sandro Bonazzola has posted comments on this change.
Change subject: stats: return domain lockspace status ......................................................................
Patch Set 3: Code-Review+1
Saggi Mizrahi has posted comments on this change.
Change subject: stats: return domain lockspace status ......................................................................
Patch Set 3:
One of SaggiMizrahi's automated scripts discovered this patch might require his approval. Please wait until he had time to check it out.
Federico Simoncelli has abandoned this change.
Change subject: stats: return domain lockspace status ......................................................................
Abandoned
vdsm-patches@lists.fedorahosted.org