Trying to update a bgp peer in Mitaka with midonet-plugin installed neutron throws an error.
root@controller:~# neutron bgp-peer-update --name BGP-Peer22 46b91ae4-990c-4d23-9dab-905eae0ec364; tail -f /var/log/neutron/neutron-server.log
Request Failed: internal server error while processing your request.
Neutron server returns request_ids: ['req-4bd46532-1bd5-464c-8f3b-56321c3404fb']
2016-08-23 09:33:27.040 18778 ERROR neutron.api.v2.resource obj = obj_updater(request.context, id, **kwargs)
2016-08-23 09:33:27.040 18778 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_log/helpers.py", line 46, in wrapper
2016-08-23 09:33:27.040 18778 ERROR neutron.api.v2.resource return method(*args, **kwargs)
2016-08-23 09:33:27.040 18778 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/midonet/neutron/services/bgp/plugin.py", line 183, in update_bgp_peer
2016-08-23 09:33:27.040 18778 ERROR neutron.api.v2.resource context, bgp_peer_id, bgp_peer)
2016-08-23 09:33:27.040 18778 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/db/bgp_db.py", line 269, in update_bgp_peer
2016-08-23 09:33:27.040 18778 ERROR neutron.api.v2.resource if ((bp['password'] is not None) and
2016-08-23 09:33:27.040 18778 ERROR neutron.api.v2.resource KeyError: 'password'
2016-08-23 09:33:27.040 18778 ERROR neutron.api.v2.resource
2016-08-23 09:33:27.052 18778 INFO neutron.wsgi [req-4bd46532-1bd5-464c-8f3b-56321c3404fb 51a6b639fa6d4205a82c11fafb5e5033 d3d205605c8d4d97808e6ab50a17b26a - - -] 10.99.99.20 - - [23/Aug/2016 09:33:27] "PUT /v2.0/bgp-peers/46b91ae4-990c-4d23-9dab-905eae0ec364.json HTTP/1.1" 500 383 0.022151
Looks like a simple fix. If you look at [1], we should use "bp.get( 'password' )" instead of "bp['password']".
[1] https:/ /github. com/openstack/ neutron/ blob/stable/ mitaka/ neutron/ db/bgp_ db.py#L269