summaryrefslogtreecommitdiff
path: root/extras
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2013-10-09 14:32:10 +0000
committerTed Ross <tross@apache.org>2013-10-09 14:32:10 +0000
commitb03c55f70c292b43c6d27d2d8c50f947cbec2466 (patch)
tree78dae1db0ab81b8ccb1de2d3f79c65f8ebe9f52a /extras
parent5b7b43548d94cc055a7ee4120a8798e99db71b37 (diff)
downloadqpid-python-b03c55f70c292b43c6d27d2d8c50f947cbec2466.tar.gz
QPID-5216
- Fixed a number of issues found during a three-node test - Reduced the amount of log output at the DEBUG level - Added configuration files for the three-node test (linear A-B-C topology) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1530631 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'extras')
-rw-r--r--extras/dispatch/python/qpid/dispatch/router/link.py1
-rw-r--r--extras/dispatch/python/qpid/dispatch/router/router_engine.py15
-rw-r--r--extras/dispatch/src/router_node.c1
-rw-r--r--extras/dispatch/src/router_pynode.c1
-rw-r--r--extras/dispatch/tests/threerouters-A.conf61
-rw-r--r--extras/dispatch/tests/threerouters-B.conf61
-rw-r--r--extras/dispatch/tests/threerouters-C.conf54
7 files changed, 188 insertions, 6 deletions
diff --git a/extras/dispatch/python/qpid/dispatch/router/link.py b/extras/dispatch/python/qpid/dispatch/router/link.py
index 4a770684cd..11307cd079 100644
--- a/extras/dispatch/python/qpid/dispatch/router/link.py
+++ b/extras/dispatch/python/qpid/dispatch/router/link.py
@@ -92,6 +92,7 @@ class LinkStateEngine(object):
# Schedule LSRs for any routers referenced in this LS that we don't know about
for _id in msg.ls.peers:
if _id not in self.collection:
+ self.container.new_node(_id)
self.needed_lsrs[(msg.area, _id)] = None
diff --git a/extras/dispatch/python/qpid/dispatch/router/router_engine.py b/extras/dispatch/python/qpid/dispatch/router/router_engine.py
index 03bf0638a5..d5250872b2 100644
--- a/extras/dispatch/python/qpid/dispatch/router/router_engine.py
+++ b/extras/dispatch/python/qpid/dispatch/router/router_engine.py
@@ -143,28 +143,28 @@ class RouterEngine:
elif opcode == 'RA':
msg = MessageRA(body)
- self.log(LOG_TRACE, "RCVD: %r" % msg)
+ self.log(LOG_DEBUG, "RCVD: %r" % msg)
self.link_state_engine.handle_ra(msg, now)
self.mobile_address_engine.handle_ra(msg, now)
elif opcode == 'LSU':
msg = MessageLSU(body)
- self.log(LOG_TRACE, "RCVD: %r" % msg)
+ self.log(LOG_DEBUG, "RCVD: %r" % msg)
self.link_state_engine.handle_lsu(msg, now)
elif opcode == 'LSR':
msg = MessageLSR(body)
- self.log(LOG_TRACE, "RCVD: %r" % msg)
+ self.log(LOG_DEBUG, "RCVD: %r" % msg)
self.link_state_engine.handle_lsr(msg, now)
elif opcode == 'MAU':
msg = MessageMAU(body)
- self.log(LOG_TRACE, "RCVD: %r" % msg)
+ self.log(LOG_DEBUG, "RCVD: %r" % msg)
self.mobile_address_engine.handle_mau(msg, now)
elif opcode == 'MAR':
msg = MessageMAR(body)
- self.log(LOG_TRACE, "RCVD: %r" % msg)
+ self.log(LOG_DEBUG, "RCVD: %r" % msg)
self.mobile_address_engine.handle_mar(msg, now)
except Exception, e:
@@ -223,7 +223,10 @@ class RouterEngine:
"""
app_props = {'opcode' : msg.get_opcode() }
self.io_adapter.send(dest, app_props, msg.to_dict())
- self.log(LOG_TRACE, "SENT: %r dest=%s" % (msg, dest))
+ if "qdxhello" in dest:
+ self.log(LOG_TRACE, "SENT: %r dest=%s" % (msg, dest))
+ else:
+ self.log(LOG_DEBUG, "SENT: %r dest=%s" % (msg, dest))
def node_updated(self, addr, reachable, neighbor):
diff --git a/extras/dispatch/src/router_node.c b/extras/dispatch/src/router_node.c
index 4f4d453aec..2493fcd0b9 100644
--- a/extras/dispatch/src/router_node.c
+++ b/extras/dispatch/src/router_node.c
@@ -505,6 +505,7 @@ static void router_rx_handler(void* context, dx_link_t *link, dx_delivery_t *del
//
int origin = -1;
if (ingress_iter) {
+ dx_field_iterator_reset_view(ingress_iter, ITER_VIEW_ADDRESS_HASH);
dx_address_t *origin_addr;
dx_hash_retrieve(router->addr_hash, ingress_iter, (void*) &origin_addr);
if (origin_addr && DEQ_SIZE(origin_addr->rnodes) == 1) {
diff --git a/extras/dispatch/src/router_pynode.c b/extras/dispatch/src/router_pynode.c
index 7d6fd551af..e195243a05 100644
--- a/extras/dispatch/src/router_pynode.c
+++ b/extras/dispatch/src/router_pynode.c
@@ -152,6 +152,7 @@ static char *dx_del_router(dx_router_t *router, int router_maskbit)
// Free the router node and the owning address records.
//
dx_bitmask_free(rnode->valid_origins);
+ DEQ_REMOVE(router->routers, rnode);
free_dx_router_node_t(rnode);
dx_hash_remove_by_handle(router->addr_hash, oaddr->hash_handle);
diff --git a/extras/dispatch/tests/threerouters-A.conf b/extras/dispatch/tests/threerouters-A.conf
new file mode 100644
index 0000000000..81e20365a9
--- /dev/null
+++ b/extras/dispatch/tests/threerouters-A.conf
@@ -0,0 +1,61 @@
+##
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied. See the License for the
+## specific language governing permissions and limitations
+## under the License
+##
+
+
+##
+## Container section - Configures the general operation of the AMQP container.
+##
+container {
+ ##
+ ## worker-threads - The number of threads that will be created to
+ ## process message traffic and other application work (timers, non-amqp
+ ## file descriptors, etc.)
+ ##
+ ## The number of threads should be related to the number of available
+ ## processor cores. To fully utilize a quad-core system, set the
+ ## number of threads to 4.
+ ##
+ worker-threads: 4
+
+ ##
+ ## container-name - The name of the AMQP container. If not specified,
+ ## the container name will be set to a value of the container's
+ ## choosing. The automatically assigned container name is not
+ ## guaranteed to be persistent across restarts of the container.
+ ##
+ container-name: QDR.A
+}
+
+
+##
+## Listeners and Connectors
+##
+listener {
+ addr: 0.0.0.0
+ port: 20001
+ sasl-mechanisms: ANONYMOUS
+}
+
+connector {
+ label: Router Uplink
+ addr: 0.0.0.0
+ port: 20002
+ sasl-mechanisms: ANONYMOUS
+}
+
diff --git a/extras/dispatch/tests/threerouters-B.conf b/extras/dispatch/tests/threerouters-B.conf
new file mode 100644
index 0000000000..40f3704ce3
--- /dev/null
+++ b/extras/dispatch/tests/threerouters-B.conf
@@ -0,0 +1,61 @@
+##
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied. See the License for the
+## specific language governing permissions and limitations
+## under the License
+##
+
+
+##
+## Container section - Configures the general operation of the AMQP container.
+##
+container {
+ ##
+ ## worker-threads - The number of threads that will be created to
+ ## process message traffic and other application work (timers, non-amqp
+ ## file descriptors, etc.)
+ ##
+ ## The number of threads should be related to the number of available
+ ## processor cores. To fully utilize a quad-core system, set the
+ ## number of threads to 4.
+ ##
+ worker-threads: 4
+
+ ##
+ ## container-name - The name of the AMQP container. If not specified,
+ ## the container name will be set to a value of the container's
+ ## choosing. The automatically assigned container name is not
+ ## guaranteed to be persistent across restarts of the container.
+ ##
+ container-name: QDR.B
+}
+
+
+##
+## Listeners and Connectors
+##
+listener {
+ addr: 0.0.0.0
+ port: 20002
+ sasl-mechanisms: ANONYMOUS
+}
+
+connector {
+ label: Router Uplink
+ addr: 0.0.0.0
+ port: 20003
+ sasl-mechanisms: ANONYMOUS
+}
+
diff --git a/extras/dispatch/tests/threerouters-C.conf b/extras/dispatch/tests/threerouters-C.conf
new file mode 100644
index 0000000000..3721653133
--- /dev/null
+++ b/extras/dispatch/tests/threerouters-C.conf
@@ -0,0 +1,54 @@
+##
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied. See the License for the
+## specific language governing permissions and limitations
+## under the License
+##
+
+
+##
+## Container section - Configures the general operation of the AMQP container.
+##
+container {
+ ##
+ ## worker-threads - The number of threads that will be created to
+ ## process message traffic and other application work (timers, non-amqp
+ ## file descriptors, etc.)
+ ##
+ ## The number of threads should be related to the number of available
+ ## processor cores. To fully utilize a quad-core system, set the
+ ## number of threads to 4.
+ ##
+ worker-threads: 4
+
+ ##
+ ## container-name - The name of the AMQP container. If not specified,
+ ## the container name will be set to a value of the container's
+ ## choosing. The automatically assigned container name is not
+ ## guaranteed to be persistent across restarts of the container.
+ ##
+ container-name: QDR.C
+}
+
+
+##
+## Listeners and Connectors
+##
+listener {
+ addr: 0.0.0.0
+ port: 20003
+ sasl-mechanisms: ANONYMOUS
+}
+