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 <[email protected]> --- 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 <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
