Comment 7 for bug 1189909

Revision history for this message
guanxiaohua2k6 (guanxiaohua2k6) wrote :

In my environment, the problem occurred when I tried to start 20 instances in the same time with the following command.

nova boot --image IMAGE --num-instances 20 test

Some of the instances couldn't get dhcp IP address.

I found the following warning message in /var/log/quantum/server.log.

2013-07-04 18:25:41 WARNING [quantum.scheduler.dhcp_agent_scheduler] No active DHCP agents

And after checking the related code in file ocpcc1:/usr/lib/python2.6/site-packages/quantum/scheduler/dhcp_agent_scheduler.py

71 def is_agent_down(cls, heart_beat_time):
72 LOG.debug("now: %s, heart_beat_time: %s, agent_down_time: %d" % (str(timeutils.utcnow()), heart_beat_time, cfg.CONF.agent_down_time))
73 return timeutils.is_older_than(heart_beat_time,
74 cfg.CONF.agent_down_time)

The line 72 is what I inserted to debug.

After checking the output of line 72, I found the agent_down_time is too short. The default value is 5 seconds.

I added the agent_down_time to /etc/quantum/quantum.conf, and set it to 15 seconds, then all things worked fine.

Hope what I did can help you.