Public bug reported: ## Description
We run OpenStack Ussuri and see the following errors repeatedly on `neutron-server.log`: ``` 2021-04-14 16:39:02.230 30704 ERROR neutron_lib.callbacks.manager [req-33c1014f-75c4-4306-96a8-927bb62f7f60 1718caa43bf24e7990cc09d5daa1fb85 46e94ce6568449209de022fa3bbbbae4 - 3dbb1c3c0fc54cc0b793ac49f841f103 3dbb1c3c0fc54cc0b793ac49f841f103] Error during notification for neutron_dynamic_routing.services.bgp.bgp_plugin.BgpPlugin.floatingip_update_callback--9223372036854663447 floatingip, after_update: TypeError: unsupported operand type(s) for +: 'int' and 'str' 2021-04-14 16:39:02.230 30704 ERROR neutron_lib.callbacks.manager Traceback (most recent call last): 2021-04-14 16:39:02.230 30704 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/neutron_lib/callbacks/manager.py", line 197, in _notify_loop 2021-04-14 16:39:02.230 30704 ERROR neutron_lib.callbacks.manager callback(resource, event, trigger, **kwargs) 2021-04-14 16:39:02.230 30704 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/neutron_dynamic_routing/services/bgp/bgp_plugin.py", line 235, in floatingip_update_callback 2021-04-14 16:39:02.230 30704 ERROR neutron_lib.callbacks.manager dest = floating_ip_address + '/32' 2021-04-14 16:39:02.230 30704 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/netaddr/ip/__init__.py", line 426, in __add__ 2021-04-14 16:39:02.230 30704 ERROR neutron_lib.callbacks.manager new_value = int(self._value + num) 2021-04-14 16:39:02.230 30704 ERROR neutron_lib.callbacks.manager TypeError: unsupported operand type(s) for +: 'int' and 'str' ``` The error is caused by https://opendev.org/openstack/neutron-dynamic- routing/src/branch/master/neutron_dynamic_routing/services/bgp/bgp_plugin.py#L235. While debugging the issue, `floating_ip_address` was found to be a netaddr.IPAddress object, so using + '/32' to add a suffix raises a TypeError. ## Environment OpenStack Ussuri ** Affects: neutron Importance: Undecided Status: In Progress -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1924237 Title: TypeError when formating IP address for BGP plugin Status in neutron: In Progress Bug description: ## Description We run OpenStack Ussuri and see the following errors repeatedly on `neutron-server.log`: ``` 2021-04-14 16:39:02.230 30704 ERROR neutron_lib.callbacks.manager [req-33c1014f-75c4-4306-96a8-927bb62f7f60 1718caa43bf24e7990cc09d5daa1fb85 46e94ce6568449209de022fa3bbbbae4 - 3dbb1c3c0fc54cc0b793ac49f841f103 3dbb1c3c0fc54cc0b793ac49f841f103] Error during notification for neutron_dynamic_routing.services.bgp.bgp_plugin.BgpPlugin.floatingip_update_callback--9223372036854663447 floatingip, after_update: TypeError: unsupported operand type(s) for +: 'int' and 'str' 2021-04-14 16:39:02.230 30704 ERROR neutron_lib.callbacks.manager Traceback (most recent call last): 2021-04-14 16:39:02.230 30704 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/neutron_lib/callbacks/manager.py", line 197, in _notify_loop 2021-04-14 16:39:02.230 30704 ERROR neutron_lib.callbacks.manager callback(resource, event, trigger, **kwargs) 2021-04-14 16:39:02.230 30704 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/neutron_dynamic_routing/services/bgp/bgp_plugin.py", line 235, in floatingip_update_callback 2021-04-14 16:39:02.230 30704 ERROR neutron_lib.callbacks.manager dest = floating_ip_address + '/32' 2021-04-14 16:39:02.230 30704 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/netaddr/ip/__init__.py", line 426, in __add__ 2021-04-14 16:39:02.230 30704 ERROR neutron_lib.callbacks.manager new_value = int(self._value + num) 2021-04-14 16:39:02.230 30704 ERROR neutron_lib.callbacks.manager TypeError: unsupported operand type(s) for +: 'int' and 'str' ``` The error is caused by https://opendev.org/openstack/neutron-dynamic- routing/src/branch/master/neutron_dynamic_routing/services/bgp/bgp_plugin.py#L235. While debugging the issue, `floating_ip_address` was found to be a netaddr.IPAddress object, so using + '/32' to add a suffix raises a TypeError. ## Environment OpenStack Ussuri To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1924237/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

