[X2Go-Commits] [x2gobroker] 06/18: x2gobroker/loadchecker.py: Report properly to the logger if we fail to obtain a load factor.

git-admin at x2go.org git-admin at x2go.org
Mon Apr 30 19:10:55 CEST 2018

This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2gobroker.

commit 33788c6fad91b4d5b06497a641ae1f62e37ef269
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Apr 30 16:59:01 2018 +0200

    x2gobroker/loadchecker.py: Report properly to the logger if we fail to obtain a load factor.
 x2gobroker/loadchecker.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/x2gobroker/loadchecker.py b/x2gobroker/loadchecker.py
index b2a68c9..1ee423e 100644
--- a/x2gobroker/loadchecker.py
+++ b/x2gobroker/loadchecker.py
@@ -199,8 +199,10 @@ class LoadChecker(threading.Thread):
                         if _load_factor is None:
                             if self.logger: self.logger.info('LoadChecker.loadchecker(): backend={backend}, profile_id={profile_id}, hostname={hostname}, load factor not available'.format(backend=backend, profile_id=profile_id, hostname=remote_agent['hostname']))
                             num_failed_queries += 1
-                        else:
+                        elif type(_load_factor) is int:
                             if self.logger: self.logger.info('LoadChecker.loadchecker(): contacted remote broker agent for backend={backend}, profile_id={profile_id}, hostname={hostname}, new load factor is: {lf}'.format(backend=backend, profile_id=profile_id, hostname=remote_agent['hostname'], lf=_load_factor))
+                        else:
+                            if self.logger: self.logger.warning('LoadChecker.loadchecker(): no load factor could be obtained for backend={backend}, profile_id={profile_id}, hostname={hostname}, reason: {reason}'.format(backend=backend, profile_id=profile_id, hostname=remote_agent['hostname'], reason=_load_factor))
                         self.server_load[backend][profile_id][remote_agent['hostname']] = _load_factor
                         if time_to_sleep > 0:
                             if self.logger: self.logger.debug('LoadChecker.loadchecker(): sleeping for {secs}secs before querying next server'.format(secs=time_to_sleep))

Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git

More information about the x2go-commits mailing list