Cannot create password-authenticated BGP peer
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Dongcan Ye |
Bug Description
When trying to create a password-
Step-by-step reproduction steps:
neutron bgp-peer-create --peer-ip 2001:db8::1 --remote-as 65001 --auth-type md5 --password plaintext bgp-peer1
Actual output:
2016-06-10 15:59:00.329 3181 ERROR ryu.lib.hub [-] hub: uncaught exception: Traceback (most recent call last):
File "/openstack/
func(*args, **kwargs)
File "/openstack/
password=
File "/openstack/
sockopt.
File "/openstack/
impl(s, addr, key)
File "/openstack/
tcp_md5sig = ss + struct.
error: argument for 's' must be a string
Version: stable/mitaka deployed with OpenStack-Ansible on Ubuntu Trusty
Environment: multi-node
Pre-conditions: Add init script for BGP DrAgent (does not come by default with the OSA deployment)
Perceived severity: Blocks usage of authenticated BGP. Unauthenticated BGP still works.
Comments:
The database model returns (get_bgp_peer) the password as an unicode string, which is passed around until it reaches the Ryu library, causing the error shown in the stacktrace above.
I tried to follow the Neutron codebase's standard solution to deal with this. Several places do encode unicode strings which have been read from the database before passing them around, e.g.:
neutron/
neutron/
--
neutron/
neutron/
neutron/
neutron/
The attached patch fixes this issue (tested and working on stable/mitaka) using the same strategy. Should I open a review request for that in gerrit?
Thanks
Changed in neutron: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
@Paulo Matias, Please put your patch to neutron- dynamic- routing gerrit.