Change in vdsm[master]: virt: Avoid timeout log spam due to channel timeouts
vfeenstr at redhat.com
vfeenstr at redhat.com
Tue May 13 11:12:48 UTC 2014
Vinzenz Feenstra has uploaded a new change for review.
Change subject: virt: Avoid timeout log spam due to channel timeouts
......................................................................
virt: Avoid timeout log spam due to channel timeouts
Currently vmchannels.Listener is logging every timeout events every
30 seconds (based on guest_agent_timeout config value):
vmChannels::91::vds::(_handle_timeouts) Timeout on fileno 106.
This patch changes this behaviour to keep track if a timeout has
been logged before and in that case wouldn't log it again until
a new event (like incoming data) has been received.
Change-Id: I82e868ce7c0ab28a9f7983887a097f760c3d0f69
Bug-Url: https://bugzilla.redhat.com/1096312
Signed-off-by: Vinzenz Feenstra <vfeenstr at redhat.com>
---
M vdsm/virt/vmchannels.py
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/27/27627/1
diff --git a/vdsm/virt/vmchannels.py b/vdsm/virt/vmchannels.py
index d31cd47..b053a64 100644
--- a/vdsm/virt/vmchannels.py
+++ b/vdsm/virt/vmchannels.py
@@ -59,6 +59,7 @@
event)
elif (event & select.EPOLLIN):
obj = self._channels[fileno]
+ obj['timeout_seen'] = False
obj['reconnects'] = 0
try:
if obj['read_cb'](obj['opaque']):
@@ -73,6 +74,7 @@
def _prepare_reconnect(self, fileno):
obj = self._channels.pop(fileno)
+ obj['timeout_seen'] = False
try:
fileno = obj['create_cb'](obj['opaque'])
except:
@@ -89,7 +91,9 @@
now = time.time()
for (fileno, obj) in self._channels.items():
if (now - obj['read_time']) >= self._timeout:
- self.log.debug("Timeout on fileno %d.", fileno)
+ if not obj.get('timeout_seen', False):
+ self.log.debug("Timeout on fileno %d.", fileno)
+ obj['timeout_seen'] = True
try:
obj['timeout_cb'](obj['opaque'])
obj['read_time'] = now
--
To view, visit http://gerrit.ovirt.org/27627
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I82e868ce7c0ab28a9f7983887a097f760c3d0f69
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <vfeenstr at redhat.com>
More information about the vdsm-patches
mailing list