ShaoHe Feng has uploaded a new change for review.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Add a flag to libvirtvm's status to report watchdog event
This flag will be set once watchdog event is triggered. And thie flag will be not cleanup after it is set unless the client restart or shutdown VM. So add a timestamp in the message of this flag.
The timestamp is the time in seconds since the Epoch.
When the client poll this flag, it should record and check the timestamp to make sure that the event is already triggered.
Change-Id: I7aa676299c748d761e216469569156140a79af65 Signed-off-by: ShaoHe Feng shaohef@linux.vnet.ibm.com --- M vdsm/libvirtvm.py 1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/29/9429/1
diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py index 3439dc3..15d3187 100644 --- a/vdsm/libvirtvm.py +++ b/vdsm/libvirtvm.py @@ -2225,6 +2225,8 @@ except IndexError: return "Received unknown watchdog action(%s)" % action
+ self.watchdogEvent = "Time: %s, Action: %s" % (time.time(), + actionToString(action)) self.log.debug("Watchdog event comes from guest %s. " "Action: %s", self.conf['vmName'], actionToString(action)) @@ -2449,6 +2451,8 @@ def getStats(self): stats = vm.Vm.getStats(self) stats['hash'] = self._devXmlHash + if hasattr(self, "watchdogEvent"): + stats["watchdogEvent"] = self.watchdogEvent return stats
def _getBalloonInfo(self):
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.ibm.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/149/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/115/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/115/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/149/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/150/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/116/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/116/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/150/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Doron Fediuck has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 2: (3 inline comments)
ShaoHe, See inline comments / question.
Thanks!
.................................................... Commit Message Line 6: Line 7: Add a flag to libvirtvm's status to report watchdog event Line 8: Line 9: This flag will be set once watchdog event is triggered. Line 10: And thie flag will be not cleanup after it is set unless the client thie/the Line 11: restart or shutdown VM. So add a timestamp in the message of this flag. Line 12: Line 13: The timestamp is the time in seconds since the Epoch. Line 14:
Line 7: Add a flag to libvirtvm's status to report watchdog event Line 8: Line 9: This flag will be set once watchdog event is triggered. Line 10: And thie flag will be not cleanup after it is set unless the client Line 11: restart or shutdown VM. So add a timestamp in the message of this flag. What happens if watchdog fires more than once for the same VM before it vdsm was polled? Line 12: Line 13: The timestamp is the time in seconds since the Epoch. Line 14: Line 15: When the client poll this flag, it should record and check the timestamp
.................................................... File vdsm/libvirtvm.py Line 2227: Line 2228: self.watchdogEvent = {} Line 2229: self.watchdogEvent["time"] = time.time() Line 2230: self.watchdogEvent["action"] = actionToString(action) Line 2231: self.log.debug("Watchdog event comes from guest %s. " I'd consider putting this as info rather than debug. Line 2232: "Action: %s", self.conf['vmName'], Line 2233: actionToString(action)) Line 2234: Line 2235: def changeCD(self, drivespec):
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 2: I would prefer that you didn't submit this
(1 inline comment)
.................................................... File vdsm/libvirtvm.py Line 2224: return actionStrings[action] Line 2225: except IndexError: Line 2226: return "Received unknown watchdog action(%s)" % action Line 2227: Line 2228: self.watchdogEvent = {} Python allows adding object attributes outside __init__, but without strong reasons, I feel that it lead to run-time surprises.
Could there be more than one watchdog event per VM? Maybe an initially-empty list of events would be good enough. Line 2229: self.watchdogEvent["time"] = time.time() Line 2230: self.watchdogEvent["action"] = actionToString(action) Line 2231: self.log.debug("Watchdog event comes from guest %s. " Line 2232: "Action: %s", self.conf['vmName'],
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
ShaoHe Feng has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 2: (4 inline comments)
.................................................... Commit Message Line 6: Line 7: Add a flag to libvirtvm's status to report watchdog event Line 8: Line 9: This flag will be set once watchdog event is triggered. Line 10: And thie flag will be not cleanup after it is set unless the client agree Line 11: restart or shutdown VM. So add a timestamp in the message of this flag. Line 12: Line 13: The timestamp is the time in seconds since the Epoch. Line 14:
Line 7: Add a flag to libvirtvm's status to report watchdog event Line 8: Line 9: This flag will be set once watchdog event is triggered. Line 10: And thie flag will be not cleanup after it is set unless the client Line 11: restart or shutdown VM. So add a timestamp in the message of this flag. this flag will be overwrite. so the next poll, it will be a new watchdog event. Line 12: Line 13: The timestamp is the time in seconds since the Epoch. Line 14: Line 15: When the client poll this flag, it should record and check the timestamp
.................................................... File vdsm/libvirtvm.py Line 2224: return actionStrings[action] Line 2225: except IndexError: Line 2226: return "Received unknown watchdog action(%s)" % action Line 2227: Line 2228: self.watchdogEvent = {} just support no more than one watchdog for per VM. The original idea for a dynamic watchdogEvent attributes, It will come up when watchdog device is added and the event was fired. No watchdog device for a VM, no watchdogEvent attributes.
surely, to avoid run-time surprises, an initially-empty list of events would be good enough. Line 2229: self.watchdogEvent["time"] = time.time() Line 2230: self.watchdogEvent["action"] = actionToString(action) Line 2231: self.log.debug("Watchdog event comes from guest %s. " Line 2232: "Action: %s", self.conf['vmName'],
Line 2227: Line 2228: self.watchdogEvent = {} Line 2229: self.watchdogEvent["time"] = time.time() Line 2230: self.watchdogEvent["action"] = actionToString(action) Line 2231: self.log.debug("Watchdog event comes from guest %s. " agree. Line 2232: "Action: %s", self.conf['vmName'], Line 2233: actionToString(action)) Line 2234: Line 2235: def changeCD(self, drivespec):
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Doron Fediuck has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 2: (1 inline comment)
.................................................... Commit Message Line 7: Add a flag to libvirtvm's status to report watchdog event Line 8: Line 9: This flag will be set once watchdog event is triggered. Line 10: And thie flag will be not cleanup after it is set unless the client Line 11: restart or shutdown VM. So add a timestamp in the message of this flag. Overwriting is good enough.
I actually had in mind 2 events happening before vdsm was polled, but since this is also being logged I think overwriting is the right thing to do. Line 12: Line 13: The timestamp is the time in seconds since the Epoch. Line 14: Line 15: When the client poll this flag, it should record and check the timestamp
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 3:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/180/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 3:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/214/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 3:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/180/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/214/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Doron Fediuck has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 3:
ShaoHe,
Where in the API will this be picked up to be reported? ie- which method will use it when engine calls getVmStats?
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
ShaoHe Feng has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 4:
Doron:
yes, engine can get watchdog event by checking the 'watchdogEvent' key in the return value of getVmStats or getAllVmStats API.
update the commit message and vdsmapi-schema.json. and also update the wiki. http://www.ovirt.org/Add_an_option_to_create_a_watchdog_device
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Doron Fediuck has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 4: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
ShaoHe Feng has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 4: Verified
add a watchdog device option when create a VM.
Verified 1. get status of VM, no watchdog event.
2. in guest OS, start watchdog service. and kill the watchdog process. get status of VM. watchdog event flag appears. again get status of VM. the same watchdog event flag, for the timestamp is same.
3. in guest OS, restart watchdog service. and kill the watchdog process again. get status of VM. a new watchdog event flag appears, for the timestamp is different.
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 4: I would prefer that you didn't submit this
(1 inline comment)
I'd appreciate Adam's opinion on this schema change.
.................................................... File vdsm/libvirtvm.py Line 2225: except IndexError: Line 2226: return "Received unknown watchdog action(%s)" % action Line 2227: Line 2228: self._watchdogEvent["time"] = time.time() Line 2229: self._watchdogEvent["action"] = actionToString(action) I think that it would be nicer if the API is more machine-friendly. Having long English string with spaces is good for humans (living in Europe...), but shorter constants such as ForcedPowerOff, CPUsPause, etc are easier to parse, and to define in the schema. Line 2230: self.log.info("Watchdog event comes from guest %s. " Line 2231: "Action: %s", self.conf['vmName'], Line 2232: actionToString(action)) Line 2233:
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 5:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/409/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.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: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 5:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/444/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.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: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 5:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/409/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/444/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.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: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Adam Litke has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 5: I would prefer that you didn't submit this
(3 inline comments)
.................................................... File vdsm_api/vdsmapi-schema.json Line 4789: # Line 4790: # @RequestShutdown: Guest is requested to gracefully shutdown Line 4791: # Line 4792: # @DebugLogged: No action, a debug message logged Line 4793: # Can you try to stick with single (all lowercase) words for these? It is an 'enum' so the strings just become the names of integer constants.
how about: ['ignore', 'pause', 'reset', 'destroy', 'shutdown', 'log'] Line 4794: # Since: 4.10.1 Line 4795: ## Line 4796: {'enum': 'WatchdogEventAction', Line 4797: 'data': ['NoAction', 'CPUsPause', 'CPUsReset', 'ForcedPowerOff',
Line 4875: # @netIfaces: Network device address info as reported by the agent Line 4876: # Line 4877: # @watchdogEvent: #optional The message of watchdog event when it was Line 4878: # triggered Line 4879: # According to the type, this really isn't a message.
"Information about the most recent watchdog event". Would be more appropriate I think. Line 4880: # Since: 4.10.0 Line 4881: ## Line 4882: {'type': 'RunningVmStats', Line 4883: 'data': {'displayPort': 'uint', 'displaySecurePort': 'uint',
Line 4894: 'appsList': ['str'], 'guestIPs': 'str', Line 4895: 'memoryStats': 'GuestMemoryStats', 'balloonInfo': 'BalloonInfo', Line 4896: 'disksUsage': ['GuestMountInfo'], Line 4897: 'netIfaces': ['GuestNetworkDeviceInfo'], Line 4898: 'watchdogEvent': 'WatchdogEvent'}} It's optional, right? Should be: '*watchdogEvent' Line 4899: Line 4900: ## Line 4901: # @VmStats: Line 4902: #
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.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: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
ShaoHe Feng has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 5: (3 inline comments)
.................................................... File vdsm_api/vdsmapi-schema.json Line 4789: # Line 4790: # @RequestShutdown: Guest is requested to gracefully shutdown Line 4791: # Line 4792: # @DebugLogged: No action, a debug message logged Line 4793: # agree Line 4794: # Since: 4.10.1 Line 4795: ## Line 4796: {'enum': 'WatchdogEventAction', Line 4797: 'data': ['NoAction', 'CPUsPause', 'CPUsReset', 'ForcedPowerOff',
Line 4875: # @netIfaces: Network device address info as reported by the agent Line 4876: # Line 4877: # @watchdogEvent: #optional The message of watchdog event when it was Line 4878: # triggered Line 4879: # agree Line 4880: # Since: 4.10.0 Line 4881: ## Line 4882: {'type': 'RunningVmStats', Line 4883: 'data': {'displayPort': 'uint', 'displaySecurePort': 'uint',
Line 4894: 'appsList': ['str'], 'guestIPs': 'str', Line 4895: 'memoryStats': 'GuestMemoryStats', 'balloonInfo': 'BalloonInfo', Line 4896: 'disksUsage': ['GuestMountInfo'], Line 4897: 'netIfaces': ['GuestNetworkDeviceInfo'], Line 4898: 'watchdogEvent': 'WatchdogEvent'}} yes. '*watchdogEvent' Line 4899: Line 4900: ## Line 4901: # @VmStats: Line 4902: #
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.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: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 6:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/480/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.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: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 6:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/445/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.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: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 6:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/445/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/480/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.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: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Doron Fediuck has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 6: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.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: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
ShaoHe Feng has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 6: Verified
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.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: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Patch Set 6: Looks good to me, approved
I don't quite like the fact that you define the same enumeration both in libvirtvm and in the schema, but I do not have a quick fix for this problem at hand.
-- To view, visit http://gerrit.ovirt.org/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.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: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has submitted this change and it was merged.
Change subject: Add a flag to libvirtvm's status to report watchdog event ......................................................................
Add a flag to libvirtvm's status to report watchdog event
This flag will be set once watchdog event is triggered. The client can get watchdog event by checking the 'watchdogEvent' key in the return value of getVmStats or getAllVmStats API. This flag will be overwriting if watchdog fires more than once for the same VM before it was polled. And the flag will be not cleanup after it is set unless the client restart or shutdown VM. So add a timestamp in the message of this flag.
The timestamp is the time in seconds since the Epoch.
When the client poll this flag, it should record and check the timestamp to make sure that the event is already triggered.
Change-Id: I7aa676299c748d761e216469569156140a79af65 Signed-off-by: ShaoHe Feng shaohef@linux.vnet.ibm.com --- M vdsm/libvirtvm.py M vdsm_api/vdsmapi-schema.json 2 files changed, 50 insertions(+), 4 deletions(-)
Approvals: ShaoHe Feng: 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/9429 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: I7aa676299c748d761e216469569156140a79af65 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng shaohef@linux.vnet.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: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
vdsm-patches@lists.fedorahosted.org