Ask Your Question
0

dhcp can not allocated IP correctly

asked 2013-08-26 04:37:26 -0500

MAIKA gravatar image

updated 2013-08-29 04:56:35 -0500

I have 3 nodes to deploy grizzly,one control, one network,and one compute. when i boot first vm,vm can not get IP from dhcp, and the server.log in control node shows:

2013-08-26 17:17:56 DEBUG [quantum.db.db_base_plugin_v2] Generated mac for network 70dfc0fc-a110-4606-8170-619e67a0fe3f is fa:16:3e:9e:b3:11

2013-08-26 17:17:56 DEBUG [quantum.db.db_base_plugin_v2] Allocated IP - 10.5.5.2 from 10.5.5.2 to 10.5.5.2

2013-08-26 17:17:56 DEBUG [quantum.db.db_base_plugin_v2] No more free IP's in slice. Deleting allocation pool.

2013-08-26 17:17:56 DEBUG [quantum.db.db_base_plugin_v2] Allocated IP 10.5.5.2 (70dfc0fc-a110-4606-8170-619e67a0fe3f/b3e21504-0fc8-41da-8147-f59b29edda13/e30779e7-340d-4156-ae00-2bc8b3e44ab2)

the dhcp-agent.log in network shows: dhcp had received the ip ,but not allocate it to vm.

but my allocate pool is from 10.5.5.2 to 10.5.5.254

well,when i boot the second vm, vm still can not get the IP,the server.log in control node shows:

2013-08-26 17:26:50 DEBUG [quantum.db.db_base_plugin_v2] Generated mac for network 70dfc0fc-a110-4606-8170-619e67a0fe3f is fa:16:3e:0d:33:47

2013-08-26 17:26:50 DEBUG [quantum.db.db_base_plugin_v2] Allocated IP - 10.5.5.4 from 10.5.5.4 to 10.5.5.254

2013-08-26 17:26:50 DEBUG [quantum.db.db_base_plugin_v2] Allocated IP 10.5.5.4 (70dfc0fc-a110-4606-8170-619e67a0fe3f/b3e21504-0fc8-41da-8147-f59b29edda13/20465392-0715-47f2-8a86-b253ba6e9da9)

at this time,the allocate pool is correct, but the dhcp-agent.log in network shows: dhcp had received the ip ,but not allocate it to vm.

i have struggle for the problem about three weeks, anyone help!! if need other info, plz let me know,thanks!!!!

Generated by iptables-save v1.4.12 on Thu Aug 29 09:25:34 2013

*nat :PREROUTING ACCEPT [52306:8455356] :INPUT ACCEPT [3003:230170] :OUTPUT ACCEPT [10327:644529] :POSTROUTING ACCEPT [10327:644529] :nova-api-OUTPUT - [0:0] :nova-api-POSTROUTING - [0:0] :nova-api-PREROUTING - [0:0] :nova-api-float-snat - [0:0] :nova-api-snat - [0:0] :nova-postrouting-bottom - [0:0] :quantum-openvswi-OUTPUT - [0:0] :quantum-openvswi-POSTROUTING - [0:0] :quantum-openvswi-PREROUTING - [0:0] :quantum-openvswi-float-snat - [0:0] :quantum-openvswi-snat - [0:0] :quantum-postrouting-bottom - [0:0] -A PREROUTING -j quantum-openvswi-PREROUTING -A PREROUTING -j nova-api-PREROUTING -A OUTPUT -j quantum-openvswi-OUTPUT -A OUTPUT -j nova-api-OUTPUT -A POSTROUTING -j quantum-openvswi-POSTROUTING -A POSTROUTING -j nova-api-POSTROUTING -A POSTROUTING -j nova-postrouting-bottom -A POSTROUTING -j quantum-postrouting-bottom -A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -j MASQUERADE -A nova-api-snat -j nova-api-float-snat -A nova-postrouting-bottom -j nova-api-snat -A quantum-openvswi-snat -j quantum-openvswi-float-snat -A quantum-postrouting-bottom -j quantum-openvswi-snat COMMIT

Completed on Thu Aug 29 09:25:34 2013

Generated by iptables-save v1.4.12 on Thu Aug 29 09:25:34 2013

*mangle :PREROUTING ACCEPT [4994049:2362742808] :INPUT ACCEPT [4539724:2280734245] :FORWARD ACCEPT [1740:307696] :OUTPUT ACCEPT [5805739:3518564924] :POSTROUTING ACCEPT [5806433:3518658100] :nova-api-POSTROUTING - [0:0] -A POSTROUTING -j nova-api-POSTROUTING -A POSTROUTING -o virbr0 ... (more)

edit retag flag offensive close merge delete

Comments

I'm not sure IP allocation is the cause of your DHCP problem. Check /var/lib/quantum/dhcp/70dfc0fc-a110-4606-8170-619e67a0fe3f/host on the network node. Are the macs and ips are in it?

darragh-oreilly gravatar imagedarragh-oreilly ( 2013-08-28 14:57:58 -0500 )edit

thanks for reply. well, some other problems happen. in my compute node, i execute: curl http://169.254.169.254/openstack. and get: curl: (7) Failed connect to 169.254.169.254:80; Connection refused then, execute: curl http://192.168.100.1, i can get some info(192.168.100.1 is control node, which runs nova-api) i check the apache log in control node, for the first sutiation, the log shows info, for the second one, it show nothing, it seems that sth. wrong with my iptables?

MAIKA gravatar imageMAIKA ( 2013-08-28 20:35:24 -0500 )edit

Sorry, I don't understand. I thought the problem was that the instances were not getting their IP from DHCP.

darragh-oreilly gravatar imagedarragh-oreilly ( 2013-08-29 03:37:37 -0500 )edit

ok,for short.on compute node,when i execute: curl http://169.254.169.254/openstack. the response show 404,it may means the request goes from instance to 169.254.169.254 cann't be NAT to my control node,maybe sth. wrong with my iptables, i have show my iptables,could u have a look and give me some advises?

MAIKA gravatar imageMAIKA ( 2013-08-29 04:55:37 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-05-03 06:48:07 -0500

CloudIsMyLife gravatar image

Could you please check from the dashboard the available networks and the check the range of IP's you have provided for allocating it to the machines.

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-08-26 04:37:26 -0500

Seen: 287 times

Last updated: May 03 '16