This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2gobroker. from c3cacda LoadChecker.loadchecker(): Use load checker daemon's logger instance for logging actions taken place in agent.py. new b8db201 agent.py: Make agent query mode LOCAL behave similar to agent query mode SSH if things go wrong. new 31bf2e4 agent.py: Set result to None, if SSH connection to broker agent fails. The 2 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: debian/changelog | 3 +++ x2gobroker/agent.py | 7 +++++-- 2 files changed, 8 insertions(+), 2 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 b8db201abdfb1b8bf2e15a2c747ee63c78e99599 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Mar 27 10:18:01 2015 +0100 agent.py: Make agent query mode LOCAL behave similar to agent query mode SSH if things go wrong. --- debian/changelog | 2 ++ x2gobroker/agent.py | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 08c7622..6ad6066 100644 --- a/debian/changelog +++ b/debian/changelog @@ -247,6 +247,8 @@ x2gobroker (0.0.3.0-0x2go1) UNRELEASED; urgency=low - agent.py: Allow providing a custom logger instance in all functions. - LoadChecker.loadchecker(): Use load checker daemon's logger instance for logging actions taken place in agent.py. + - agent.py: Make agent query mode LOCAL behave similar to agent query mode + SSH if things go wrong. * debian/control: + Provide separate bin:package for SSH brokerage: x2gobroker-ssh. + Replace LDAP support with session brokerage support in LONG_DESCRIPTION. diff --git a/x2gobroker/agent.py b/x2gobroker/agent.py index 19b0c73..15486bf 100644 --- a/x2gobroker/agent.py +++ b/x2gobroker/agent.py @@ -144,12 +144,14 @@ def _call_local_broker_agent(username, task, cmdline_args=[], logger=None): result = agent_process.stdout.read().split('\n') except OSError: - pass + result = None if result: logger.info('Broker agent answered: {answer}'.format(answer="; ".join(result))) - if result[0].startswith('OK'): + if result and result[0].startswith('OK'): return (True, [ r for r in result[1:] if r ]) + else: + return (False, []) raise x2gobroker.x2gobroker_exceptions.X2GoBrokerAgentException('Query to local X2Go Broker Agent failed with no response') -- 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 31bf2e4f0eb5c3e9a0318fba304f4410272062ef Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Mar 27 10:18:44 2015 +0100 agent.py: Set result to None, if SSH connection to broker agent fails. --- debian/changelog | 1 + x2gobroker/agent.py | 1 + 2 files changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index 6ad6066..c7d336d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -249,6 +249,7 @@ x2gobroker (0.0.3.0-0x2go1) UNRELEASED; urgency=low for logging actions taken place in agent.py. - agent.py: Make agent query mode LOCAL behave similar to agent query mode SSH if things go wrong. + - agent.py: Set result to None, if SSH connection to broker agent fails. * debian/control: + Provide separate bin:package for SSH brokerage: x2gobroker-ssh. + Replace LDAP support with session brokerage support in LONG_DESCRIPTION. diff --git a/x2gobroker/agent.py b/x2gobroker/agent.py index 15486bf..04591b2 100644 --- a/x2gobroker/agent.py +++ b/x2gobroker/agent.py @@ -227,6 +227,7 @@ def _call_remote_broker_agent(username, task, cmdline_args=[], remote_agent=None err = stderr.read().replace('\n', ' ') if err: logger.warning('Remote agent command (host: {hostname} ({hostaddr})) reported an error: {err}'.format(hostname=remote_hostname, hostaddr=remote_hostaddr, err=err)) + result = None client.close() if result: logger.info('Broker agent answered: {answer}'.format(answer="; ".join(result))) -- Alioth's /srv/git/code.x2go.org/x2gobroker.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git