Change in vdsm[master]: events: make sure to send only one event per status

piotr.kliczewski at gmail.com piotr.kliczewski at gmail.com
Fri Jun 19 13:45:18 UTC 2015


Piotr Kliczewski has posted comments on this change.

Change subject: events: make sure to send only one event per status
......................................................................


Patch Set 1:

(2 comments)

https://gerrit.ovirt.org/#/c/42579/1//COMMIT_MSG
Commit Message:

Line 7: events: make sure to send only one event per status
Line 8: 
Line 9: Initially we made an assumption that engine can handle more than one
Line 10: event containing the same status. The assumtion is not true and there
Line 11: are flows where engine logic assumes only one status change.
> could you elaborate on the Engine use flows broken by this?
I was told that there are issues with Destroy vm when we receive more than single event with 'Down' status.

Will update commit message.
Line 12: 
Line 13: Change-Id: I044a8f409ccdac4210784e21167bab320ddfe808


https://gerrit.ovirt.org/#/c/42579/1/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 381:                 self._lastStatus = value
Line 382: 
Line 383:     def send_status_event(self):
Line 384:         with self._eventLock:
Line 385:             vm_status = self._getVmStatus()['status']
> usually I prefer holding locks for the shortest possible time. do we really
We don't. Will change.
Line 386: 
Line 387:             if vm_status != self._evaluatedStatus:
Line 388:                 self._evaluatedStatus = vm_status
Line 389:                 stats = {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I044a8f409ccdac4210784e21167bab320ddfe808
Gerrit-PatchSet: 1
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: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Michal Skrivanek <mskrivan at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list