Monday, July 7, 2014

OpenStack : Neutron : Agent information lookup

To list agents 

[openstack@novo ~(keystone_admin)]$ neutron agent-list
+--------------------------------------+--------------------+------+-------+----------------+
| id                                   | agent_type         | host | alive | admin_state_up |
+--------------------------------------+--------------------+------+-------+----------------+
| 3b256809-483d-4c0c-b6ad-b4a05bafa72d | DHCP agent         | novo | :-)   | True           |
| 3c73594b-b16c-41ba-bd43-7ce67dc69a82 | Open vSwitch agent | novo | :-)   | True           |
| 57f0ccf6-d7cd-4428-bbd7-7fb41176fd4b | L3 agent           | novo | :-)   | True           |
| ba532785-66f2-467c-acd9-40e9e806e8f8 | Metadata agent     | novo | :-)   | True           |
+--------------------------------------+--------------------+------+-------+----------------+

[openstack@novo ~(keystone_admin)]$ neutron agent-show 3b256809-483d-4c0c-b6ad-b4a05bafa72d
+---------------------+----------------------------------------------------------+
| Field               | Value                                                    |
+---------------------+----------------------------------------------------------+
| admin_state_up      | True                                                     |
| agent_type          | DHCP agent                                               |
| alive               | True                                                     |
| binary              | neutron-dhcp-agent                                       |
| configurations      | {                                                        |
|                     |      "subnets": 1,                                       |
|                     |      "use_namespaces": true,                             |
|                     |      "dhcp_lease_duration": 86400,                       |
|                     |      "dhcp_driver": "neutron.agent.linux.dhcp.Dnsmasq",  |
|                     |      "networks": 1,                                      |
|                     |      "ports": 5                                          |
|                     | }                                                        |
| created_at          | 2014-05-20 23:16:52                                      |
| description         |                                                          |
| heartbeat_timestamp | 2014-07-08 02:22:51                                      |
| host                | novo                                                     |
| id                  | 3b256809-483d-4c0c-b6ad-b4a05bafa72d                     |
| started_at          | 2014-07-08 01:03:19                                      |
| topic               | dhcp_agent                                               |
+---------------------+----------------------------------------------------------+


[openstack@novo ~(keystone_admin)]$ neutron agent-list
+--------------------------------------+--------------------+------+-------+----------------+
| id                                   | agent_type         | host | alive | admin_state_up |
+--------------------------------------+--------------------+------+-------+----------------+
| 3b256809-483d-4c0c-b6ad-b4a05bafa72d | DHCP agent         | novo | :-)   | True           |
| 3c73594b-b16c-41ba-bd43-7ce67dc69a82 | Open vSwitch agent | novo | :-)   | True           |
| 57f0ccf6-d7cd-4428-bbd7-7fb41176fd4b | L3 agent           | novo | :-)   | True           |
| ba532785-66f2-467c-acd9-40e9e806e8f8 | Metadata agent     | novo | :-)   | True           |
+--------------------------------------+--------------------+------+-------+----------------+

[openstack@novo ~(keystone_admin)]$ neutron agent-show 3c73594b-b16c-41ba-bd43-7ce67dc69a82
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| admin_state_up      | True                                 |
| agent_type          | Open vSwitch agent                   |
| alive               | True                                 |
| binary              | neutron-openvswitch-agent            |
| configurations      | {                                    |
|                     |      "tunnel_types": [],             |
|                     |      "tunneling_ip": "",             |
|                     |      "bridge_mappings": {},          |
|                     |      "l2_population": false,         |
|                     |      "devices": 5                    |
|                     | }                                    |
| created_at          | 2014-05-20 23:16:22                  |
| description         |                                      |
| heartbeat_timestamp | 2014-07-08 02:24:19                  |
| host                | novo                                 |
| id                  | 3c73594b-b16c-41ba-bd43-7ce67dc69a82 |
| started_at          | 2014-07-06 01:41:07                  |
| topic               | N/A                                  |
+---------------------+--------------------------------------+


[openstack@novo ~(keystone_admin)]$ neutron agent-list
+--------------------------------------+--------------------+------+-------+----------------+
| id                                   | agent_type         | host | alive | admin_state_up |
+--------------------------------------+--------------------+------+-------+----------------+
| 3b256809-483d-4c0c-b6ad-b4a05bafa72d | DHCP agent         | novo | :-)   | True           |
| 3c73594b-b16c-41ba-bd43-7ce67dc69a82 | Open vSwitch agent | novo | :-)   | True           |
| 57f0ccf6-d7cd-4428-bbd7-7fb41176fd4b | L3 agent           | novo | :-)   | True           |
| ba532785-66f2-467c-acd9-40e9e806e8f8 | Metadata agent     | novo | :-)   | True           |
+--------------------------------------+--------------------+------+-------+----------------+

[openstack@novo ~(keystone_admin)]$ neutron agent-show 57f0ccf6-d7cd-4428-bbd7-7fb41176fd4b
+---------------------+-------------------------------------------------------------------------------+
| Field               | Value                                                                         |
+---------------------+-------------------------------------------------------------------------------+
| admin_state_up      | True                                                                          |
| agent_type          | L3 agent                                                                      |
| alive               | True                                                                          |
| binary              | neutron-l3-agent                                                              |
| configurations      | {                                                                             |
|                     |      "router_id": "",                                                         |
|                     |      "gateway_external_network_id": "",                                       |
|                     |      "handle_internal_only_routers": true,                                    |
|                     |      "use_namespaces": true,                                                  |
|                     |      "routers": 1,                                                            |
|                     |      "interfaces": 1,                                                         |
|                     |      "floating_ips": 3,                                                       |
|                     |      "interface_driver": "neutron.agent.linux.interface.OVSInterfaceDriver",  |
|                     |      "ex_gw_ports": 1                                                         |
|                     | }                                                                             |
| created_at          | 2014-05-20 23:16:53                                                           |
| description         |                                                                               |
| heartbeat_timestamp | 2014-07-08 02:25:49                                                           |
| host                | novo                                                                          |
| id                  | 57f0ccf6-d7cd-4428-bbd7-7fb41176fd4b                                          |
| started_at          | 2014-07-08 01:03:19                                                           |
| topic               | l3_agent                                                                      |
+---------------------+-------------------------------------------------------------------------------+


[openstack@novo ~(keystone_admin)]$ neutron agent-list
+--------------------------------------+--------------------+------+-------+----------------+
| id                                   | agent_type         | host | alive | admin_state_up |
+--------------------------------------+--------------------+------+-------+----------------+
| 3b256809-483d-4c0c-b6ad-b4a05bafa72d | DHCP agent         | novo | :-)   | True           |
| 3c73594b-b16c-41ba-bd43-7ce67dc69a82 | Open vSwitch agent | novo | :-)   | True           |
| 57f0ccf6-d7cd-4428-bbd7-7fb41176fd4b | L3 agent           | novo | :-)   | True           |
| ba532785-66f2-467c-acd9-40e9e806e8f8 | Metadata agent     | novo | :-)   | True           |
+--------------------------------------+--------------------+------+-------+----------------+

[openstack@novo ~(keystone_admin)]$ neutron agent-show ba532785-66f2-467c-acd9-40e9e806e8f8
+---------------------+-----------------------------------------------------------------+
| Field               | Value                                                           |
+---------------------+-----------------------------------------------------------------+
| admin_state_up      | True                                                            |
| agent_type          | Metadata agent                                                  |
| alive               | True                                                            |
| binary              | neutron-metadata-agent                                          |
| configurations      | {                                                               |
|                     |      "nova_metadata_ip": "192.168.1.188",                       |
|                     |      "nova_metadata_port": 8775,                                |
|                     |      "metadata_proxy_socket": "/var/lib/neutron/metadata_proxy" |
|                     | }                                                               |
| created_at          | 2014-05-20 23:16:53                                             |
| description         |                                                                 |
| heartbeat_timestamp | 2014-07-08 02:27:22                                             |
| host                | novo                                                            |
| id                  | ba532785-66f2-467c-acd9-40e9e806e8f8                            |
| started_at          | 2014-07-08 01:03:19                                             |
| topic               | N/A                                                             |
+---------------------+-----------------------------------------------------------------+

To find out network of the current tenant 

[openstack@novo ~(keystone_admin)]$ neutron net-list
+--------------------------------------+---------+------------------------------------------------------+
| id                                   | name    | subnets                                              |
+--------------------------------------+---------+------------------------------------------------------+
| b66854a0-0bc0-4415-a8f3-7d70e2a40dba | private | 4de1afb9-ed1f-4c32-9bbb-20eec6073963 10.0.0.0/24     |
| e505e7e3-b2db-48f3-9967-9c3aa2b01e07 | public  | 96a64200-a1fb-40e8-b888-c16bbe70609a 172.24.4.224/28 |
+--------------------------------------+---------+------------------------------------------------------+

To check the DHCP agent of both networks

[openstack@novo ~(keystone_admin)]$ neutron dhcp-agent-list-hosting-net e505e7e3-b2db-48f3-9967-9c3aa2b01e07
+--------------------------------------+------+----------------+-------+
| id                                   | host | admin_state_up | alive |
+--------------------------------------+------+----------------+-------+
| 3b256809-483d-4c0c-b6ad-b4a05bafa72d | novo | True           | :-)   |
+--------------------------------------+------+----------------+-------+

[openstack@novo ~(keystone_admin)]$ neutron dhcp-agent-list-hosting-net b66854a0-0bc0-4415-a8f3-7d70e2a40dba
+--------------------------------------+------+----------------+-------+
| id                                   | host | admin_state_up | alive |
+--------------------------------------+------+----------------+-------+
| 3b256809-483d-4c0c-b6ad-b4a05bafa72d | novo | True           | :-)   |
+--------------------------------------+------+----------------+-------+

Both above output shows the same ID of DHCP agent

[openstack@novo ~(keystone_admin)]$ neutron agent-list
+--------------------------------------+--------------------+------+-------+----------------+
| id                                   | agent_type         | host | alive | admin_state_up |
+--------------------------------------+--------------------+------+-------+----------------+
3b256809-483d-4c0c-b6ad-b4a05bafa72d | DHCP agent         | novo | :-)   | True           |
| 3c73594b-b16c-41ba-bd43-7ce67dc69a82 | Open vSwitch agent | novo | :-)   | True           |
| 57f0ccf6-d7cd-4428-bbd7-7fb41176fd4b | L3 agent           | novo | :-)   | True           |
| ba532785-66f2-467c-acd9-40e9e806e8f8 | Metadata agent     | novo | :-)   | True           |
+--------------------------------------+--------------------+------+-------+----------------+


No comments:

Post a Comment