vpnaas service doesn't work caused by a refactoring commit

Bug #1430100 reported by Hua Zhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Hua Zhang

Bug Description

The refactoring commit 56fd82 moves router_info and NAT rules staffs from l3-agent into vpn device driver, which cause two problems:

1, The router is maintained in the driver, and not the VPN service. The router instance should not be deleted.

2, NAT rules has been moved from l3-agent into vpn device driver, but something in vpn device driver is still refering NAT rules related methods in l3-agent.

Revision history for this message
Hua Zhang (zhhuabj) wrote :

the error logs for above 2) is below:

2015-03-10 09:12:20.572 DEBUG oslo_concurrency.lockutils [req-6f5df6b9-2ef0-4aae-b7a3-f246a235642f TestNetworkVPNaaS-51380903 TestNetworkVPNaaS-1875418556] Lock "vpn-agent" released by "sync" :: held 0.169s inner /usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py:442
2015-03-10 09:12:20.572 ERROR oslo_messaging.rpc.dispatcher [req-6f5df6b9-2ef0-4aae-b7a3-f246a235642f TestNetworkVPNaaS-51380903 TestNetworkVPNaaS-1875418556] Exception during message handling: 'VPNService' object has no attribute 'add_nat_rule'
2015-03-10 09:12:20.572 16734 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2015-03-10 09:12:20.572 16734 TRACE oslo_messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2015-03-10 09:12:20.572 16734 TRACE oslo_messaging.rpc.dispatcher executor_callback))
2015-03-10 09:12:20.572 16734 TRACE oslo_messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2015-03-10 09:12:20.572 16734 TRACE oslo_messaging.rpc.dispatcher executor_callback)
2015-03-10 09:12:20.572 16734 TRACE oslo_messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch
2015-03-10 09:12:20.572 16734 TRACE oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2015-03-10 09:12:20.572 16734 TRACE oslo_messaging.rpc.dispatcher File "/bak/openstack/neutron-vpnaas/neutron_vpnaas/services/vpn/device_drivers/ipsec.py", line 629, in vpnservice_updated
2015-03-10 09:12:20.572 16734 TRACE oslo_messaging.rpc.dispatcher self.sync(context, [router] if router else [])
2015-03-10 09:12:20.572 16734 TRACE oslo_messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 431, in inner
2015-03-10 09:12:20.572 16734 TRACE oslo_messaging.rpc.dispatcher return f(*args, **kwargs)
2015-03-10 09:12:20.572 16734 TRACE oslo_messaging.rpc.dispatcher File "/bak/openstack/neutron-vpnaas/neutron_vpnaas/services/vpn/device_drivers/ipsec.py", line 772, in sync
2015-03-10 09:12:20.572 16734 TRACE oslo_messaging.rpc.dispatcher self._sync_vpn_processes(vpnservices, sync_router_ids)
2015-03-10 09:12:20.572 16734 TRACE oslo_messaging.rpc.dispatcher File "/bak/openstack/neutron-vpnaas/neutron_vpnaas/services/vpn/device_drivers/ipsec.py", line 787, in _sync_vpn_processes
2015-03-10 09:12:20.572 16734 TRACE oslo_messaging.rpc.dispatcher self._update_nat(vpnservice, self.agent.add_nat_rule)
2015-03-10 09:12:20.572 16734 TRACE oslo_messaging.rpc.dispatcher AttributeError: 'VPNService' object has no attribute 'add_nat_rule'
2015-03-10 09:12:20.572 16734 TRACE oslo_messaging.rpc.dispatcher
2015-03-10 09:12:24.985 16734 DEBUG neutron.agent.l3.agent [-] Report state task started _report_state /bak/openstack/neutron/neutron/agent/l3/agent.py:1013
2015-03-10 09:12:24.987 16734 DEBUG oslo_messaging._drivers.amqp [-] UNIQUE_ID is d76650bab95b4eadb38a9b4398f9b712.

Changed in neutron:
assignee: nobody → Hua Zhang (zhhuabj)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-vpnaas (master)

Fix proposed to branch: master
Review: https://review.openstack.org/162840

Changed in neutron:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-vpnaas (master)

Reviewed: https://review.openstack.org/162840
Committed: https://git.openstack.org/cgit/openstack/neutron-vpnaas/commit/?id=810bcf53e71b3915442c15efcd9df116ea7a96c9
Submitter: Jenkins
Branch: master

commit 810bcf53e71b3915442c15efcd9df116ea7a96c9
Author: Zhang Hua <email address hidden>
Date: Tue Mar 10 10:12:56 2015 +0800

    VPNaaS breakage by refactoring commit

    The refactoring commit [1] moves router_info and NAT rules
    code from l3-agent into vpn device driver, which cause
    breakage due to the following two problems:

    1, The router is maintained in the driver, and not the VPN
       service. The router instance should not be deleted.

    2, NAT rules code has been moved from l3-agent into vpn device
       driver, but something is still refering NAT rules related
       methods from l3-agent.

    In any case, we need this change in ASAP.

    [1], https://review.openstack.org/#/c/160179/

    Change-Id: Ibdbf5ef9db1b7b1ab438ecb8de9cce5ec2f8f62e
    Closes-Bug: 1430100

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-3 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.