dhcp can not allocated IP correctly
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 ...
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?
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?
Sorry, I don't understand. I thought the problem was that the instances were not getting their IP from DHCP.
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?