← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1637972] Re: VPNaaS: report_state fails by key error 'tenant_id'

 

I'm not able to reproduce this issue on master branch.
For VPNaaS I've used this description [1]. To verify correctness of VPN, I've run script [2], which is included in config site. There is a small error in third line. WEST_SUBNET should be in newline. 

[1] https://wiki.openstack.org/wiki/Neutron/VPNaaS/HowToInstall
[2] http://paste.openstack.org/raw/44702/

Hiroyuki, could you retry this and verify if you still see this error?

** Changed in: neutron
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1637972

Title:
  VPNaaS: report_state fails by key error 'tenant_id'

Status in neutron:
  Invalid

Bug description:
  When creating ipsec-site-connection, the error KeyError: 'tenant_id'
  occurred in vpn agent.

  
  Operation:

  $ neutron ipsec-site-connection-create --peer-cidr 192.168.91.0/24 --peer-id 192.168.7.4 --peer-address 192.168.7.4 --psk ps --vpnservice-id service1 --ikepolicy-id ike1 --ipsecpolicy-id ipsec1 --name test1 --dpd action=disabled
  Created a new ipsec_site_connection:
  +-------------------+--------------------------------------------------------+
  | Field             | Value                                                  |
  +-------------------+--------------------------------------------------------+
  | admin_state_up    | True                                                   |
  | auth_mode         | psk                                                    |
  | description       |                                                        |
  | dpd               | {"action": "disabled", "interval": 30, "timeout": 120} |
  | id                | 298a689b-428b-45fd-a868-2d4738d59eb1                   |
  | ikepolicy_id      | be1f92ab-8064-4328-8862-777ae6878691                   |
  | initiator         | bi-directional                                         |
  | ipsecpolicy_id    | 09c67ae8-6ede-47ca-a15b-c52be1d7feaf                   |
  | local_ep_group_id |                                                        |
  | local_id          |                                                        |
  | mtu               | 1500                                                   |
  | name              | test1                                                  |
  | peer_address      | 192.168.7.4                                            |
  | peer_cidrs        | 192.168.91.0/24                                        |
  | peer_ep_group_id  |                                                        |
  | peer_id           | 192.168.7.4                                            |
  | project_id        | 068a47c758ae4b5d9fab059539e57740                       |
  | psk               | ps                                                     |
  | route_mode        | static                                                 |
  | status            | PENDING_CREATE                                         |
  | tenant_id         | 068a47c758ae4b5d9fab059539e57740                       |
  | vpnservice_id     | 4f82612c-5e3a-4699-aafa-bdfa5ede31fe                   |
  +-------------------+--------------------------------------------------------+

  Error log in vpn agent:

  2016-10-31 19:24:15.591 ERROR oslo_messaging.rpc.server [req-169503b5-edbc-46a9-8ded-03b5b5d278ea demo 068a47c758ae4b5d9fab059539e57740] Exception during message handling
  2016-10-31 19:24:15.591 TRACE oslo_messaging.rpc.server Traceback (most recent call last):
  2016-10-31 19:24:15.591 TRACE oslo_messaging.rpc.server   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 155, in _process_incoming
  2016-10-31 19:24:15.591 TRACE oslo_messaging.rpc.server     res = self.dispatcher.dispatch(message)
  2016-10-31 19:24:15.591 TRACE oslo_messaging.rpc.server   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 225, in dispatch
  2016-10-31 19:24:15.591 TRACE oslo_messaging.rpc.server     return self._do_dispatch(endpoint, method, ctxt, args)
  2016-10-31 19:24:15.591 TRACE oslo_messaging.rpc.server   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 195, in _do_dispatch
  2016-10-31 19:24:15.591 TRACE oslo_messaging.rpc.server     result = func(ctxt, **new_args)
  2016-10-31 19:24:15.591 TRACE oslo_messaging.rpc.server   File "/opt/stack/neutron-vpnaas/neutron_vpnaas/services/vpn/device_drivers/ipsec.py", line 884, in vpnservice_updated
  2016-10-31 19:24:15.591 TRACE oslo_messaging.rpc.server     self.sync(context, [router] if router else [])
  2016-10-31 19:24:15.591 TRACE oslo_messaging.rpc.server   File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 271, in inner
  2016-10-31 19:24:15.591 TRACE oslo_messaging.rpc.server     return f(*args, **kwargs)
  2016-10-31 19:24:15.591 TRACE oslo_messaging.rpc.server   File "/opt/stack/neutron-vpnaas/neutron_vpnaas/services/vpn/device_drivers/ipsec.py", line 1050, in sync
  2016-10-31 19:24:15.591 TRACE oslo_messaging.rpc.server     self.report_status(context)
  2016-10-31 19:24:15.591 TRACE oslo_messaging.rpc.server   File "/opt/stack/neutron-vpnaas/neutron_vpnaas/services/vpn/device_drivers/ipsec.py", line 1006, in report_status
  2016-10-31 19:24:15.591 TRACE oslo_messaging.rpc.server     if not self.should_be_reported(context, process):
  2016-10-31 19:24:15.591 TRACE oslo_messaging.rpc.server   File "/opt/stack/neutron-vpnaas/neutron_vpnaas/services/vpn/device_drivers/ipsec.py", line 1000, in should_be_reported
  2016-10-31 19:24:15.591 TRACE oslo_messaging.rpc.server     process.vpnservice["tenant_id"] == context.tenant_id):
  2016-10-31 19:24:15.591 TRACE oslo_messaging.rpc.server KeyError: 'tenant_id'
  2016-10-31 19:24:15.591 TRACE oslo_messaging.rpc.server

  
  As a result, ipsec-site-connection is still PENDING_CREATE status after a few minutes.
  $ neutron ipsec-site-connection-list
  +---------------------+-------+--------------+-----------+----------------+
  | id                  | name  | peer_address | auth_mode | status         |
  +---------------------+-------+--------------+-----------+----------------+
  | 298a689b-428b-45fd- | test1 | 192.168.7.4  | psk       | PENDING_CREATE |
  | a868-2d4738d59eb1   |       |              |           |                |
  +---------------------+-------+--------------+-----------+----------------+

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1637972/+subscriptions


References