From 8bf042180a273aa652b853acbe10fc8509a60799 Mon Sep 17 00:00:00 2001 From: Boden R Date: Mon, 17 Dec 2018 02:34:49 +0900 Subject: [PATCH] Fix and skip gate failures lower-constraints.txt is updated. - ryu 4.24 - pecan 1.3.2 neutron-vpnaas-tempest-libreswan-centos is now non-voting because Cinder DB migration fails on CentOS 7. This patch also includes the changes from [1] as without them the tests fail. [1] https://review.openstack.org/#/c/599034/ Related-Bug: 1808709 Change-Id: Id6a2eadfacb3983cfc05142860a827d3233561dd --- .zuul.yaml | 4 +++- lower-constraints.txt | 4 ++-- neutron_vpnaas/db/vpn/vpn_db.py | 21 +++++---------------- 3 files changed, 10 insertions(+), 19 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 00da94024..ff292536f 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -13,7 +13,9 @@ jobs: - neutron-vpnaas-dsvm-functional-sswan - neutron-vpnaas-tempest - - neutron-vpnaas-tempest-libreswan-centos + - neutron-vpnaas-tempest-libreswan-centos: + # Cinder DB migration fails on CentOS 7 (bug 1808709) + voting: false gate: jobs: - neutron-vpnaas-dsvm-functional-sswan diff --git a/lower-constraints.txt b/lower-constraints.txt index ad3190e97..818244cb5 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -87,7 +87,7 @@ paramiko==2.0.0 Paste==2.0.2 PasteDeploy==1.5.0 pbr==2.0.0 -pecan==1.0.0 +pecan==1.3.2 pep8==1.5.7 pika==0.10.0 pika-pool==0.1.3 @@ -122,7 +122,7 @@ requests-mock==1.2.0 requestsexceptions==1.2.0 rfc3986==0.3.1 Routes==2.3.1 -ryu==4.14 +ryu==4.24 simplejson==3.5.1 six==1.10.0 snowballstemmer==1.2.1 diff --git a/neutron_vpnaas/db/vpn/vpn_db.py b/neutron_vpnaas/db/vpn/vpn_db.py index 283ebef11..60df1be8b 100644 --- a/neutron_vpnaas/db/vpn/vpn_db.py +++ b/neutron_vpnaas/db/vpn/vpn_db.py @@ -693,22 +693,7 @@ class VPNPluginRpcDbMixin(object): conn['updated_pending_status']) -def vpn_callback(resource, event, trigger, **kwargs): - # TODO(boden): refactor back into single method once everything is using - # the event payload objects - vpn_plugin = directory.get_plugin(p_constants.VPN) - if vpn_plugin: - context = kwargs.get('context') - router_id = kwargs.get('router_id') - if resource == resources.ROUTER_GATEWAY: - vpn_plugin.check_router_in_use(context, router_id) - elif resource == resources.ROUTER_INTERFACE: - subnet_id = kwargs.get('subnet_id') - vpn_plugin.check_subnet_in_use(context, subnet_id, router_id) - - def vpn_router_gateway_callback(resource, event, trigger, payload=None): - # TODO(boden): refactor back into single method once everything is using # the event payload objects vpn_plugin = directory.get_plugin(p_constants.VPN) if vpn_plugin: @@ -716,6 +701,9 @@ def vpn_router_gateway_callback(resource, event, trigger, payload=None): router_id = payload.resource_id if resource == resources.ROUTER_GATEWAY: vpn_plugin.check_router_in_use(context, router_id) + elif resource == resources.ROUTER_INTERFACE: + subnet_id = payload.metadata.get('subnet_id') + vpn_plugin.check_subnet_in_use(context, subnet_id, router_id) def migration_callback(resource, event, trigger, **kwargs): @@ -741,7 +729,8 @@ def subscribe(): vpn_router_gateway_callback, resources.ROUTER_GATEWAY, events.BEFORE_DELETE) registry.subscribe( - vpn_callback, resources.ROUTER_INTERFACE, events.BEFORE_DELETE) + vpn_router_gateway_callback, resources.ROUTER_INTERFACE, + events.BEFORE_DELETE) registry.subscribe( migration_callback, resources.ROUTER, events.BEFORE_UPDATE) registry.subscribe(