Ask Your Question
0

Can multiple l3-agent instances run on one host?

asked 2013-06-05 08:39:59 -0500

kong gravatar image

Hi all:

When I read the code of the latest quantum master brantch, I found that the behavior of "add_network_to_dhcp_agent" and "add_router_to_l3_agent" is not the same. Because I have not the newest installation for now, so I came here to ask for help!

"add_network_to_dhcp_agent": after some verifacation, will directly add a record in the NetworkDhcpAgentBinding table;

"add_router_to_l3_agent": after some verifacation, method 'auto_schedule_routers' is called: result = self.auto_schedule_routers(context, agent_db.host, router_id) the parameter 'agent_db.host' means that there are some l3-agent instances on the host(if not, I think this method will not make sense), then the code will pick one that may be different with the agent you want host the router, so strange!

I wander whether it's a bug. Please let me know if I am missing something here.

--Lingxian Kong

edit retag flag offensive close merge delete

5 answers

Sort by » oldest newest most voted
0

answered 2013-06-06 05:54:03 -0500

gongysh gravatar image

To add route on l3 agent is more complicated, the algorithm is done in auto_schedule_routers. agent_db.host is specifying the agent, the router is the target. so it means add the router to the given l3 agent.

edit flag offensive delete link more
0

answered 2013-06-06 05:56:26 -0500

gongysh gravatar image

regarding 'Can multiple l3-agent instances run on one host?", the answer is yes, but you should define the 'host' to different value in l3_agent.ini, and the namespace must be enalbed.

edit flag offensive delete link more
0

answered 2013-06-06 06:45:01 -0500

kong gravatar image

to yongsheng:

Thanks for your reply!

But I'm still confused. The algorithm in auto_schedule_routers may choose another l3-agent using the same 'host', right?code here: ... query = context.session.query(agents_db.Agent) query = query.filter(agents_db.Agent.agent_type == constants.AGENT_TYPE_L3, agents_db.Agent.host == host, agents_db.Agent.admin_state_up == True) try: l3_agent = query.one() ...

and if each l3-agent has different 'host' configuration, why not send message to the agent directly, rather than randomly choose one? I think it's contradictory.

--Lingxian Kong

edit flag offensive delete link more
0

answered 2013-06-06 07:26:09 -0500

gongysh gravatar image

one host can have only one l3 agent. the host is defined by host configuration configuration file, not physical one. what do u mean by send message to the agent directly? we need to schedule.

edit flag offensive delete link more
0

answered 2013-06-07 00:44:34 -0500

kong gravatar image

Thanks yong sheng gong, that solved my question.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-06-05 08:39:59 -0500

Seen: 43 times

Last updated: Jun 07 '13