]> review.fuel-infra Code Review - openstack-build/neutron-lbaas-build.git/commitdiff
Update to 8.0.0.0b2 01/16301/13
authorJerzy Mikolajczak <jmikolajczak@mirantis.com>
Wed, 20 Jan 2016 12:54:11 +0000 (13:54 +0100)
committerJerzy Mikolajczak <jmikolajczak@mirantis.com>
Thu, 21 Jan 2016 13:58:32 +0000 (14:58 +0100)
- 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
trusty/debian/changelog
trusty/debian/control
trusty/debian/patches/series [deleted file]
trusty/debian/patches/skip-failing-tests.patch [deleted file]
trusty/debian/rules

index 2f1fe304bf01305cdcc29cfb0b2776ac1c3227b3..6d4a53e50f8959b2259a1ae83fc10fa282c5361f 100755 (executable)
@@ -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
   ;;
index f332d51d323c2fa7ac314e355f9daa73e24a283b..56e78180613f4f3a3fd7c767819a18c1b1487e09 100644 (file)
@@ -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 <jmikolajczak@mirantis.com>  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
index 3087b2279cd484939f299dc5e6e72856162f8c3e..541230f0e11e5e854af4df857c7c3edc0cf00caa 100644 (file)
@@ -5,6 +5,7 @@ Maintainer: MOS Neutron Team <mos-neutron@mirantis.com>
 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 (file)
index f70cbc8..0000000
+++ /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 (file)
index 482006f..0000000
+++ /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)
index 03a8ac19697ea45f03e563f716efab3e36d6f40c..4f6e495a5333fae7a521848389a2f1b19479551e 100755 (executable)
@@ -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.