Horizon shows that my instance gets IP address,but actually it does not!
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
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?
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.
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.
To troubleshoot, you need to understand the physical set up. The Networking Guide helps; if you use Openvswitch, see here; if Linuxbridge, here.
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: