Dhcp and metadata not working

asked 2015-09-14 10:44:06 -0600

Gonzo gravatar image

Hi All,

I have one basic configuration with the latest version (kilo) in Centos7 exactly like the config doc says with one node for compute and network and one compute node (node1) with gre network.

The problem I face is that when I create one instance with one tenant network, dhcp is not working and giving it the ip. If I launch one cirros image I always see this error:

Starting network...
udhcpc (v1.20.1) started
Sending discover...
Sending discover...
Sending discover...
Usage: /sbin/cirros-dhcpc <up|down>
No lease, failing
WARN: /etc/rc3.d/S40-network failed
cirros-ds 'net' up at 183.22
checking http://169.254.169.254/2009-04-04/instance-id
failed 1/20: up 183.26. request failed
failed 2/20: up 185.60. request failed
failed 3/20: up 187.62. request failed

These are my subnets:

# neutron subnet-list
+--------------------------------------+--------------+----------------+----------------------------------------------------+
| id                                   | name         | cidr           | allocation_pools                                   |
+--------------------------------------+--------------+----------------+----------------------------------------------------+
| 332d11b9-82f3-46c3-b5e5-965ef41c51dc | priv-subnet  | 10.200.10.0/24 | {"start": "10.200.10.2", "end": "10.200.10.254"}   |
| f2306e8e-d063-4fe0-a905-03f542f175f8 | local-subnet | 192.168.1.0/24 | {"start": "192.168.1.110", "end": "192.168.1.140"} |
+--------------------------------------+--------------+----------------+----------------------------------------------------+

# neutron subnet-show 332d11b9-82f3-46c3-b5e5-965ef41c51dc
+-------------------+--------------------------------------------------+
| Field             | Value                                            |
+-------------------+--------------------------------------------------+
| allocation_pools  | {"start": "10.200.10.2", "end": "10.200.10.254"} |
| cidr              | 10.200.10.0/24                                   |
| dns_nameservers   |                                                  |
| enable_dhcp       | True                                             |
| gateway_ip        | 10.200.10.1                                      |
| host_routes       |                                                  |
| id                | 332d11b9-82f3-46c3-b5e5-965ef41c51dc             |
| ip_version        | 4                                                |
| ipv6_address_mode |                                                  |
| ipv6_ra_mode      |                                                  |
| name              | priv-subnet                                      |
| network_id        | 25603794-1a5b-4131-aa69-2c9feeaa21a1             |
| subnetpool_id     |                                                  |
| tenant_id         | 9a3f25a506a14e36829f210531226d38                 |
+-------------------+--------------------------------------------------+

dnsmasq is running and all the neutron services like dhcp-agent are running. So what is the issue here?:

# ps aux | grep dnsmasq
nobody    4218  0.0  0.0  15524   772 ?        S    17:29   0:00 dnsmasq --no-hosts --no-resolv --strict-order --bind-interfaces --interface=tap5dd22be8-c6 --except-interface=lo --pid-file=/var/lib/neutron/dhcp/25603794-1a5b-4131-aa69-2c9feeaa21a1/pid --dhcp-hostsfile=/var/lib/neutron/dhcp/25603794-1a5b-4131-aa69-2c9feeaa21a1/host --addn-hosts=/var/lib/neutron/dhcp/25603794-1a5b-4131-aa69-2c9feeaa21a1/addn_hosts --dhcp-optsfile=/var/lib/neutron/dhcp/25603794-1a5b-4131-aa69-2c9feeaa21a1/opts --dhcp-leasefile=/var/lib/neutron/dhcp/25603794-1a5b-4131-aa69-2c9feeaa21a1/leases --dhcp-range=set:tag0,10.200.10.0,static,86400s --dhcp-lease-max=256 --conf-file=/etc/neutron/dnsmasq-neutron.conf --server=10.200.10.2 --server=192.168.1.17 --server=8.8.8.8 --domain=casadebertayguta.org
root      5667  0.0  0.0 112640   952 pts/0    S+   17:39   0:00 grep --color=auto dnsmasq

# neutron agent-list
+--------------------------------------+--------------------+------------+-------+----------------+---------------------------+
| id                                   | agent_type         | host       | alive | admin_state_up | binary                    |
+--------------------------------------+--------------------+------------+-------+----------------+---------------------------+
| 0739266e-0abc-4840-ba25-565c3130b26a | DHCP agent         | controller | :-)   | True           | neutron-dhcp-agent        |
| 7428183f-9182-45df-83bf-f1f94e2358a1 | Open vSwitch agent | node1      | :-)   | True           | neutron-openvswitch-agent |
| 9054e6f0-9fa0-4b7f-815a-3fe645319379 | Open vSwitch agent | controller | :-)   | True           | neutron-openvswitch-agent |
| a49e5db7-ef16-4051-b139-4e1cccee928a | L3 agent           | controller | :-)   | True           | neutron-l3-agent          |
| cee97d0e-0039-4d9b-abea-1f5c6fc21605 | Metadata agent     | controller | :-)   | True           | neutron-metadata-agent    |
+--------------------------------------+--------------------+------------+-------+----------------+---------------------------+

I have done one previous search here and I see more problems like this but no solutions... Any help will be much appreciated.

Thank you and regards,

edit retag flag offensive close merge delete

Comments

If you are not concerned about any HA configuration, I may suggest take a look at
http://bderzhavets.blogspot.com/2015/...
Puppet technologies significantly reduce head aches and time been wasted.

dbaxps gravatar imagedbaxps ( 2015-09-14 10:56:02 -0600 )edit

In particular case, I would activate dnsmasq logging on Network Node.

dbaxps gravatar imagedbaxps ( 2015-09-14 10:58:49 -0600 )edit

I appreciate you help, but I don't see hot the link you suggest could help to me to solve this issue. How could I activate dnmasq logs in network node?

Gonzo gravatar imageGonzo ( 2015-09-14 11:28:59 -0600 )edit

Add to dhcp_agent.ini line :-

dnsmasq_config_file = /etc/neutron/dnsmasq-neutron.conf

Add to /etc/neutron/dnsmasq-neutron.conf :

log-facility = /var/log/neutron/dnsmasq.log
log-dhcp
dbaxps gravatar imagedbaxps ( 2015-09-14 11:42:27 -0600 )edit

Link allows to avoid the issue doing things from scratch.

dbaxps gravatar imagedbaxps ( 2015-09-14 11:43:57 -0600 )edit