Hello Dan Kenigsberg, Milan Zamazal, Martin Polednik,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/65812
to review the following change.
Change subject: vm: reformat setUnresponsiveIfTimeout ......................................................................
vm: reformat setUnresponsiveIfTimeout
Reformat the order of operations to make clear on which cases we don't care about timeouts.
Change-Id: I53e9c284962f7ebe3987e460e4d138f2a08704dc Backport-To: 4.0 Backport-To: 3.6 Bug-Url: https://bugzilla.redhat.com/1382578 Bug-Url: https://bugzilla.redhat.com/1382583 Signed-off-by: Francesco Romani fromani@redhat.com Reviewed-on: https://gerrit.ovirt.org/65504 Continuous-Integration: Jenkins CI Reviewed-by: Martin Polednik mpolednik@redhat.com Reviewed-by: Milan Zamazal mzamazal@redhat.com Reviewed-by: Dan Kenigsberg danken@redhat.com --- M vdsm/virt/vm.py 1 file changed, 12 insertions(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/12/65812/1
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index 65c8731..5659ac5 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -4835,13 +4835,18 @@ reason)
def _setUnresponsiveIfTimeout(self, stats, statsAge): - if (not self.isMigrating() - and statsAge > config.getint('vars', 'vm_command_timeout') - and stats['monitorResponse'] != '-1'): - self.log.warning('monitor become unresponsive' - ' (command timeout, age=%s)', - statsAge) - stats['monitorResponse'] = '-1' + if self.isMigrating(): + return + # we don't care about decimals here + if statsAge < config.getint('vars', 'vm_command_timeout'): + return + if stats['monitorResponse'] == '-1': + return + + self.log.warning('monitor became unresponsive' + ' (command timeout, age=%s)', + statsAge) + stats['monitorResponse'] = '-1'
def updateNumaInfo(self): self._numaInfo = numa.getVmNumaNodeRuntimeInfo(self)
gerrit-hooks has posted comments on this change.
Change subject: vm: reformat setUnresponsiveIfTimeout ......................................................................
Patch Set 1:
* Update Tracker::#1382578::IGNORE, not relevant for Red Hat classification * Update Tracker::#1382583::IGNORE, not relevant for Red Hat classification * Check Bug-Url::IGNORE, not relevant for 'Red Hat' classification * Check Bug-Url::IGNORE, not relevant for 'Red Hat' classification * Check Public Bug::#1382578::OK, public bug * Check Public Bug::#1382583::OK, public bug * Check merged to previous::OK, change not open on any previous branch
Milan Zamazal has posted comments on this change.
Change subject: vm: reformat setUnresponsiveIfTimeout ......................................................................
Patch Set 1: Code-Review+1
Martin Polednik has posted comments on this change.
Change subject: vm: reformat setUnresponsiveIfTimeout ......................................................................
Patch Set 1: Code-Review+1
Francesco Romani has posted comments on this change.
Change subject: vm: reformat setUnresponsiveIfTimeout ......................................................................
Patch Set 1: Verified+1
verified on branch, same way as master
Francesco Romani has posted comments on this change.
Change subject: vm: reformat setUnresponsiveIfTimeout ......................................................................
Patch Set 1: Code-Review+2
Francesco Romani has submitted this change and it was merged.
Change subject: vm: reformat setUnresponsiveIfTimeout ......................................................................
vm: reformat setUnresponsiveIfTimeout
Reformat the order of operations to make clear on which cases we don't care about timeouts.
Change-Id: I53e9c284962f7ebe3987e460e4d138f2a08704dc Backport-To: 4.0 Backport-To: 3.6 Bug-Url: https://bugzilla.redhat.com/1382578 Bug-Url: https://bugzilla.redhat.com/1382583 Signed-off-by: Francesco Romani fromani@redhat.com Reviewed-on: https://gerrit.ovirt.org/65504 Continuous-Integration: Jenkins CI Reviewed-by: Martin Polednik mpolednik@redhat.com Reviewed-by: Milan Zamazal mzamazal@redhat.com Reviewed-by: Dan Kenigsberg danken@redhat.com Reviewed-on: https://gerrit.ovirt.org/65812 --- M vdsm/virt/vm.py 1 file changed, 12 insertions(+), 7 deletions(-)
Approvals: Jenkins CI: Passed CI tests Francesco Romani: Verified; Looks good to me, approved Martin Polednik: Looks good to me, but someone else must approve Milan Zamazal: Looks good to me, but someone else must approve
gerrit-hooks has posted comments on this change.
Change subject: vm: reformat setUnresponsiveIfTimeout ......................................................................
Patch Set 2:
* update_tracker: OK * Set MODIFIED::bug 1382578::::#1382578::::OK * Set MODIFIED::bug 1382578::::bug 1382583::::#1382583::SKIPPED, tm_suffix '' does not match branch_suffix '4.0'.
vdsm-patches@lists.fedorahosted.org