Change in vdsm[master]: vm: event: emit event on setDownStatus

fromani at redhat.com fromani at redhat.com
Fri Jul 17 15:38:25 UTC 2015


Francesco Romani has posted comments on this change.

Change subject: vm: event: emit event on setDownStatus
......................................................................


Patch Set 17:

(1 comment)

https://gerrit.ovirt.org/#/c/43270/17/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 1294:                     self.conf['exitMessage'] = exitMessage
Line 1295:                 self.conf['exitReason'] = exitReasonCode
Line 1296:             self.log.info("Changed state to Down: %s (code=%i)",
Line 1297:                           exitMessage, exitReasonCode)
Line 1298:             # DoubleDownError is protecting us here
> for me, and most certainly for the future me, this comment is completely op
Will fix the comment.

I completely agree about DoubleDownError. Will fix in a future patch (among another truckload of cleanups vm.py desperately needs :\).

Here I'd like to send an event after saveState. It seems a little safer - VDSM is notifying after it consolidated the VM state, and the price seems fairly low.
I can of course reorder the actions here (moving saveState() up and manage to avoid event_data), but I need to carefully test so I'd rather avoid to do this now. Will add a TODO, however.
Line 1299:             event_data = self._getExitedVmStats()
Line 1300:         except DoubleDownError:
Line 1301:             pass
Line 1302:         try:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9a99d074461bcc2b61d15dd46f7d020abbe48afe
Gerrit-PatchSet: 17
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list