Reviewed:  https://review.opendev.org/651815
Committed: 
https://git.openstack.org/cgit/openstack/neutron/commit/?id=49a66dba31f23d54972e962beef66c39307904df
Submitter: Zuul
Branch:    master

commit 49a66dba31f23d54972e962beef66c39307904df
Author: Michal Arbet <michal.ar...@ultimum.io>
Date:   Thu Apr 11 17:14:48 2019 +0200

    Fix py3 compatibility
    
    In fetch_and_sync_all_routers method is used python's range function.
    Range function accepts integers.
    
    This patch is fixing divide behaviour in py3 where result number is float,
    by retyping float to int as it is represented in py2.
    
    Change-Id: Ifffdee0d4a3226d4871cfabd0bdbf13d7058a83e
    Closes-Bug: #1824334


** Changed in: neutron
       Status: In Progress => Fix Released

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

Title:
  L3 agent fails when RabbitMQ/Neutron-rpc-server not responding

Status in neutron:
  Fix Released

Bug description:
  L3 agent fails when RabbitMQ/Neutron-rpc-server not responding :

  2018-11-07 16:40:26.247 2961332 ERROR oslo_service.periodic_task Traceback 
(most recent call last): 
  2018-11-07 16:40:26.247 2961332 ERROR oslo_service.periodic_task File 
"/usr/lib/python3/dist-packages/oslo_service/periodic_task.py", line 220, in 
run_periodic_tasks 
  2018-11-07 16:40:26.247 2961332 ERROR oslo_service.periodic_task task(self, 
context) 
  2018-11-07 16:40:26.247 2961332 ERROR oslo_service.periodic_task File 
"/usr/lib/python3/dist-packages/neutron/agent/l3/agent.py", line 604, in 
periodic_sync_routers_task 
  2018-11-07 16:40:26.247 2961332 ERROR oslo_service.periodic_task 
self.fetch_and_sync_all_routers(context, ns_manager) 
  2018-11-07 16:40:26.247 2961332 ERROR oslo_service.periodic_task File 
"/usr/lib/python3/dist-packages/osprofiler/profiler.py", line 153, in wrapper 
  2018-11-07 16:40:26.247 2961332 ERROR oslo_service.periodic_task return 
f(*args, **kwargs) 
  2018-11-07 16:40:26.247 2961332 ERROR oslo_service.periodic_task File 
"/usr/lib/python3/dist-packages/osprofiler/profiler.py", line 153, in wrapper 
  2018-11-07 16:40:26.247 2961332 ERROR oslo_service.periodic_task return 
f(*args, **kwargs) 
  2018-11-07 16:40:26.247 2961332 ERROR oslo_service.periodic_task File 
"/usr/lib/python3/dist-packages/neutron/agent/l3/agent.py", line 620, in 
fetch_and_sync_all_routers 
  2018-11-07 16:40:26.247 2961332 ERROR oslo_service.periodic_task for i in 
range(0, len(router_ids), self.sync_routers_chunk_size): 
  2018-11-07 16:40:26.247 2961332 ERROR oslo_service.periodic_task TypeError: 
'float' object cannot be interpreted as an integer 
  2018-11-07 16:40:26.247 2961332 ERROR oslo_service.periodic_task

  Problem is in neutron/agent/l3/agent.py when py3 is used in code of
  block where "range" is used :

  757 for i in range(0, len(router_ids), self.sync_routers_chunk_size):
  758     chunk = router_ids[i:i + self.sync_routers_chunk_size]

  
  This can be fixed by this patch >> 

  --- neutron/agent/l3/agent.py    (revision 
b09b8868e93aea437055c041148ccbd095c5c249)
  +++ neutron/agent/l3/agent.py    (date 1541680223000)
  @@ -702,7 +702,7 @@
           except oslo_messaging.MessagingTimeout:
               if self.sync_routers_chunk_size > SYNC_ROUTERS_MIN_CHUNK_SIZE:
                   self.sync_routers_chunk_size = max(
  -                    self.sync_routers_chunk_size / 2,
  +                    int(self.sync_routers_chunk_size / 2),
                       SYNC_ROUTERS_MIN_CHUNK_SIZE)
                   LOG.error('Server failed to return info for routers in '
                             'required time, decreasing chunk size to: %s',

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to