]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Update port bindings for master router
authorMike Kolesnik <mkolesni@redhat.com>
Tue, 7 Apr 2015 23:54:09 +0000 (19:54 -0400)
committerMike Kolesnik <mkolesni@redhat.com>
Thu, 23 Jul 2015 12:15:18 +0000 (15:15 +0300)
commit91d3a0219a43a2c06ea4043cc9eeb518815df391
treedda7e60e0f45eef02454e876664192563b1a3f79
parentc5359276f6ad3ac3c88d78471bbf4f46b4ddcb84
Update port bindings for master router

An HA port needs to point to the correct host (where the master router
is running) in order for L2Population to work.

Hence, this patch introduces two fixes:
* When a port owned by an HA router is up we make sure it points to the
  right node where the master is running, or a random node if there is
  no master yet (This corner case is fixed by the 2nd bullet point).

* When a L3 agent reports it's hosting a master, we need to update the
  port binding to the host the master is now running on. This fixes
  both routers with no elected master (Yet) and failovers.

This patch also changes the L3 HA failover test to use l2pop.
Note that the test does not pass when using l2pop without this patch.

Closes-Bug: #1365476
Co-Authored-By: Assaf Muller <amuller@redhat.com>
Change-Id: I8475548947526d8ea736ed7aa754fd0ca475cae2
neutron/api/rpc/handlers/l3_rpc.py
neutron/common/constants.py
neutron/db/l3_hamode_db.py
neutron/tests/unit/db/test_l3_hamode_db.py