[X2Go-Commits] [x2gobroker] 03/03: Fix task ping when tested via the x2gobroker-testagent script.
git-admin at x2go.org
git-admin at x2go.org
Mon Apr 13 12:55:47 CEST 2015
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2gobroker.
commit 79aec4b28abbd8055bface1eaf54a879e3cc6308
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Mon Apr 13 12:55:34 2015 +0200
Fix task ping when tested via the x2gobroker-testagent script.
---
debian/changelog | 1 +
sbin/x2gobroker-testagent | 2 +-
x2gobroker/agent.py | 4 +++-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 970a03c..2f872d5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -324,6 +324,7 @@ x2gobroker (0.0.3.0-0x2go1) UNRELEASED; urgency=low
(Fixes: #836).
- agent.py: Fix missing "task" parameter for task "ping" against a local
broker agent.
+ - Fix task ping when tested via the x2gobroker-testagent script.
* debian/control:
+ Provide separate bin:package for SSH brokerage: x2gobroker-ssh.
+ Replace LDAP support with session brokerage support in LONG_DESCRIPTION.
diff --git a/sbin/x2gobroker-testagent b/sbin/x2gobroker-testagent
index 752b2c3..1480616 100755
--- a/sbin/x2gobroker-testagent
+++ b/sbin/x2gobroker-testagent
@@ -87,7 +87,7 @@ if __name__ == "__main__":
print
sys.exit(-1)
- if cmdline_args.username is None and not cmdline_args.list_tasks:
+ if cmdline_args.username is None and not cmdline_args.list_tasks and cmdline_args.task not in ('ping', 'checkload'):
p.print_help()
print
print "*** Cannot continue without username... ***"
diff --git a/x2gobroker/agent.py b/x2gobroker/agent.py
index 760d2d2..6545dcf 100644
--- a/x2gobroker/agent.py
+++ b/x2gobroker/agent.py
@@ -437,7 +437,9 @@ def check_load(remote_agent=None, logger=None, **kwargs):
logger = logger_broker
try:
- _success, _load_params = call_broker_agent('foo', task='checkload', remote_agent=remote_agent, logger=logger, **kwargs)
+ if "username" in kwargs.keys():
+ del kwargs["username"]
+ _success, _load_params = call_broker_agent(username='foo', task='checkload', remote_agent=remote_agent, logger=logger, **kwargs)
except x2gobroker.x2gobroker_exceptions.X2GoBrokerAgentException, e:
logger.error('querying remote agent on host {hostname} failed: {errmsg}'.format(hostname=remote_agent[u'hostname'], errmsg=str(e)))
return "HOST-UNREACHABLE"
--
Alioth's /srv/git/code.x2go.org/x2gobroker.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
More information about the x2go-commits
mailing list