The branch, master has been updated via 76e62996558b33a95028ffac3173db51f178ebdc (commit) from 014e9a5c9b1535aa2a53114654f17f61d01cdf8c (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 ----------------------------------------------------------------- commit 76e62996558b33a95028ffac3173db51f178ebdc Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Oct 2 16:58:06 2013 +0200 Add fuzzy tolerance when comparing host name lists as found in session profile configuration and as reported by broker agent. ----------------------------------------------------------------------- Summary of changes: debian/changelog | 2 ++ x2gobroker/brokers/base_broker.py | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) The diff of changes is: diff --git a/debian/changelog b/debian/changelog index bb2cb50..9dab16a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -42,6 +42,8 @@ x2gobroker (0.0.3.0-0~x2go1) UNRELEASED; urgency=low - Fix remote agent detection in case of some agents being down. - Add utils function: matching_hostnames(): test hostname lists for matching hostnames (with/without domain name). + - Add fuzzy tolerance when comparing host name lists as found in session + profile configuration and as reported by broker agent. * /debian/control: + Replace LDAP support with session brokerage support in LONG_DESCRIPTION. * /debian/x2gobroker-agent.dirs: diff --git a/x2gobroker/brokers/base_broker.py b/x2gobroker/brokers/base_broker.py index 8736c78..6db07ed 100644 --- a/x2gobroker/brokers/base_broker.py +++ b/x2gobroker/brokers/base_broker.py @@ -879,8 +879,15 @@ class X2GoBroker(object): if remote_agent: try: running_sessions, suspended_sessions = x2gobroker.agent.has_sessions(username, query_mode=agent_query_mode, remote_agent=remote_agent) - if set(profile['host']).intersection(set(running_sessions)): profile['status'] = u'R' - if set(profile['host']).intersection(set(suspended_sessions)): profile['status'] = u'S' + if running_sessions: + logger_broker.debug('base_broker.X2GoBroker.list_profiles(): found running sessions on host(s): {hosts}'.format(hosts=', '.join(running_sessions))) + if suspended_sessions: + logger_broker.debug('base_broker.X2GoBroker.list_profiles(): found running sessions on host(s): {hosts}'.format(hosts=', '.join(suspended_sessions))) + if x2gobroker.utils.matching_hostnames(profile['host'], running_sessions): profile['status'] = u'R' + if x2gobroker.utils.matching_hostnames(profile['host'], suspended_sessions): profile['status'] = u'S' + if profile['status']: + logger_broker.debug('base_broker.X2GoBroker.list_profiles(): marking session profile {name} as {status}'.format(name=profile['name'], status=profile['status'])) + except x2gobroker.x2gobroker_exceptions.X2GoBrokerAgentException: pass @@ -945,7 +952,6 @@ class X2GoBroker(object): busy_servers_normalized, subdomains_agent = x2gobroker.utils.normalize_hostnames(busy_servers) if len(subdomains_agent) <= 1: - # all X2Go servers in the multi-node server farm are in the same DNS subdomain # we can operate on hostname-only hostnames server_list = server_list_normalized 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).