Horizon shows that my instance gets IP address,but actually it does not!

asked 2017-01-12 07:28:50 -0600

AmirV gravatar image

updated 2017-01-14 02:33:35 -0600

I have a controller and two compute nodes. I configured a provider network with CIDR 10.0.0.0/24. The DHCP is working fine and my instances are getting IP address.

root@controller:/home/controller_admin/Desktop# openstack server list
+--------------------------------------+------+--------+---------------------+------------+
| ID                                   | Name | Status | Networks            | Image Name |
+--------------------------------------+------+--------+---------------------+------------+
| b2812f16-bb62-4b61-a379-6ac671376ff6 | vm0  | ACTIVE | provider=10.0.0.106 | cirros     |
+--------------------------------------+------+--------+---------------------+------------+

But when I run "ip a" command in cirros console, it states that my instance eth0 does not have IP address. What is the problem?

Also, this is the port list:

root@controller:/home/controller_admin/Desktop# neutron port-list
+--------------------------------------+------+-------------------+---------------------------------------------------------+
| id                                   | name | mac_address       | fixed_ips                                               |
+--------------------------------------+------+-------------------+---------------------------------------------------------+
| 22af11ca-ae1c-455d-b87d-ebaa82b68f19 |      | fa:16:3e:4a:cd:2d | {"subnet_id": "bf5712c5-a3cf-49f2-8565-71a2139eddd9",   |
|                                      |      |                   | "ip_address": "10.0.0.100"}                             |
| 938a10c1-63cf-41e9-9058-7d6c3b80015d |      | fa:16:3e:3e:74:6b | {"subnet_id": "bf5712c5-a3cf-49f2-8565-71a2139eddd9",   |
|                                      |      |                   | "ip_address": "10.0.0.107"}                             |
| 990c6689-67c8-41ef-a320-0e962a103440 |      | fa:16:3e:3a:8b:f0 | {"subnet_id": "bf5712c5-a3cf-49f2-8565-71a2139eddd9",   |
|                                      |      |                   | "ip_address": "10.0.0.106"}                             |
| cf3fd467-2b75-41c0-ad5e-5b5ca16c793b |      | fa:16:3e:c3:62:44 | {"subnet_id": "bf5712c5-a3cf-49f2-8565-71a2139eddd9",   |
|                                      |      |                   | "ip_address": "10.0.0.110"}                             |
+--------------------------------------+------+-------------------+---------------------------------------------------------+

10.0.0.100 is DHCP, 10.0.0.107 and 110 are compute nodes (I think), and 106 is the instance.

This is the instance log:

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 181.14
edit retag flag offensive close merge delete

Comments

The problem is that the instance does not get an IP address. neutron port-list doesn't list compute nodes. How do you know that DHCP is working? Is the DHCP agent running? Can you set an address manually in the instance's console and ping the router?

Bernd Bausch gravatar imageBernd Bausch ( 2017-01-12 08:11:43 -0600 )edit

The DHCP works because it's agent status is UP and also my VM gets a new IP everytime I start it. But this IP is only appears in Horizon and the openstack CLI that I mentioned above.

AmirV gravatar imageAmirV ( 2017-01-13 04:22:06 -0600 )edit

The IP your VM gets resides in the Neutron database, but the VM's DHCP requests are unanswered.

Since the DHCP agent is up, open the VM's console and set the address manually. If you have connectivity, troubleshoot DHCP. If not, troubleshoot Neutron at large.

Bernd Bausch gravatar imageBernd Bausch ( 2017-01-14 02:41:28 -0600 )edit

To troubleshoot, you need to understand the physical set up. The Networking Guide helps; if you use Openvswitch, see here; if Linuxbridge, here.

Bernd Bausch gravatar imageBernd Bausch ( 2017-01-14 02:44:12 -0600 )edit

Somehow the DHCP is now working fine. I can ping the controller from the instance. But, when I try to ping the instance from the controller:

root@controller:/# ping 10.0.0.108
PING 10.0.0.108 (10.0.0.108) 56(84) bytes of data.
From 78.38.92.99 icmp_seq=1 Time to live exceeded
AmirV gravatar imageAmirV ( 2017-01-14 04:27:00 -0600 )edit