L3 agent: explicit call to resync on init may lead to double syncing

Bug #1505282 reported by Oleg Bondarev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Oleg Bondarev

Bug Description

Currently L3 agent has an explicit call to self.periodic_sync_routers_task() after initialization.
Given that periodic job spacing is set to 1 second, this may lead to double syncing with server on initialization (especially if there are a lot of routers scheduled to the agent):
 - agent starts, fullsync flag is True
 - periodic_sync_routers_task is called from after_start(), agent requests router info from server, fullsync flag is True
 - periodic_sync_routers_task is called by periodic task framework, fullsync flag is still True, agent requests router info from server once again.
So it's double work on both server and agent sides which might be quite expensive at scale.

The proposal is to just use run_immediately parameter.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/233698

Changed in neutron:
status: New → In Progress
Changed in neutron:
importance: Undecided → Medium
Revision history for this message
Assaf Muller (amuller) wrote :

The fix should be backported to L and K.

tags: added: kilo-backport-potential
tags: added: liberty-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/233698
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=cbc268e8395d72c8aa6ea05d90bd22f99df1b8db
Submitter: Jenkins
Branch: master

commit cbc268e8395d72c8aa6ea05d90bd22f99df1b8db
Author: Oleg Bondarev <email address hidden>
Date: Mon Oct 12 18:59:55 2015 +0300

    L3 agent: use run_immediately parameter to sync after start

    Explicit call to periodic resync after start may lead to
    double syncing. See bug for details.

    Closes-Bug: #1505282
    Change-Id: Ib5e481d579039b2c3e87d4f12cad1241d02fe060

Changed in neutron:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/235846

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/235849

Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

I believe it's Juno too. Am I correct?

tags: added: juno-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/liberty)

Reviewed: https://review.openstack.org/235849
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=c518d6d8c7d9926780ce6f9424038dda10d19945
Submitter: Jenkins
Branch: stable/liberty

commit c518d6d8c7d9926780ce6f9424038dda10d19945
Author: Oleg Bondarev <email address hidden>
Date: Mon Oct 12 18:59:55 2015 +0300

    L3 agent: use run_immediately parameter to sync after start

    Explicit call to periodic resync after start may lead to
    double syncing. See bug for details.

    Closes-Bug: #1505282
    Change-Id: Ib5e481d579039b2c3e87d4f12cad1241d02fe060
    (cherry picked from commit cbc268e8395d72c8aa6ea05d90bd22f99df1b8db)

tags: added: in-stable-liberty
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/kilo)

Reviewed: https://review.openstack.org/235846
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=26fa0f939cbd17968d52418e44540d7ac170fc03
Submitter: Jenkins
Branch: stable/kilo

commit 26fa0f939cbd17968d52418e44540d7ac170fc03
Author: Oleg Bondarev <email address hidden>
Date: Mon Oct 12 18:59:55 2015 +0300

    L3 agent: use run_immediately parameter to sync after start

    Explicit call to periodic resync after start may lead to
    double syncing. See bug for details.

    Closes-Bug: #1505282

    Conflicts:

     neutron/agent/l3/agent.py

    Change-Id: Ib5e481d579039b2c3e87d4f12cad1241d02fe060
    (cherry picked from commit cbc268e8395d72c8aa6ea05d90bd22f99df1b8db)

tags: added: in-stable-kilo
Akihiro Motoki (amotoki)
tags: removed: kilo-backport-potential liberty-rc-potential
Alan Pevec (apevec)
tags: removed: juno-backport-potential
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/neutron 8.0.0.0b1

This issue was fixed in the openstack/neutron 8.0.0.0b1 development milestone.

Changed in neutron:
status: Fix Committed → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/neutron 7.0.1

This issue was fixed in the openstack/neutron 7.0.1 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.