Francesco Romani has uploaded a new change for review.
Change subject: virt: periodic: avoid NotConnectedError spam
......................................................................
virt: periodic: avoid NotConnectedError spam
periodic operations have well known races on
VM startup and VM shutdown.
These races are well known, because periodic are
asynchronous with respect VM startup/shutdown,
and are benign because operations are just supposed
to be retried next cycle.
Under high load and/or unresponsive libvirt, we may
have log spam for Vm._dom being unconnected.
Let's avoid useless and scary stacktraces in the logs.
X-Backport-To: 3.6
Change-Id: I920e3b0b0e80e0a66ad199607068424986933d3a
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/virt/periodic.py
1 file changed, 8 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/13/44813/1
diff --git a/vdsm/virt/periodic.py b/vdsm/virt/periodic.py
index a2ee8ba..6a2841b 100644
--- a/vdsm/virt/periodic.py
+++ b/vdsm/virt/periodic.py
@@ -32,6 +32,7 @@
from vdsm.utils import monotonic_time
from . import sampling
+from . import virdomain
# just a made up number. Maybe should be equal to number of cores?
@@ -268,7 +269,13 @@
return self._vm.isDomainReadyForCommands()
def __call__(self):
- self._execute()
+ try:
+ self._execute()
+ except virdomain.NotConnectedError:
+ # no worries, let's retry again next time.
+ # but let's not spam logs with useless stacktraces.
+ self._vm.log.warning('could not run on %s: domain not connected',
+ self._vm.id)
class UpdateVolumes(_RunnableVmOperation):
--
To view, visit
https://gerrit.ovirt.org/44813
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I920e3b0b0e80e0a66ad199607068424986933d3a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>