[X2Go-Commits] x2gobroker.git - build-main (branch) updated: 0.0.2.2-8-gf51f163
X2Go dev team
git-admin at x2go.org
Fri Jun 7 23:22:37 CEST 2013
The branch, build-main has been updated
via f51f163d2e8ade102a8a3d7484e0abe22f2ab4f3 (commit)
from c6e2cc412e1906e9b1ebc986622bc666fe47cd48 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
debian/changelog | 1 +
etc/x2gobroker.conf | 13 +++++++++----
x2gobroker/brokers/base_broker.py | 12 ++++++------
3 files changed, 16 insertions(+), 10 deletions(-)
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 505affa..009de91 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,7 @@ x2gobroker (0.0.2.3-0~x2go1) UNRELEASED; urgency=low
- Handle the rootless property automatically for know-by-name desktop
sessions.
- Make enable-plain-output, enable-uccs-output functional.
+ - Add agent-quer-mode »NONE«. Disable X2Go Broker Agent calls completely.
-- Mike Gabriel <mike.gabriel at das-netzwerkteam.de> Wed, 22 May 2013 17:42:12 +0200
diff --git a/etc/x2gobroker.conf b/etc/x2gobroker.conf
index 275a486..c98b6e1 100644
--- a/etc/x2gobroker.conf
+++ b/etc/x2gobroker.conf
@@ -112,16 +112,21 @@
# on the local system (mode: LOCAL) or on all X2Go Servers (mode: SSH) in a
# multi-server farm.
#
-# So, there are two query modes for the X2GO Broker Agent: LOCAL and SSH.
+# So, there are three query modes for the X2GO Broker Agent: NONE, LOCAL and
+# SSH.
+#
+# NONE - Try to get along without X2Go Broker Agent queries. For simple
+# broker setups this may suffice. For load-balancing or reliable
+# session suspending and resuming the broker agent is a must!!!
#
# LOCAL - This LOCAL mode only works for _one_ configured multi-server farm.
-# If the locally installed X2Go Session Broker is to server many
-# different multi-server farms, then the LOCAL mode will not work!!!
+# If this X2Go Session Broker is supposed to serve many different
+# multi-server farms, then the LOCAL mode will not work!!!
#
# How it works: Assume that the local system has an X2Go Broker Agent
# that knows about the multi-server setup. This means: X2Go Server
# has to be installed locally and the X2Go Server has to be
-# configured to use the multi-server farms PostgreSQL session DB
+# configured to use the multi-server farm's PostgreSQL session DB
# backend.
#
# The local system that is running the broker does not necessarily
diff --git a/x2gobroker/brokers/base_broker.py b/x2gobroker/brokers/base_broker.py
index efa164e..2738105 100644
--- a/x2gobroker/brokers/base_broker.py
+++ b/x2gobroker/brokers/base_broker.py
@@ -853,14 +853,14 @@ class X2GoBroker(object):
# if we have more than one server, pick one server randomly for X2Go Broker Agent queries
server_list = profile[u'host']
random.shuffle(server_list)
- agent_query_mode = self.get_agent_query_mode()
+ agent_query_mode = self.get_agent_query_mode().upper()
remote_agent = None
- if agent_query_mode.upper() == u'SSH':
+ if agent_query_mode == u'SSH':
remote_agent = self.random_remote_agent(profile_id)
# detect best X2Go server for this user if load balancing is configured
- if len(server_list) >= 2 and username:
+ if agent_query_mode != u'NONE' and len(server_list) >= 2 and username:
# query remote agent for session info, if one of the server's is down, we will try the next one...
busy_servers = None
@@ -872,7 +872,7 @@ class X2GoBroker(object):
except x2gobroker.x2gobroker_exceptions.X2GoBrokerAgentException:
logger_broker.warning('base_broker.X2GoBroker.select_session(): failed to query broker agent (quey-mode: {query_mode}, remote_agent: {remote_agent})'.format(query_mode=agent_query_mode, remote_agent=remote_agent))
- if agent_query_mode.upper() == u'SSH':
+ if agent_query_mode == u'SSH':
# mark this agent as bad
exclude_agents.append(remote_agent)
# also remove this agent from the list of available servers as the machine is probably down
@@ -944,7 +944,7 @@ class X2GoBroker(object):
}
# find already running sessions and resume the first one found
- if len(server_list) >= 2 and username:
+ if agent_query_mode != u'NONE' and len(server_list) >= 2 and username:
session_list = x2gobroker.agent.list_sessions(username=username, query_mode=agent_query_mode, remote_agent=remote_agent)
if session_list:
@@ -972,7 +972,7 @@ class X2GoBroker(object):
# session autologin feature
- if self.use_session_autologin(profile_id):
+ if agent_query_mode != u'NONE' and self.use_session_autologin(profile_id):
# FIXME: we somehow have to find out about the username of the person at the broker client-side...
# using the username used for broker login for now...
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
More information about the x2go-commits
mailing list