Comment 26 for bug 1609738

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/newton)

Reviewed: https://review.openstack.org/444387
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=b3f4e128417dbeaa18081a39497b1c1705483cc6
Submitter: Jenkins
Branch: stable/newton

commit b3f4e128417dbeaa18081a39497b1c1705483cc6
Author: John Schwarz <email address hidden>
Date: Thu Oct 13 13:54:07 2016 +0300

    Don't create HA resources until needed

    Change I3447ea5bcb7c57365c6f50efe12a1671e86588b3 introduced a new
    running-index for RouterL3AgentBinding, binding_index, which helps to
    keep count of how many bindings a router has for each agent (and how
    many bindings in total). Since we were able use this DB column to make
    sure concurrency doesn't break on creating a new HA router, we also
    postponed the creation of L3HARouterAgentPortBinding to after the first
    binding was successfully created.

    This patch proposes a change to the way routers are scheduled to an
    agent: when creating a new HA router, no L3HARouterAgentPortBinding
    entities will be created until after the corresponding
    RouterL3AgentBinding was successfully created.
    In other words, instead of pre-creating the L3HARouterAgentPortBinding
    objects without assigning it to an agent, we'll create them only after
    the RouterL3AgentBinding were successfully created.

    Conflicts:
     neutron/scheduler/l3_agent_scheduler.py
     neutron/tests/unit/db/test_l3_hamode_db.py

    Related-Bug: #1609738
    Change-Id: Ie98d5e3760cdb17450aea546f4b61f5ba14baf1c
    (cherry picked from commit 2ad9c679ed8718633732da1e97307f9fd9647dcc)