Adam Litke has uploaded a new change for review.
Change subject: mom: Report the status of the mom threads ......................................................................
mom: Report the status of the mom threads
It will be useful to check on the status of the MOM threads. Add a new field to the HostStats structure to provide this information.
Change-Id: Ibd36a5c3a91abfa3fa29c811ce9b3586bf0bda36 Signed-off-by: Adam Litke agl@us.ibm.com --- M vdsm/API.py M vdsm/momIF.py M vdsm_api/vdsmapi-schema.json 3 files changed, 28 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/87/9287/1
diff --git a/vdsm/API.py b/vdsm/API.py index 202afc8..cb1f4cc 100644 --- a/vdsm/API.py +++ b/vdsm/API.py @@ -1120,8 +1120,10 @@ stats['dateTime'] = '%02d-%02d-%02dT%02d:%02d:%02d GMT' % ( tm_year, tm_mon, tm_day, tm_hour, tm_min, tm_sec) if self._cif.mom: + stats['momStatus'] = self._cif.mom.getStatus() stats.update(self._cif.mom.getKsmStats()) else: + stats['momStatus'] = 'disabled' stats['ksmState'] = self._cif.ksmMonitor.state stats['ksmPages'] = self._cif.ksmMonitor.pages stats['ksmCpu'] = self._cif.ksmMonitor.cpuUsage diff --git a/vdsm/momIF.py b/vdsm/momIF.py index 827e9e4..cbe94d0 100644 --- a/vdsm/momIF.py +++ b/vdsm/momIF.py @@ -55,3 +55,9 @@ if self._mom is not None: self.log.info("Shutting down MOM") self._mom.shutdown() + + def getStatus(self): + if self.isAlive(): + return 'active' + else: + return 'stopped' diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json index 6591410..149bfef 100644 --- a/vdsm_api/vdsmapi-schema.json +++ b/vdsm_api/vdsmapi-schema.json @@ -1420,6 +1420,22 @@ 'key': 'str', 'value': 'PathStats'}
## +# @MOMStatus: +# +# An enumeration of possible MOM statuses. +# +# @disabled: MOM is not enabled on this host +# +# @active: MOM is enabled and running +# +# @stopped: MOM has terminated +# +# Since: 4.10.1 +## +{'enum': 'MOMStatus', 'data': ['disabled', 'active', 'stopped']} + + +## # @HostStats: # # Statistics about this host. @@ -1490,6 +1506,8 @@ # # @generationID: A @UUID that is refreshed each time vdsm starts # +# @momStatus: The current status of the MOM policy engine +# # Since: 4.10.0 ## {'type': 'HostStats', @@ -1506,7 +1524,8 @@ 'swapTotal': 'int', 'swapFree': 'int','vmCount': 'int', 'vmActive': 'int', 'vmMigrating': 'int', 'dateTime': 'str', 'ksmState': 'bool', 'ksmPages': 'int', 'ksmCpu': 'float', - 'netConfigDirty': 'bool', 'generationID': 'UUID'} + 'netConfigDirty': 'bool', 'generationID': 'UUID', + 'momStatus': 'MOMStatus'}
## # @Host.getStats:
-- To view, visit http://gerrit.ovirt.org/9287 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: Ibd36a5c3a91abfa3fa29c811ce9b3586bf0bda36 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: mom: Report the status of the mom threads ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/54/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9287 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ibd36a5c3a91abfa3fa29c811ce9b3586bf0bda36 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: mom: Report the status of the mom threads ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/31/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9287 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ibd36a5c3a91abfa3fa29c811ce9b3586bf0bda36 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: mom: Report the status of the mom threads ......................................................................
Patch Set 1: Fails; I would prefer that you didn't submit this
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/31/ : UNSTABLE
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/54/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/9287 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ibd36a5c3a91abfa3fa29c811ce9b3586bf0bda36 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Doron Fediuck has posted comments on this change.
Change subject: mom: Report the status of the mom threads ......................................................................
Patch Set 1: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/9287 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ibd36a5c3a91abfa3fa29c811ce9b3586bf0bda36 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Shu Ming has posted comments on this change.
Change subject: mom: Report the status of the mom threads ......................................................................
Patch Set 1: Looks good to me, but someone else must approve
A nit, Is it more meaningful to use the state "inative" instead of "stopped"? "inative" is the direct opposite to "active". Is that not clear that "stopped" can be "paused" or "shutdown"?
-- To view, visit http://gerrit.ovirt.org/9287 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ibd36a5c3a91abfa3fa29c811ce9b3586bf0bda36 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
ShaoHe Feng has posted comments on this change.
Change subject: mom: Report the status of the mom threads ......................................................................
Patch Set 1: Looks good to me, but someone else must approve
"inative" better?
-- To view, visit http://gerrit.ovirt.org/9287 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ibd36a5c3a91abfa3fa29c811ce9b3586bf0bda36 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has posted comments on this change.
Change subject: mom: Report the status of the mom threads ......................................................................
Patch Set 1: Looks good to me, but someone else must approve
(1 inline comment)
.................................................... File vdsm/momIF.py Line 59: def getStatus(self): Line 60: if self.isAlive(): Line 61: return 'active' Line 62: else: Line 63: return 'stopped' return 'active' if self.isAlive() else 'stopped'
is better? I don't know.
-- To view, visit http://gerrit.ovirt.org/9287 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ibd36a5c3a91abfa3fa29c811ce9b3586bf0bda36 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: mom: Report the status of the mom threads ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/54/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9287 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ibd36a5c3a91abfa3fa29c811ce9b3586bf0bda36 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: mom: Report the status of the mom threads ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/77/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9287 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ibd36a5c3a91abfa3fa29c811ce9b3586bf0bda36 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: mom: Report the status of the mom threads ......................................................................
Patch Set 2: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/77/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/54/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/9287 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ibd36a5c3a91abfa3fa29c811ce9b3586bf0bda36 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: mom: Report the status of the mom threads ......................................................................
Patch Set 2: No score
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/97/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9287 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ibd36a5c3a91abfa3fa29c811ce9b3586bf0bda36 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: mom: Report the status of the mom threads ......................................................................
Patch Set 2: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/54/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/97/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/9287 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ibd36a5c3a91abfa3fa29c811ce9b3586bf0bda36 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Doron Fediuck has posted comments on this change.
Change subject: mom: Report the status of the mom threads ......................................................................
Patch Set 2:
Jenkins failed on a non-related issue:
File "/usr/lib64/python2.7/socket.py", line 224, in meth return getattr(self._sock,name)(*args) error: [Errno 98] Address already in use
I suggest re-trigerring or rebasing the patch.
-- To view, visit http://gerrit.ovirt.org/9287 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ibd36a5c3a91abfa3fa29c811ce9b3586bf0bda36 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Doron Fediuck has posted comments on this change.
Change subject: mom: Report the status of the mom threads ......................................................................
Patch Set 2: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/9287 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ibd36a5c3a91abfa3fa29c811ce9b3586bf0bda36 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Adam Litke has posted comments on this change.
Change subject: mom: Report the status of the mom threads ......................................................................
Patch Set 2: Verified
-- To view, visit http://gerrit.ovirt.org/9287 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ibd36a5c3a91abfa3fa29c811ce9b3586bf0bda36 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com
Dan Kenigsberg has posted comments on this change.
Change subject: mom: Report the status of the mom threads ......................................................................
Patch Set 2: Looks good to me, approved
(1 inline comment)
.................................................... File vdsm_api/vdsmapi-schema.json Line 1429: # @active: MOM is enabled and running Line 1430: # Line 1431: # @inactive: MOM has terminated Line 1432: # Line 1433: # Since: 4.10.1 we're deep into 4.10.2 Line 1434: ## Line 1435: {'enum': 'MOMStatus', 'data': ['disabled', 'active', 'inactive']} Line 1436: Line 1437:
-- To view, visit http://gerrit.ovirt.org/9287 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ibd36a5c3a91abfa3fa29c811ce9b3586bf0bda36 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com
Dan Kenigsberg has submitted this change and it was merged.
Change subject: mom: Report the status of the mom threads ......................................................................
mom: Report the status of the mom threads
It will be useful to check on the status of the MOM threads. Add a new field to the HostStats structure to provide this information.
Change-Id: Ibd36a5c3a91abfa3fa29c811ce9b3586bf0bda36 Signed-off-by: Adam Litke agl@us.ibm.com --- M vdsm/API.py M vdsm/momIF.py M vdsm_api/vdsmapi-schema.json 3 files changed, 28 insertions(+), 1 deletion(-)
Approvals: Adam Litke: Verified Doron Fediuck: Looks good to me, but someone else must approve Dan Kenigsberg: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/9287 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: Ibd36a5c3a91abfa3fa29c811ce9b3586bf0bda36 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com
vdsm-patches@lists.fedorahosted.org