yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #57086
[Bug 1609665] Re: Updating a router to HA without enough agents results in partial update
Reviewed: https://review.openstack.org/351114
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=a167a3e20a755d599284ea10ebac5a8f1925e7ea
Submitter: Jenkins
Branch: master
commit a167a3e20a755d599284ea10ebac5a8f1925e7ea
Author: John Schwarz <jschwarz@xxxxxxxxxx>
Date: Thu Aug 4 13:31:26 2016 +0300
Check for l3 agents count before router update
When updating a legacy router to be an HA, it's possible that there are
less than the minimum required l3 agents available. In this case an
exception will be raised to indicate this, but some of the changes will
already be in committed. The effect is that the router will be in an
invalid partial state between legacy and HA.
This patch simply checks that there are enough l3 agents before starting
to convert the router to HA. This adds a single DB query for each
router-update from legacy to HA, but saves a bunch of others in case the
transition should not take place.
Closes-Bug: #1609665
Change-Id: I566b17003f6d9b4c8205c0586f742795012da29c
** 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/1609665
Title:
Updating a router to HA without enough agents results in partial
update
Status in neutron:
Fix Released
Bug description:
As the title says, updating a non-HA router to be HA while there is
less than the minimum available l3 agents to handle this router
results in an invalid state caused by a partial update.
[stack@js16 ~]$ neutron router-create --ha=False x
neutron router-update x --admin-0sCreated a new router:
+-------------------------+--------------------------------------+
| Field | Value |
+-------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | |
| availability_zones | |
| description | |
| distributed | False |
| external_gateway_info | |
| ha | False |
| id | 488a0eab-bf7a-4aea-84a4-4146a79eb225 |
| name | x |
| routes | |
| status | ACTIVE |
| tenant_id | 20482218062b458589b9cffa3a1bb172 |
+-------------------------+--------------------------------------+
[stack@js16 ~]$ neutron router-update x --admin-state-up=False
Updated router: x
[stack@js16 ~]$ neutron router-update x --ha=True
Not enough l3 agents available to ensure HA. Minimum required 2, available 1.
Neutron server returns request_ids: ['req-4c5400c5-465e-419b-aeda-e637a76c29a1']
[stack@js16 ~]$ neutron router-show x
+-------------------------+--------------------------------------+
| Field | Value |
+-------------------------+--------------------------------------+
| admin_state_up | False |
| availability_zone_hints | |
| availability_zones | |
| description | |
| distributed | False |
| external_gateway_info | |
| ha | True |
| id | 488a0eab-bf7a-4aea-84a4-4146a79eb225 |
| name | x |
| routes | |
| status | ALLOCATING |
| tenant_id | 20482218062b458589b9cffa3a1bb172 |
+-------------------------+--------------------------------------+
[stack@js16 ~]$ neutron l3-agent-list-hosting-router x
[stack@js16 ~]$
The router is set to HA and the status is stuck in ALLOCATING even
though it wasn't scheduled to any agent.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1609665/+subscriptions
References