This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2gobroker. from 1efc250 Fix detection of running x2gobroker-daemon process in Debian's SystemV init script. new 8aa8d5d fix-up for 1f63e95d2aed93eb96fb58c8aafd39c0a0949f2c new 5d66506 rebase with prev new f023fb6 LoadChecker.loadchecker(): Fix position of "thread waking up" log message. new b213c6e loadchecker.py: Add more log message for DEBUG mode. new 4b06817 fix-up of still-completely flawed x2gobroker-loadchecker.init script (Debian) The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: init/x2gobroker-loadchecker.init | 18 +++++++++--------- x2gobroker/brokers/base_broker.py | 5 +++-- x2gobroker/loadchecker.py | 7 +++++-- 3 files changed, 17 insertions(+), 13 deletions(-) -- Alioth's /srv/git/code.x2go.org/x2gobroker.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit 8aa8d5d20f1934f9d3c2df164ca50fe9ed6d7ceb Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Mar 30 14:28:43 2015 +0200 fix-up for 1f63e95d2aed93eb96fb58c8aafd39c0a0949f2c --- x2gobroker/brokers/base_broker.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/x2gobroker/brokers/base_broker.py b/x2gobroker/brokers/base_broker.py index 94c351e..32dd12a 100644 --- a/x2gobroker/brokers/base_broker.py +++ b/x2gobroker/brokers/base_broker.py @@ -1345,6 +1345,7 @@ class X2GoBroker(object): _save_server_list = None _save_busy_servers = None initial_server_list = copy.deepcopy(server_list) + agent_query_mode_is_SSH = self.get_agent_query_mode(profile_id) == 'SSH' while not selected_session and server_list: @@ -1425,7 +1426,7 @@ class X2GoBroker(object): # status) if busy_servers is None: try: - if remote_agent['load_factors']: + if agent_query_mode_is_SSH and remote_agent['load_factors']: success, busy_servers = x2gobroker.agent.get_servers(username=username, remote_agent=remote_agent) else: success, busy_servers = x2gobroker.agent.find_busy_servers(username=username, remote_agent=remote_agent) @@ -1478,7 +1479,7 @@ class X2GoBroker(object): del busy_servers[busy_server] # dynamic load-balancing via load checker service - if remote_agent['load_factors']: + if agent_query_mode_is_SSH and remote_agent['load_factors']: load_factors = remote_agent['load_factors'] busy_servers_temp = copy.deepcopy(busy_servers) -- Alioth's /srv/git/code.x2go.org/x2gobroker.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit 5d66506de98998c333bd2ee5d5c068369b7f0b67 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Mar 30 14:30:58 2015 +0200 rebase with prev --- x2gobroker/brokers/base_broker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x2gobroker/brokers/base_broker.py b/x2gobroker/brokers/base_broker.py index 32dd12a..5c3356f 100644 --- a/x2gobroker/brokers/base_broker.py +++ b/x2gobroker/brokers/base_broker.py @@ -1345,7 +1345,7 @@ class X2GoBroker(object): _save_server_list = None _save_busy_servers = None initial_server_list = copy.deepcopy(server_list) - agent_query_mode_is_SSH = self.get_agent_query_mode(profile_id) == 'SSH' + agent_query_mode_is_SSH = self.get_agent_query_mode(profile_id).upper() == 'SSH' while not selected_session and server_list: -- Alioth's /srv/git/code.x2go.org/x2gobroker.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit f023fb6adf59e78526d8fe2f0b6b55fa897ac633 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Mar 30 14:31:59 2015 +0200 LoadChecker.loadchecker(): Fix position of "thread waking up" log message. --- x2gobroker/loadchecker.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/x2gobroker/loadchecker.py b/x2gobroker/loadchecker.py index 435e53e..6a6d1f1 100644 --- a/x2gobroker/loadchecker.py +++ b/x2gobroker/loadchecker.py @@ -171,9 +171,10 @@ class LoadChecker(threading.Thread): self.brokers = {} num_queries = 0 num_failed_queries = 0 - for backend in self.broker_backends: - if self.logger: self.logger.debug('LoadChecker.loadchecker(): load checker thread waking up...') + if self.logger: self.logger.debug('LoadChecker.loadchecker(): load checker thread waking up...') + + for backend in self.broker_backends: if not self.server_load.has_key(backend): self.server_load[backend] = {} -- Alioth's /srv/git/code.x2go.org/x2gobroker.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit b213c6e3987085fd130d97fe47ccf1ed05b4f7e5 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Mar 30 14:43:30 2015 +0200 loadchecker.py: Add more log message for DEBUG mode. --- x2gobroker/loadchecker.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/x2gobroker/loadchecker.py b/x2gobroker/loadchecker.py index 6a6d1f1..c2eea74 100644 --- a/x2gobroker/loadchecker.py +++ b/x2gobroker/loadchecker.py @@ -184,11 +184,13 @@ class LoadChecker(threading.Thread): self.brokers[backend] = _broker_backend_module.X2GoBroker(config_file=self.config_file, config_defaults=self.config_defaults, **self.kwargs) profile_ids_to_check = [ id for id in self.brokers[backend].get_profile_ids() if self.brokers[backend].use_load_checker(id) ] + if self.logger: self.logger.debug('LoadChecker.loadchecker(): backend={backend} -> processing profiles: {profile_ids}'.format(backend=backend, profile_ids=profile_ids_to_check)) for profile_id in profile_ids_to_check: if not self.server_load[backend].has_key(profile_id): self.server_load[backend][profile_id] = {} remote_agents = self.brokers[backend].get_all_remote_agents(profile_id) + if self.logger: self.logger.debug('LoadChecker.loadchecker(): querying remote agents for backend={backend}, profile_id={profile_id}: {remote_agents}'.format(backend=backend, profile_id=profile_id, remote_agents=remote_agents)) for remote_agent in remote_agents: _load_factor = x2gobroker.agent.check_load(remote_agent, logger=self.logger) num_queries += 1 -- Alioth's /srv/git/code.x2go.org/x2gobroker.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit 4b068176dd9dd48c7d1a0e105ed24e110ab9f3c4 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Mar 30 14:43:57 2015 +0200 fix-up of still-completely flawed x2gobroker-loadchecker.init script (Debian) --- init/x2gobroker-loadchecker.init | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/init/x2gobroker-loadchecker.init b/init/x2gobroker-loadchecker.init index de8f2d0..8be4381 100755 --- a/init/x2gobroker-loadchecker.init +++ b/init/x2gobroker-loadchecker.init @@ -1,6 +1,6 @@ #!/bin/sh # -# Start the X2Go Session Broker PAM Authentication Service +# Start the X2Go Session Broker Load Checker Service # # Copyright © 2014 Mike Gabriel <mike.gabriel@das-netzwerkteam.de> # Distributable under the terms of the GNU AGPL version 3+. @@ -11,8 +11,8 @@ # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 -# Short-Description: X2Go Session Broker PAM Authentication Service -# Description: PAM authentication service for X2Go Session Broker +# Short-Description: X2Go Session Broker Load Checker Service +# Description: Load Checker service for X2Go Session Broker ### END INIT INFO # @@ -64,10 +64,10 @@ is_true() case "${1:-}" in start) if [ -f $PIDFILE_LOADCHECKER ]; then - if ps a -u root | grep -v egrep | egrep ".*$(basename $LOADCHECKER).*$X2GOBROKER_LOADCHECKER_SOCKET.*" 1>/dev/null 2>/dev/null; then - log_warning_msg "X2Go Broker Authentication Service already running" + if ps a -u $X2GOBROKER_DAEMON_USER | grep -v egrep | egrep ".*$(basename $LOADCHECKER).*$X2GOBROKER_LOADCHECKER_SOCKET.*" 1>/dev/null 2>/dev/null; then + log_warning_msg "X2Go Broker Load Checker Service already running" else - log_warning_msg "X2Go Broker Authentication Service: stale PID file ($PIDFILE_LOADCHECKER). Delete it manually!" + log_warning_msg "X2Go Broker Load Checker Service: stale PID file ($PIDFILE_LOADCHECKER). Delete it manually!" fi START_LOADCHECKER=no fi @@ -76,15 +76,15 @@ case "${1:-}" in # once we are here, we have to make sure the loadchecker.socket does not exist rm -f $X2GOBROKER_LOADCHECKER_SOCKET # and now we can start the auth service - log_daemon_msg "Starting X2Go Broker Authentication Service" "$(basename $LOADCHECKER)" - start-stop-daemon -b -m -S -p $PIDFILE_LOADCHECKER -x $LOADCHECKER -- -s $X2GOBROKER_LOADCHECKER_SOCKET -o $X2GOBROKER_DAEMON_USER -g $X2GOBROKER_DAEMON_GROUP -p 0660 + log_daemon_msg "Starting X2Go Broker Load Checker Service" "$(basename $LOADCHECKER)" + start-stop-daemon --chuid $X2GOBROKER_DAEMON_USER -b -m -S -p $PIDFILE_LOADCHECKER -x $LOADCHECKER -- -s $X2GOBROKER_LOADCHECKER_SOCKET -o $X2GOBROKER_DAEMON_USER -g $X2GOBROKER_DAEMON_GROUP -p 0660 log_end_msg $? set -e fi ;; stop) if [ -f $PIDFILE_LOADCHECKER ] ; then - log_daemon_msg "Stopping X2Go Broker Authentication Service" "$(basename $LOADCHECKER)" + log_daemon_msg "Stopping X2Go Broker Load Checker Service" "$(basename $LOADCHECKER)" set +e start-stop-daemon -K -p $PIDFILE_LOADCHECKER && rm -f $PIDFILE_LOADCHECKER log_end_msg $? -- Alioth's /srv/git/code.x2go.org/x2gobroker.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git