The scenario is a simple one: during the creation of a router, the server that deals with the request crashes after creating the router with the ALLOCATING state [1] but before it's changed to ACTIVE [2]. In this case, the router will be "stuck" in the ALLOCATING and the only admin action to change the router back to ACTIVE (and allow it to be scheduled to agents) is:
1. set admin-state-up to False
2. set ha to False
3. set ha to True
4. set admin-state-up to True
That is, a full migration of the HA router to legacy and back to HA is required. This will trigger the code in [3] and will fix this issue.
The proposed solution is to add a new state, such that if admin-state-up is changed to False then the router's status will be changed to "DOWN" (as opposed to the current "ACTIVE", which doesn't make much sense since admin-state-up is False).
The scenario is a simple one: during the creation of a router, the server that deals with the request crashes after creating the router with the ALLOCATING state [1] but before it's changed to ACTIVE [2]. In this case, the router will be "stuck" in the ALLOCATING and the only admin action to change the router back to ACTIVE (and allow it to be scheduled to agents) is:
1. set admin-state-up to False
2. set ha to False
3. set ha to True
4. set admin-state-up to True
That is, a full migration of the HA router to legacy and back to HA is required. This will trigger the code in [3] and will fix this issue.
The proposed solution is to add a new state, such that if admin-state-up is changed to False then the router's status will be changed to "DOWN" (as opposed to the current "ACTIVE", which doesn't make much sense since admin-state-up is False).
[1]: https:/ /github. com/openstack/ neutron/ blob/ff5b38071e 7e134baa0dc7a52 280f9bcbc06efaf /neutron/ db/l3_hamode_ db.py#L469 /github. com/openstack/ neutron/ blob/ff5b38071e 7e134baa0dc7a52 280f9bcbc06efaf /neutron/ db/l3_hamode_ db.py#L485 /github. com/openstack/ neutron/ blob/ff5b38071e 7e134baa0dc7a52 280f9bcbc06efaf /neutron/ db/l3_hamode_ db.py#L570
[2]: https:/
[3]: https:/