You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ch...@apache.org on 2015/11/17 13:14:48 UTC
stratos git commit: PCA - Check if message broker credentials were
successfully authenticated in on_connect()
Repository: stratos
Updated Branches:
refs/heads/stratos-4.1.x c9115e4db -> cd24ffc5b
PCA - Check if message broker credentials were successfully authenticated in on_connect()
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/cd24ffc5
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/cd24ffc5
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/cd24ffc5
Branch: refs/heads/stratos-4.1.x
Commit: cd24ffc5b4ff848751dba46666e5805397cba292
Parents: c9115e4
Author: Chamila de Alwis <ch...@apache.org>
Authored: Tue Nov 17 17:09:28 2015 +0530
Committer: Chamila de Alwis <ch...@apache.org>
Committed: Tue Nov 17 17:44:21 2015 +0530
----------------------------------------------------------------------
.../main/python/cartridge.agent/cartridge.agent/subscriber.py | 7 ++++++-
.../src/test/resources/ADCExtensionTestCase/agent.conf | 1 +
.../src/test/resources/ADCMTAppTenantUserTestCase/agent.conf | 1 +
.../src/test/resources/ADCMTAppTestCase/agent.conf | 1 +
.../src/test/resources/ADCTestCase/agent.conf | 1 +
5 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/cd24ffc5/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/subscriber.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/subscriber.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/subscriber.py
index 90a9771..ff5cef9 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/subscriber.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/subscriber.py
@@ -112,7 +112,12 @@ class EventSubscriber(threading.Thread):
EventSubscriber.log.debug("Registered handler for event %r" % event)
def on_connect(self, client, userdata, flags, rc):
- EventSubscriber.log.debug("Connected to message broker.")
+ if rc != 0:
+ EventSubscriber.log.debug("Connection to the message broker didn't succeed. Disconnecting client.")
+ client.disconnect()
+ return
+
+ EventSubscriber.log.debug("Connected to message broker %s:%s successfully." % (client._host, client._port))
self.__mb_client.subscribe(self.__topic)
EventSubscriber.log.debug("Subscribed to %r" % self.__topic)
http://git-wip-us.apache.org/repos/asf/stratos/blob/cd24ffc5/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCExtensionTestCase/agent.conf
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCExtensionTestCase/agent.conf b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCExtensionTestCase/agent.conf
index 894a254..d8363e7 100755
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCExtensionTestCase/agent.conf
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCExtensionTestCase/agent.conf
@@ -19,6 +19,7 @@
mb.urls =localhost:1885
mb.username =system
mb.password =manager
+mb.publisher.timeout =900
listen.address =localhost
thrift.receiver.urls =localhost:7712
thrift.server.admin.username =admin
http://git-wip-us.apache.org/repos/asf/stratos/blob/cd24ffc5/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCMTAppTenantUserTestCase/agent.conf
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCMTAppTenantUserTestCase/agent.conf b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCMTAppTenantUserTestCase/agent.conf
index 00eb956..a93b54f 100755
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCMTAppTenantUserTestCase/agent.conf
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCMTAppTenantUserTestCase/agent.conf
@@ -19,6 +19,7 @@
mb.urls =localhost:1885
mb.username =system
mb.password =manager
+mb.publisher.timeout =900
listen.address =localhost
thrift.receiver.urls =localhost:7712
thrift.server.admin.username =admin
http://git-wip-us.apache.org/repos/asf/stratos/blob/cd24ffc5/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCMTAppTestCase/agent.conf
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCMTAppTestCase/agent.conf b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCMTAppTestCase/agent.conf
index 644cd13..141d19e 100755
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCMTAppTestCase/agent.conf
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCMTAppTestCase/agent.conf
@@ -19,6 +19,7 @@
mb.urls =localhost:1885
mb.username =system
mb.password =manager
+mb.publisher.timeout =900
listen.address =localhost
thrift.receiver.urls =localhost:7712
thrift.server.admin.username =admin
http://git-wip-us.apache.org/repos/asf/stratos/blob/cd24ffc5/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCTestCase/agent.conf
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCTestCase/agent.conf b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCTestCase/agent.conf
index 894a254..d8363e7 100755
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCTestCase/agent.conf
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCTestCase/agent.conf
@@ -19,6 +19,7 @@
mb.urls =localhost:1885
mb.username =system
mb.password =manager
+mb.publisher.timeout =900
listen.address =localhost
thrift.receiver.urls =localhost:7712
thrift.server.admin.username =admin