diff --git a/bindep.txt b/bindep.txt index c5ad6cb9e..88e9a89ff 100644 --- a/bindep.txt +++ b/bindep.txt @@ -15,20 +15,21 @@ rabbitmq-server [platform:dpkg rabbit] rabbitmq-server [platform:rpm rabbit] # AMQP1 dpkg -qpidd [platform:dpkg amqp1] +qdrouterd [platform:dpkg amqp1] sasl2-bin [platform:dpkg amqp1] uuid-dev [platform:dpkg amqp1] swig [platform:dpkg amqp1] libsasl2-modules [platform:dpkg amqp1] +openjdk-8-jdk [platform:dpkg amqp1] # AMQP1 rpm -qpid-cpp-server [platform:rpm amqp1] -qpid-proton-c-devel [platform:rpm amqp1] +qpid-dispatch-router [platform:rpm amqp1] python-qpid-proton [platform:rpm amqp1] cyrus-sasl-lib [platform:rpm amqp1] cyrus-sasl-plain [platform:rpm amqp1] libuuid-devel [platform:rpm amqp1] swig [platform:rpm amqp1] +java-1.8.0-openjdk [platform:rpm amqp1] # kafka dpkg openjdk-8-jdk [platform:dpkg kafka] diff --git a/lower-constraints.txt b/lower-constraints.txt index 69c9e5e1c..3df8f1a83 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -54,7 +54,7 @@ Paste==2.0.2 PasteDeploy==1.5.0 pbr==2.0.0 pep8==1.5.7 -pifpaf==0.10.0 +pifpaf==2.2.0 prettytable==0.7.2 pycparser==2.18 pyflakes==0.8.1 diff --git a/oslo_messaging/_drivers/amqp1_driver/addressing.py b/oslo_messaging/_drivers/amqp1_driver/addressing.py index 3661b63a4..80f0b31e2 100644 --- a/oslo_messaging/_drivers/amqp1_driver/addressing.py +++ b/oslo_messaging/_drivers/amqp1_driver/addressing.py @@ -35,7 +35,6 @@ that traffic can be partitioned based on its use. import abc import logging -from oslo_messaging._i18n import _LW from oslo_messaging.target import Target __all__ = [ @@ -276,15 +275,6 @@ class AddresserFactory(object): # overridden via the configuration. product = remote_properties.get('product', 'qpid-cpp') - # TODO(kgiusti): Router support was added in Newton. Remove this - # warning post Newton, once the driver has stabilized. - if product == "qpid-dispatch-router": - w = _LW("This is the initial release of support for message" - " routing technology. Be aware that messages are not" - " queued and may be discarded if there are no consumers" - " present.") - LOG.warning(w) - if self._mode == 'legacy' or (self._mode == 'dynamic' and product == 'qpid-cpp'): return LegacyAddresser(self._default_exchange, diff --git a/test-requirements.txt b/test-requirements.txt index c3fe3192d..e3852f54d 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -11,7 +11,7 @@ stestr>=2.0.0 # Apache-2.0 testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT oslotest>=3.2.0 # Apache-2.0 -pifpaf>=0.10.0 # Apache-2.0 +pifpaf>=2.2.0 # Apache-2.0 # for test_impl_kafka confluent-kafka>=0.11.6 # Apache-2.0 diff --git a/tools/setup-test-env-amqp1.sh b/tools/setup-test-env-amqp1.sh index 913d5ea25..e5d9f11dd 100755 --- a/tools/setup-test-env-amqp1.sh +++ b/tools/setup-test-env-amqp1.sh @@ -1,212 +1,41 @@ #!/bin/bash # -# Usage: setup-test-env-amqp.sh -# where AMQP1_BACKEND is the AMQP 1.0 intermediary to use. Valid -# values are "qdrouterd" for router and "qpidd" for broker. +# Configuration files for the qdrouterd and artemis backends generated +# by pifpaf driver fixtures (https://github.com/jd/pifpaf) set -e -# router requires qdrouterd, sasl2-bin/cyrus-sasl-plain+cyrus-sasl-lib -# broker requires qpidd, qpid-tools sasl2-bin/cyrus-sasl-plain+cyrus-sasl-lib - . tools/functions.sh -DATADIR=$(mktemp -d /tmp/OSLOMSG-${AMQP1_BACKEND}.XXXXX) -trap "clean_exit $DATADIR" EXIT +ARTEMIS_VERSION=${ARTEMIS_VERSION:-"2.6.4"} -function _setup_qdrouterd_user { - echo secretqpid | saslpasswd2 -c -p -f ${DATADIR}/qdrouterd.sasldb stackqpid -} +if [[ -z "$(which artemis)" ]]; then + DATADIR=$(mktemp -d /tmp/OSLOMSG-ARTEMIS.XXXXX) + trap "clean_exit $DATADIR" EXIT -function _setup_qpidd_user { - echo secretqpid | saslpasswd2 -c -p -f ${DATADIR}/qpidd.sasldb -u QPID stackqpid -} + tarball=apache-artemis-${ARTEMIS_VERSION}-bin.tar.gz -function _configure_qdrouterd { - - QDR=$(type -p qdrouterd) - if [[ ! -x "$QDR" ]]; then - echo "FAILURE: Qpid Dispatch Router (qdrouterd) not installed" - exit 1 - fi - - # create a stand alone router - cat > ${DATADIR}/qdrouterd.conf <> ${DATADIR}/qdrouterd.conf <> ${DATADIR}/qdrouterd.conf <> ${DATADIR}/qdrouterd.conf < ${DATADIR}/sasl2/qdrouterd.conf </dev/null) - if [[ ! -x "$QPIDD" ]]; then - echo "FAILURE: qpidd broker not installed" - exit 1 - fi - - [ -f "/usr/lib/qpid/daemon/acl.so" ] && LIBACL="load-module=/usr/lib/qpid/daemon/acl.so" - - cat > ${DATADIR}/qpidd.conf <> ${DATADIR}/qpidd.conf <> ${DATADIR}/qpidd.conf <> ${DATADIR}/qpidd.conf < ${DATADIR}/qpidd.acl < ${DATADIR}/sasl2/qpidd.conf < ${SITEDIR}/dispatch.pth </dev/null) - mkfifo ${DATADIR}/out - $QDR --config ${DATADIR}/qdrouterd.conf & - wait_for_line "Router .*started" "error" ${DATADIR}/out - rm ${SITEDIR}/dispatch.pth } -function _start_qpidd { - chmod -R a+r ${DATADIR} - QPIDD=$(which qpidd 2>/dev/null) - mkfifo ${DATADIR}/out - $QPIDD --log-enable trace+ --log-to-file ${DATADIR}/out --config ${DATADIR}/qpidd.conf & - wait_for_line "Broker .*running" "error" ${DATADIR}/out -} - -_configure_${AMQP1_BACKEND} -_setup_${AMQP1_BACKEND}_user -_start_${AMQP1_BACKEND} - -$* +_setup_global_site_package_path +pifpaf --env-prefix ARTEMIS run artemis -- pifpaf --debug --env-prefix QDR run qdrouterd --username stackqpid --password secretqpid -- $* diff --git a/tox.ini b/tox.ini index 82405bb48..4478c1e47 100644 --- a/tox.ini +++ b/tox.ini @@ -67,8 +67,7 @@ commands = {toxinidir}/setup-test-env-kafka.sh stestr run --slowest {posargs:osl basepython = python2.7 setenv = {[testenv]setenv} - TRANSPORT_URL=amqp://stackqpid:secretqpid@127.0.0.1:65123// - AMQP1_BACKEND=qpidd + TRANSPORT_URL=amqp://stackqpid:secretqpid@127.0.0.1:5672// ENVNAME={envname} WORKDIR={toxworkdir} commands = {toxinidir}/tools/setup-test-env-amqp1.sh stestr run --slowest {posargs:oslo_messaging.tests.functional} @@ -77,8 +76,7 @@ commands = {toxinidir}/tools/setup-test-env-amqp1.sh stestr run --slowest {posar basepython = python3.5 setenv = {[testenv]setenv} - TRANSPORT_URL=amqp://stackqpid:secretqpid@127.0.0.1:65123// - AMQP1_BACKEND=qpidd + TRANSPORT_URL=amqp://stackqpid:secretqpid@127.0.0.1:5672// ENVNAME={envname} WORKDIR={toxworkdir} commands = {toxinidir}/tools/setup-test-env-amqp1.sh stestr run --slowest {posargs:oslo_messaging.tests.functional}