Change in vdsm[master]: virt: Trigger event on guest agent status changes

mskrivan at redhat.com mskrivan at redhat.com
Wed May 20 11:47:56 UTC 2015


Michal Skrivanek has posted comments on this change.

Change subject: virt: Trigger event on guest agent status changes
......................................................................


Patch Set 2:

(1 comment)

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

Line 354:         self._vmJobs = None
Line 355: 
Line 356:     def _agent_status_changed(self):
Line 357:         vm_status = self._getVmStatus()
Line 358:         if self.lastStatus != vm_status:
> we override the reported status with the guest status only if status is 'UP
another alternative is to step back and simply fire the event (with _getVmStatus()) every time guest agent tells you there's a status change. Since it is called only on a change it won't happen blindly and it would be reasonably safe to just send it here
Line 359:             self._send_status_event(vm_status['status'])
Line 360: 
Line 361:     def _get_lastStatus(self):
Line 362:         # note that we don't use _statusLock here. One of the reasons is the


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iaceca8e42720df50d5eb1e20670b6ed733db8b50
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <vfeenstr at redhat.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: 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