Change in vdsm[master]: events: sending stats with vm status change event

mskrivan at redhat.com mskrivan at redhat.com
Tue Apr 28 14:02:58 UTC 2015


Michal Skrivanek has posted comments on this change.

Change subject: events: sending stats with vm status change event
......................................................................


Patch Set 2:

(3 comments)

https://gerrit.ovirt.org/#/c/40204/2/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 368:         return status
Line 369: 
Line 370:     def _set_lastStatus(self, value):
Line 371:         with self._statusLock:
Line 372:             self._send_status_event(value)
> During testing of my changes I have never received the same status twice. I
possibly. though till now it didn't really matter as it has no significance to override lastStatus with the same thing. The only special handling is below for DoubleDown (and yes, I do see it sometimes;-)

should be harmless to send only on a change, no?
Line 373:             if self._lastStatus == vmstatus.DOWN:
Line 374:                 self.log.warning(
Line 375:                     'trying to set state to %s when already Down',
Line 376:                     value)


Line 386: 
Line 387:     def _send_status_event(self, value):
Line 388:         if self.lastStatus == vmstatus.DOWN:
Line 389:             stats = self._getExitedVmStats()
Line 390:         else:
> I checked the code and I believe that applist is added during _getGuestStat
we would need to dissect it more as some of the guest stats are currently needed. 
I do think this is the right place where to do it.
I'd like to ultimately have a custom structure with the minimum set of fields engine needs to make an update. Some engine-side changes could be needed
Line 391:             stats = self._getConfigVmStats()
Line 392:             stats.update(self._getRunningVmStats())
Line 393:             stats.update(self._getVmStatus())
Line 394: 


Line 4635:             self.log.warning('monitor become unresponsive'
Line 4636:                              ' (command timeout, age=%s)',
Line 4637:                              statsAge)
Line 4638:             stats['monitorResponse'] = '-1'
Line 4639:             self._send_status_event('NotResponding')
> NotResponding is part of status enum on the engine side. I think this one a
yes, but vdsm never sent this status. did you check engine's behavior in this case? (I think just follow the code path is enough at this point)
Line 4640: 
Line 4641:     def updateNumaInfo(self):
Line 4642:         self._numaInfo = numaUtils.getVmNumaNodeRuntimeInfo(self)
Line 4643: 


-- 
To view, visit https://gerrit.ovirt.org/40204
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I61a1bdea997ec24342bbb25b3baeb3e7f8313321
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <mskrivan at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list