Michal Skrivanek has posted comments on this change.
Change subject: virt: Try to detect non guest iniated shutdowns
......................................................................
Patch Set 3:
(2 comments)
https://gerrit.ovirt.org/#/c/64991/3/lib/vdsm/virt/guestagent.py
File lib/vdsm/virt/guestagent.py:
Line 188: def has_seen_shutdown(self):
Line 189: diff = time.time() - self._agentTimestamp
Line 190: if diff < GuestAgent.SEEN_SHUTDOWN_TIMEOUT:
Line 191: return self._seen_shutdown
Line 192: return False
hm, we might consider this case as the opposite...to not restart VMs without (updated) GA
out of a sudden
Line 193:
Line 194: def _on_completion(self, reply_id):
Line 195: with self._completion_lock:
Line 196: event = self._completion_events.pop(reply_id, None)
https://gerrit.ovirt.org/#/c/64991/3/vdsm/virt/vm.py
File vdsm/virt/vm.py:
Line 4133: seen_shutdown = not self.guestAgent or \
Line 4134: self.guestAgent.has_seen_shutdown()
Line 4135: with self._shutdownLock:
Line 4136: if self._shutdownReason is None and seen_shutdown:
Line 4137: # do not overwrite admin shutdown, if present
move this comment to your newly added comment block
Line 4138: self._shutdownReason = vmexitreason.USER_SHUTDOWN
Line 4139: self._onQemuDeath()
Line 4140: elif event == libvirt.VIR_DOMAIN_EVENT_SUSPENDED:
Line 4141: self._setGuestCpuRunning(False)
--
To view, visit
https://gerrit.ovirt.org/64991
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie04b9806fbf0a81dc576aa28cfdda5edb079ce29
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes