Scheduling router without external network results in unclear error

Bug #1572390 reported by James Denton
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Won't Fix
Low
Unassigned

Bug Description

When attempting to schedule a router to an L3 agent without an external network set, the following error is observed:

root@infra01_neutron_server_container-96ae0d98:~# neutron l3-agent-router-add 7ec8336e-3d82-46f5-8e15-2f2477090021 TestRouter
Agent 7ec8336e-3d82-46f5-8e15-2f2477090021 is not a L3 Agent or has been disabled

The error could lead users to believe the L3 agent(s) are not alive when the agent-list clearly shows otherwise:

root@infra01_neutron_server_container-96ae0d98:~# neutron agent-list | grep l3
| 7ec8336e-3d82-46f5-8e15-2f2477090021 | L3 agent | infra01_neutron_agents_container-4bbf1e68 | :-) | True | neutron-l3-agent |
| b5d7be19-3143-431e-ac8b-1c8237acaace | L3 agent | infra02_neutron_agents_container-fb552892 | :-) | True | neutron-l3-agent |
| e8bed137-6ec3-41d1-a524-3e5e3a884fcd | L3 agent | infra03_neutron_agents_container-ad2973dd | :-) | True | neutron-l3-agent |

The test case in get_l3_agent_candidates function in l3_agentschedulers_db.py tests to see if external_gateway_info is set and when it isn't, returns zero candidates. As a result, the presented agent is considered invalid.

The proper workflow appears to be that a gateway must be set before a router can be scheduled. However, already scheduled routers can have their gateway cleared with no observed issues and remain scheduled.

It may help to create a new error to represent this failed test case rather than lumping tests together, or provide additional pointers in the error message to reflect possible issues other than a disabled or non-L3 agent.

Doug Wiegley (dougwig)
Changed in neutron:
status: New → Triaged
importance: Undecided → Low
tags: added: low-hanging-fruit
Jin Li (jl7351)
Changed in neutron:
assignee: nobody → Jin Li (jl7351)
Jin Li (jl7351)
Changed in neutron:
assignee: Jin Li (jl7351) → nobody
Changed in neutron:
assignee: nobody → Trevor McCasland (twm2016)
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/311208

Changed in neutron:
status: Triaged → In Progress
Revision history for this message
James Denton (james-denton) wrote :

Further examination shows this condition is seen when handle_internal_only_routers is set to False. When set to True, the router can be scheduled without an external network set. If anything, the request here is to clarify the error message presented to the user in case of the former.

Revision history for this message
Assaf Muller (amuller) wrote :

Out of curiosity, can you expand on the use case, why are you setting handle_internal_only_routers to False?

Revision history for this message
James Denton (james-denton) wrote :

It wasn't intentional on my part. I'm using openstack-ansible, and from Liberty onward it appears to be hard-coded to False in the l3_agent.ini template. I will file a bug for that.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Trevor McCasland (<email address hidden>) on branch: master
Review: https://review.openstack.org/311208
Reason: Abandoning because of lack of value added to the project pointed out by garyk.

Changed in neutron:
assignee: Trevor McCasland (twm2016) → nobody
status: In Progress → Opinion
Revision history for this message
Brian Haley (brian-haley) wrote :

Closing as patch was abandoned due to lack of value. If someone intends to work on this further please re-open. Thanks.

Changed in neutron:
status: Opinion → Won't Fix
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.