VM doesn't get IP

asked 2016-10-12 00:21:17 -0500

Steve Jobs gravatar image

Hi, I've deplyoed openstack KILO in three VMs.

controller Node : eth0: 192.168.122.74
compute Node    : eth0: 192.168.122.168  eth1: 10.0.1.31
network Node    : eth0: 192.168.122.126  eth1: 10.0.1.21

I followed all the steps with successful result as per : http://docs.openstack.org/kilo/install-guide/install/apt/content/ch_basic_environment.html (http://docs.openstack.org/kilo/instal...)

I'm having an issue that the created VM does not having any IP and not able to ping it's tenant router gateway also. Ping to external router works from external network.

By looking at the services everything looks fine, but saw some strange ERRORS in logs.

root@controller:/home/user# nova service-list
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary           | Host       | Zone     | Status  | State | Updated_at                 | Disabled Reason |
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+
| 1  | nova-cert        | controller | internal | enabled | up    | 2016-10-12T05:11:51.000000 | -               |
| 2  | nova-consoleauth | controller | internal | enabled | up    | 2016-10-12T05:11:51.000000 | -               |
| 3  | nova-scheduler   | controller | internal | enabled | up    | 2016-10-12T05:11:51.000000 | -               |
| 4  | nova-conductor   | controller | internal | enabled | up    | 2016-10-12T05:11:52.000000 | -               |
| 6  | nova-compute     | compute    | nova     | enabled | up    | 2016-10-12T05:11:53.000000 | -               |
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+
root@controller:/home/user# neutron agent-list
+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+
| id                                   | agent_type         | host    | alive | admin_state_up | binary                    |
+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+
| 1819bade-aa9b-4465-a0f3-ce0b233f6334 | Open vSwitch agent | network | :-)   | True           | neutron-openvswitch-agent |
| 2e3489df-3ec7-426e-97db-3d8b62a8d59a | Metadata agent     | network | :-)   | True           | neutron-metadata-agent    |
| 74fad5b9-ae8d-48eb-abb5-9eac20b94b81 | DHCP agent         | network | :-)   | True           | neutron-dhcp-agent        |
| e408958f-fefa-42c1-86fa-1744eedc7b63 | L3 agent           | network | :-)   | True           | neutron-l3-agent          |
| f77f3c24-13c1-4a57-9ef3-45e1241d461e | Open vSwitch agent | compute | :-)   | True           | neutron-openvswitch-agent |
+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+
root@controller:/home/user# nova net-list
+--------------------------------------+----------+------+
| ID                                   | Label    | CIDR |
+--------------------------------------+----------+------+
| acf69c60-c09e-4144-93bf-737ac3f5490e | ext-net  | None |
| fdf1c821-4c10-4ac8-832c-58e9ccc9dbbc | demo-net | None |
+--------------------------------------+----------+------+
root@controller:/home/user# neutron net-list
+--------------------------------------+----------+-----------------------------------------------------+
| id                                   | name     | subnets                                             |
+--------------------------------------+----------+-----------------------------------------------------+
| acf69c60-c09e-4144-93bf-737ac3f5490e | ext-net  | 0e08c02e-019f-4073-9e93-dcdfb3004ed0 200.1.0.0/24   |
| fdf1c821-4c10-4ac8-832c-58e9ccc9dbbc | demo-net | 7481c98d-8f9c-4639-8fe8-8c4b939b4b31 199.166.1.0/24 |
+--------------------------------------+----------+-----------------------------------------------------+

root@controller:/home/user# nova list
+--------------------------------------+----------------+---------+------------+-------------+----------------------+
| ID                                   | Name           | Status  | Task State | Power State | Networks             |
+--------------------------------------+----------------+---------+------------+-------------+----------------------+
| 4d3f9b45-a1a7-41c2-a19f-1166f4479b5c | demo-instance1 | ACTIVE  | -          | Running  | demo-net=199.166.1.4 |
+--------------------------------------+----------------+---------+------------+-------------+----------------------+

Status of the port connected to VM is DOWN...!!!

root@controller:/home/user# neutron port-list
+--------------------------------------+------+-------------------+------------------------------------------------------------------------------------+
| id                                   | name | mac_address       | fixed_ips                                                                          |
+--------------------------------------+------+-------------------+------------------------------------------------------------------------------------+
| c2f921e2-c161-4d61-91a9-0d31f92199f2 |      | fa:16:3e:c2:46:a5 | {"subnet_id": "7481c98d-8f9c-4639-8fe8-8c4b939b4b31", "ip_address": "199.166.1.4"} |
| c91c2d5a-37c1-484f-95d8-0841f3af294b |      | fa:16:3e:b3:f2:29 | {"subnet_id": "7481c98d-8f9c-4639-8fe8-8c4b939b4b31", "ip_address": "199.166.1.2"} |
| d95e83ff-c72e-422c-8bff-6b5fd18b4eec |      | fa:16:3e:cf:34:6a | {"subnet_id": "7481c98d-8f9c-4639-8fe8-8c4b939b4b31", "ip_address": "199.166.1.1"} |
+--------------------------------------+------+-------------------+------------------------------------------------------------------------------------+
root@controller:/home/user# neutron port-show c2f921e2-c161-4d61-91a9-0d31f92199f2
+-----------------------+------------------------------------------------------------------------------------+
| Field                 | Value                                                                              |
+-----------------------+------------------------------------------------------------------------------------+
| admin_state_up        | True                                                                               |
| allowed_address_pairs |                                                                                    |
| binding:vnic_type     | normal                                                                             |
| device_id             | 4d3f9b45-a1a7-41c2-a19f-1166f4479b5c                                               |
| device_owner          | compute:None                                                                       |
| extra_dhcp_opts       |                                                                                    |
| fixed_ips             | {"subnet_id": "7481c98d-8f9c-4639-8fe8-8c4b939b4b31", "ip_address": "199.166.1.4"} |
| id                    | c2f921e2-c161-4d61-91a9-0d31f92199f2                                               |
| mac_address           | fa:16:3e:c2:46:a5                                                                  |
| name                  |                                                                                    |
| network_id            | fdf1c821-4c10-4ac8-832c-58e9ccc9dbbc                                               |
| security_groups       | f41b1c39-221d-445d-875e-b42d690cb10d                                               |
| status                | DOWN                                                                               |
| tenant_id             | 69b9811f8f1e4ff39acb411408a0c637                                                   |
+-----------------------+------------------------------------------------------------------------------------+

ERRORS from logs for different nodes.

    ==============================Controller Node========================================

    /var/log/nova/nova-scheduler.log:231:2016-10-11 14:42:31.411 4240 ERROR oslo_messaging._drivers.impl_rabbit [-] Failed to consume message from queue: 
    /var/log/nova/nova-consoleauth.log:105:2016-10-11 14:42:30.864 4185 ERROR oslo_messaging._drivers.impl_rabbit [-] Failed to consume message from queue: 
    /var/log/nova/nova-cert.log:22:2016-10-11 14:42:29.864 4164 ERROR oslo_messaging._drivers.impl_rabbit [-] Failed to consume message from queue: 
    /var/log/upstart/nova-scheduler.log:234:2016-10-11 14:42:31.411 4240 ERROR oslo_messaging._drivers.impl_rabbit [-] Failed to consume message from queue: 
    /var/log/upstart/nova-consoleauth.log:108:2016-10-11 14:42 ...
(more)
edit retag flag offensive close merge delete

Comments

Looks like you are having issue with Rabbitmq. Make sure, your rabbitmq is up and running and all the nodes are able to communicate with it.

Bipin gravatar imageBipin ( 2016-10-12 00:46:24 -0500 )edit

As per http://docs.openstack.org/kilo/install-guide/install/apt/content I've installed Rabbitmq on Controller only, and yes it is running there.

Steve Jobs gravatar imageSteve Jobs ( 2016-10-12 02:10:04 -0500 )edit

$ netstat|grep amqp

tcp6       0      0 controller:amqp         controller:38714        ESTABLISHED
tcp6       0      0 controller:amqp         network:37350           ESTABLISHED
tcp6       0      0 controller:amqp         compute:35991           ESTABLISHED

and some more

Steve Jobs gravatar imageSteve Jobs ( 2016-10-12 02:11:43 -0500 )edit

but when you start / restart services on compute and network nodes you have got errors when they try to connect to rabbitmq?

amedeo-salvati gravatar imageamedeo-salvati ( 2016-10-12 04:50:00 -0500 )edit

try to restart the rabbitmq services. Also get inside the network namespace for the NW and try to ping the VM from inside the namespace.take a tcpdump on the interface on which dns-masq is running and see if DHCP packets are landing here or not

DarkKnight gravatar imageDarkKnight ( 2016-10-12 06:29:26 -0500 )edit