From c05aea6914d1e30249254034d6affc0d54a02edb Mon Sep 17 00:00:00 2001 From: Jerzy Mikolajczak Date: Wed, 20 Jan 2016 13:54:11 +0100 Subject: [PATCH] Update to 8.0.0.0b2 - Source: [0] - Update package requirements - Add git as build dependency - Update tests for LBaaSv2 [0] http://archive.ubuntu.com/ubuntu/pool/main/n/neutron-lbaas/neutron-lbaas_8.0.0~b1-0ubuntu2.dsc Change-Id: I8720d8755fb2400ee8df6c80fb24e9d6148c2c66 --- tests/runtests.sh | 32 ++++++++++------ trusty/debian/changelog | 7 ++++ trusty/debian/control | 37 ++++++++++--------- trusty/debian/patches/series | 1 - .../debian/patches/skip-failing-tests.patch | 11 ------ trusty/debian/rules | 7 +++- 6 files changed, 53 insertions(+), 42 deletions(-) delete mode 100644 trusty/debian/patches/series delete mode 100644 trusty/debian/patches/skip-failing-tests.patch diff --git a/tests/runtests.sh b/tests/runtests.sh index 2f1fe30..6d4a53e 100755 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -118,7 +118,7 @@ cat > /etc/neutron/neutron.conf << EOF auth_strategy = keystone debug = True verbose = True -service_plugins = neutron.services.l3_router.l3_router_plugin.L3RouterPlugin,lbaas +service_plugins = neutron.services.l3_router.l3_router_plugin.L3RouterPlugin,neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2 core_plugin = $CORE_PLUGIN rabbit_password = guest rabbit_hosts = 127.0.0.1 @@ -148,6 +148,12 @@ interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver [haproxy] EOF +cat > /etc/neutron/neutron_lbaas.conf << EOF +[DEFAULT] +[service_providers] +service_provider=LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default +EOF + } upgrade_neutron_db () { @@ -187,21 +193,25 @@ restart_service () { check_neutron_lbaas () { NET_ID=$(neutron net-create $NEUTRON_AUTH net$RANDOM | grep ' id ' | awk '{print $4}') - SUBNET_ID=$(neutron $NEUTRON_AUTH subnet-create $NET_ID 10.0.0.0/24 | grep ' id ' | awk '{print $4}') - LB_POOL_ID=$(neutron $NEUTRON_AUTH lb-pool-create --lb-method ROUND_ROBIN --name mypool --protocol HTTP --subnet-id $SUBNET_ID | grep ' id ' | awk '{print $4}') - CHECK=$(neutron $NEUTRON_AUTH lb-pool-list | grep $LB_POOL_ID) - if [ -z "$CHECK" ]; then echo "ERROR. The pool wasn't created" && FAILURE=true; fi + neutron $NEUTRON_AUTH subnet-create --name subnet1 $NET_ID 10.0.0.0/24 + LB_ID=$(neutron $NEUTRON_AUTH lbaas-loadbalancer-create --name lb1 subnet1 | awk '/ id / {print $4}') + # wait till balancer goes into ACTIVE state + sleep 10 + PROV_STATUS=$(neutron $NEUTRON_AUTH lbaas-loadbalancer-show $LB_ID | awk '/ provisioning_status / {print $4}') + if [ "$PROV_STATUS" != "ACTIVE" ]; then echo "ERROR. The loadbalancer is not working properly (provisioning_status=$PROV_STATUS)"; FAILURE=true; fi + OPER_STATUS=$(neutron $NEUTRON_AUTH lbaas-loadbalancer-show $LB_ID | awk '/ operating_status / {print $4}') + if [ "$OPER_STATUS" != "ONLINE" ]; then echo "ERROR. The loadbalancer is not working properly (operating_status=$OPER_STATUS)"; FAILURE=true; fi } -check_neutron_lbaas_agent () { +check_neutron_lbaasv2_agent () { if ! $SERVICE_STARTED ; then - restart_service neutron-lbaas-agent + restart_service neutron-lbaasv2-agent SERVICE_STARTED=true fi #This sleep here and in other functions is intended to let the agent add information to the queue sleep 10 - STATUS=$(neutron $NEUTRON_AUTH agent-list | grep "Loadbalancer agent" | awk '{print $9}') - if [ "$STATUS" != ":-)" ]; then echo "LBaaS agent check failed"; FAILURE=true; fi + STATUS=$(neutron $NEUTRON_AUTH agent-list | awk '/ Loadbalancerv2 agent / {print $10}') + if [ "$STATUS" != ":-)" ]; then echo "LBaaSv2 agent check failed"; FAILURE=true; fi } check_error () { @@ -215,7 +225,7 @@ check_error () { } case $PACKAGE in - neutron-lbaas-agent) + neutron-lbaasv2-agent) install_neutron_server install_packages setup_database @@ -224,7 +234,7 @@ case $PACKAGE in upgrade_neutron_db setup_rabbitmq start_neutron_server - try check_neutron_lbaas_agent + try check_neutron_lbaasv2_agent try check_neutron_lbaas check_error ;; diff --git a/trusty/debian/changelog b/trusty/debian/changelog index f332d51..56e7818 100644 --- a/trusty/debian/changelog +++ b/trusty/debian/changelog @@ -1,3 +1,10 @@ +neutron-lbaas (2:8.0.0~b2-1~u14.04+mos1) mos9.0; urgency=medium + + * Source [0] + [0] http://archive.ubuntu.com/ubuntu/pool/main/n/neutron-lbaas/neutron-lbaas_8.0.0~b1-0ubuntu2.dsc + + -- Jerzy Mikolajczak Wed, 20 Jan 2016 12:47:15 +0100 + neutron-lbaas (2:7.0.0.0b2-1~u14.04+mos1) mos8.0; urgency=medium * Source: http://archive.ubuntu.com/ubuntu/pool/main/n/neutron-lbaas/neutron-lbaas_7.0.0-0ubuntu1.dsc diff --git a/trusty/debian/control b/trusty/debian/control index 3087b22..541230f 100644 --- a/trusty/debian/control +++ b/trusty/debian/control @@ -5,6 +5,7 @@ Maintainer: MOS Neutron Team Build-Depends: debhelper (>= 9), dh-python, dh-systemd, + git, openstack-pkg-tools (>= 23~), python-all, python-pbr (>= 1.8), @@ -21,22 +22,22 @@ Build-Depends-Indep: alembic (>= 0.8.0), python-neutron (>= 2:7.0.0~b1), python-openssl (>= 0.14), python-oslo.concurrency (>= 2.3.0), - python-oslo.config (>= 1:2.3.0), - python-oslo.db (>= 2.4.1), - python-oslo.log (>= 1.8.0), - python-oslo.messaging (>= 1.16.0), - python-oslo.serialization (>= 1.4.0), - python-oslo.service (>= 0.7.0), - python-oslo.utils (>= 2.0.0), + python-oslo.config (>= 1:2.7.0), + python-oslo.db (>= 3.2.0), + python-oslo.log (>= 1.12.0), + python-oslo.messaging (>= 2.6.1), + python-oslo.serialization (>= 1.10.0), + python-oslo.service (>= 0.12.0), + python-oslo.utils (>= 2.8.0), python-oslosphinx (>= 2.5.0), python-pyasn1, python-pyasn1-modules, - python-requests (>= 2.5.2), - python-requests-mock (>= 0.6.0), + python-requests (>= 2.8.1), + python-requests-mock (>= 0.7.0), python-six (>= 1.9.0), python-sqlalchemy (>= 0.9.7), python-stevedore (>= 1.5.0), - python-tempest-lib (>= 0.8.0), + python-tempest-lib (>= 0.10.0), python-testscenarios (>= 0.4), python-testtools (>= 1.4.0), python-webob (>= 1.2.3), @@ -53,16 +54,16 @@ Depends: alembic (>= 0.8.0), python-eventlet (>= 0.17.4), python-netaddr (>= 0.7.12), python-openssl (>= 0.14), - python-oslo.config (>= 1:2.3.0), - python-oslo.db (>= 2.4.1), - python-oslo.log (>= 1.8.0), - python-oslo.messaging (>= 1.16.0), - python-oslo.serialization (>= 1.4.0), - python-oslo.service (>= 0.7.0), - python-oslo.utils (>= 2.0.0), + python-oslo.config (>= 1:2.7.0), + python-oslo.db (>= 3.2.0), + python-oslo.log (>= 1.12.0), + python-oslo.messaging (>= 2.6.1), + python-oslo.serialization (>= 1.10.0), + python-oslo.service (>= 0.12.0), + python-oslo.utils (>= 2.8.0), python-pyasn1, python-pyasn1-modules, - python-requests (>= 2.5.2), + python-requests (>= 2.8.1), python-six (>= 1.9.0), python-sqlalchemy (>= 0.9.7), python-stevedore (>= 1.5.0), diff --git a/trusty/debian/patches/series b/trusty/debian/patches/series deleted file mode 100644 index f70cbc8..0000000 --- a/trusty/debian/patches/series +++ /dev/null @@ -1 +0,0 @@ -skip-failing-tests.patch diff --git a/trusty/debian/patches/skip-failing-tests.patch b/trusty/debian/patches/skip-failing-tests.patch deleted file mode 100644 index 482006f..0000000 --- a/trusty/debian/patches/skip-failing-tests.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naurp neutron-lbaas-2015.1.0rc1.orig/neutron_lbaas/tests/unit/common/tls_utils/test_cert_parser.py neutron-lbaas-2015.1.0rc1/neutron_lbaas/tests/unit/common/tls_utils/test_cert_parser.py ---- neutron-lbaas-2015.1.0rc1.orig/neutron_lbaas/tests/unit/common/tls_utils/test_cert_parser.py 2015-04-09 15:01:20.000000000 -0400 -+++ neutron-lbaas-2015.1.0rc1/neutron_lbaas/tests/unit/common/tls_utils/test_cert_parser.py 2015-04-11 20:28:15.164898414 -0400 -@@ -251,6 +251,7 @@ class TestTLSParseUtils(base.BaseTestCas - self.assertTrue(epkey.check()) - - def test_dump_private_key(self): -+ self.skipTest('Skipped by Ubuntu') - self.assertRaises(exceptions.NeedsPassphrase, - cert_parser.dump_private_key, - ENCRYPTED_PKCS8_CRT_KEY) diff --git a/trusty/debian/rules b/trusty/debian/rules index 03a8ac1..4f6e495 100755 --- a/trusty/debian/rules +++ b/trusty/debian/rules @@ -1,13 +1,18 @@ #!/usr/bin/make -f # Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +export DH_VERBOSE=1 include /usr/share/openstack-pkg-tools/pkgos.make %: dh $@ --with python2,systemd,sphinxdoc --buildsystem=python_distutils +override_dh_install: + tools/generate_config_file_samples.sh + bash -c 'for conf in $$(ls etc/*lbaas*.sample); do mv $$conf $${conf%.*}; done' + dh_install + # NOTE(jamespage): Some tests need access to /etc/neutron/neutron.conf, # skip these as this file will contain access credentials # so is not world readable. -- 2.45.2