[Openstack] Error when calling l3-agent-router-add

BRINGARD, KEVIN kb718q at att.com
Thu Sep 5 16:37:31 UTC 2013


I think Robert's comment is correct. The router is currently hosted on agent "789a77fd-52ff-44be-afea-27d26a8cd3d3". This was assigned at the router's creation by the router scheduler (currently only a chance scheduler exists, so it's random).

You cannot host the same logical router on more than one l3-agent at once, which is likely why you're getting the error when you attempt to add the router to an L3-agent.

If you want to specify which L3-agent is hosting a specific router, you would do something like the following:

quantum l3-agent-list-hosting-router router01 <copy the agent ID, in this case: 789a77fd-52ff-44be-afea-27d26a8cd3d3>
quantum agent-list | grep L3
<copy agent ID you want to move the router onto> quantum l3-agent-router-remove <agent ID the router is currently hosted on> <router-id> quantum l3-agent-list-hosting-router router01 <verify the router is no longer hosted on any L3-agent> quantum l3-agent-router-add <agent ID where you would like the router to be hosted> <router-id> quantum l3-agent-list-hosting-router router01 <verify the router is now hosted on the new l3-agent>

I personally would get router01's UUID and use that in place of the name router01, but it *should* work either way.

But, to your original question, you shouldn't have to add the router to an agent as that should happen at router creation time by the scheduler (as Robert said).

-- kevin


-----Original Message-----
From: Nicolae Paladi [mailto:n.paladi at gmail.com]
Sent: Thursday, September 05, 2013 3:19 AM
To: Robert van Leeuwen
Cc: openstack at lists.openstack.org
Subject: Re: [Openstack] Error when calling l3-agent-router-add

Hi, 


the output is:




quantum l3-agent-list-hosting-router router01

+--------------------------------------+---------------+----------------+-------+
| id                                   | host          | admin_state_up | alive |
+--------------------------------------+---------------+----------------+-------+
| 789a77fd-52ff-44be-afea-27d26a8cd3d3 | seoul         | True           | :-)   |
+--------------------------------------+---------------+----------------+-------+


However, shouldn't the l3-agent running on each compute host be attached to the router, or am I completely misunderstanding somethning?


Thanks,
/Nicolae.





On 5 September 2013 11:14, Robert van Leeuwen <Robert.vanLeeuwen at spilgames.com> wrote:


	> quantum l3-agent-router-add 789a77fd-52ff-44be-afea-27d26a8cd3d3 router01
	
	Not sure what you are trying to accomplish here.
	Scheduling, by default, happens automatically unless you have multiple routers and want to set it up to run a router on a specific l3-agent.
	
	Usually this should be enough:
	
	quantum router-create router1
	quantum router-interface-add router1 ${subnetname)
	
	What is the output of the following?:
	quantum l3-agent-list-hosting-router $(routername}
	
	Cheers,
	Robert van Leeuwen
	
	
	
	
	
	
	
	






More information about the Openstack mailing list