Dan Kenigsberg has uploaded a new change for review.
Change subject: connectivity log: report if Engine has been seen recently
......................................................................
connectivity log: report if Engine has been seen recently
Vdsm monitors when it has been accessed by a client (most probably
Engine). If Vdsm finds out that it has suddenly seized to be accessed
for the last 30 seconds (twice the Engine polling rate),
"recent_client:False" is logged to the connectivity.log. When polling is
restored, "recent_client:True" is reported.
Bug-Url:
https://bugzilla.redhat.com/1111234
Change-Id: Ice088421d82f60e59ada6e743aeac2704c44cb7f
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/virt/sampling.py
1 file changed, 11 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/26/30226/1
diff --git a/vdsm/virt/sampling.py b/vdsm/virt/sampling.py
index 98f705c..26d670a 100644
--- a/vdsm/virt/sampling.py
+++ b/vdsm/virt/sampling.py
@@ -37,7 +37,7 @@
from vdsm import utils
from vdsm import netinfo
from vdsm.ipwrapper import getLinks
-from vdsm.constants import P_VDSM_RUN
+from vdsm.constants import P_VDSM_RUN, P_VDSM_CLIENT_LOG
import caps
@@ -279,11 +279,16 @@
self.thpState = 'never'
self.cpuCores = CpuCoreSample()
self.numaNodeMem = NumaNodeMemorySample()
+ TYPICAL_CLIENT_POLL_INTERVAL = 15
+ self.recentClient = (
+ self.timestamp - os.stat(P_VDSM_CLIENT_LOG).st_mtime <
+ 2 * TYPICAL_CLIENT_POLL_INTERVAL)
def to_connlog(self):
- return ', '.join(
+ text = ', '.join(
('%s:(%s)' % (ifid, ifacesample.to_connlog()))
for (ifid, ifacesample) in self.interfaces.iteritems())
+ return ('recent_client:%s, ' % self.recentClient) + text
def connlog_diff(self, other):
text = ''
@@ -294,6 +299,10 @@
text += '%s:(%s) ' % (ifid, diff)
else:
text += 'new %s:(%s) ' % (ifid, sample.to_connlog())
+
+ if self.recentClient != other.recentClient:
+ text += 'recent_client:%s' % self.recentClient
+
return text
--
To view, visit
http://gerrit.ovirt.org/30226
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice088421d82f60e59ada6e743aeac2704c44cb7f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>