Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I think I have found the solution:

root@network:/etc/neutron# neutron dhcp-agent-list-hosting-net demo-net +--------------------------------------+------------+----------------+-------+ | id | host | admin_state_up | alive | +--------------------------------------+------------+----------------+-------+ | 675c5d91-1250-4982-8ce4-b346443ba827 | controller | True | :-) | | d6e9c48b-b3e3-419d-8d3d-3fde3cb2cf5d | network | True | :-) | +--------------------------------------+------------+----------------+-------+


root@network:/etc/neutron# neutron net-list-on-dhcp-agent d6e9c48b-b3e3-419d-8d3d-3fde3cb2cf5d +--------------------------------------+-----------+-----------------------------------------------------+ | id | name | subnets | +--------------------------------------+-----------+-----------------------------------------------------+ | 064d9cc0-d760-45f0-88d5-a619b993ceea | demo-net | 617b58b0-a417-4ced-a99c-15f6561d4c86 192.168.1.0/24 | | 10ac84fa-2a2d-4f22-9f14-1e4296ff1de2 | zq-net | af2e059e-513c-4da7-85c3-d5037bf2e8da 192.168.3.0/24 | | 6b98c5f8-2bbf-4fbc-818c-6b73a825bbc2 | sigma-net | 68b23179-6bfe-4aae-af76-416813091fb4 192.168.2.0/24 | +--------------------------------------+-----------+--------------------------------------------


root@network:/etc/neutron# neutron agent-show d6e9c48b-b3e3-419d-8d3d-3fde3cb2cf5d +---------------------+----------------------------------------------------------+ | Field | Value | +---------------------+----------------------------------------------------------+ | admin_state_up | True | | agent_type | DHCP agent | | alive | True | | binary | neutron-dhcp-agent | | configurations | { | | | "subnets": 3, | | | "use_namespaces": true, | | | "dhcp_lease_duration": 86400, | | | "dhcp_driver": "neutron.agent.linux.dhcp.Dnsmasq", | | | "networks": 3, | | | "ports": 13 | | | } | | created_at | 2014-07-06 02:33:14 | | description | | | heartbeat_timestamp | 2014-09-15 09:23:51 | | host | network | | id | d6e9c48b-b3e3-419d-8d3d-3fde3cb2cf5d | | started_at | 2014-09-04 02:45:57 | | topic | dhcp_agent | +---------------------+----------------------------------------------------------+


root@network: root@network:/etc/neutron# neutron dhcp-agent-network-add d6e9c48b-b3e3-419d-8d3d-3fde3cb2cf5d mtt-net Added network mtt-net to DHCP agent root@network:/etc/neutron#


root@network:/etc/neutron# ip netns qdhcp-8a4ed74a-80fd-451b-9978-e7f6114342e8 qrouter-5d1bf816-0faf-41c9-93cf-f0d55fade535 qrouter-83f00a66-c05e-4d99-b61f-08bc4fdbd52a qrouter-bc4766c4-2e6a-47d9-920f-a8064d9dc992 qrouter-febfa164-1125-431d-a281-cd94eda3bdb6 qdhcp-6b98c5f8-2bbf-4fbc-818c-6b73a825bbc2 qdhcp-10ac84fa-2a2d-4f22-9f14-1e4296ff1de2 qdhcp-064d9cc0-d760-45f0-88d5-a619b993ceea root@network:

Why need to manually execute the command: neutron dhcp-agent-network-add d6e9c48b-b3e3-419d-8d3d-3fde3cb2cf5d mtt-net ????

Why can't create it automatically ? Thanks.

click to hide/show revision 2
No.2 Revision

I think I have found the solution:

root@network:/etc/neutron# neutron dhcp-agent-list-hosting-net demo-net
+--------------------------------------+------------+----------------+-------+
| id                                   | host       | admin_state_up | alive |
+--------------------------------------+------------+----------------+-------+
| 675c5d91-1250-4982-8ce4-b346443ba827 | controller | True           | :-)   |
| d6e9c48b-b3e3-419d-8d3d-3fde3cb2cf5d | network    | True           | :-)   |
+--------------------------------------+------------+----------------+-------+

+--------------------------------------+------------+----------------+-------+

root@network:/etc/neutron# neutron net-list-on-dhcp-agent d6e9c48b-b3e3-419d-8d3d-3fde3cb2cf5d
+--------------------------------------+-----------+-----------------------------------------------------+
| id                                   | name      | subnets                                             |
+--------------------------------------+-----------+-----------------------------------------------------+
| 064d9cc0-d760-45f0-88d5-a619b993ceea | demo-net  | 617b58b0-a417-4ced-a99c-15f6561d4c86 192.168.1.0/24 |
| 10ac84fa-2a2d-4f22-9f14-1e4296ff1de2 | zq-net    | af2e059e-513c-4da7-85c3-d5037bf2e8da 192.168.3.0/24 |
| 6b98c5f8-2bbf-4fbc-818c-6b73a825bbc2 | sigma-net | 68b23179-6bfe-4aae-af76-416813091fb4 192.168.2.0/24 |
+--------------------------------------+-----------+--------------------------------------------

+--------------------------------------+-----------+--------------------------------------------

root@network:/etc/neutron# neutron agent-show d6e9c48b-b3e3-419d-8d3d-3fde3cb2cf5d
+---------------------+----------------------------------------------------------+
| Field               | Value                                                    |
+---------------------+----------------------------------------------------------+
| admin_state_up      | True                                                     |
| agent_type          | DHCP agent                                               |
| alive               | True                                                     |
| binary              | neutron-dhcp-agent                                       |
| configurations      | {                                                        |
|                     |      "subnets": 3,                                       |
|                     |      "use_namespaces": true,                             |
|                     |      "dhcp_lease_duration": 86400,                       |
|                     |      "dhcp_driver": "neutron.agent.linux.dhcp.Dnsmasq",  |
|                     |      "networks": 3,                                      |
|                     |      "ports": 13                                         |
|                     | }                                                        |
| created_at          | 2014-07-06 02:33:14                                      |
| description         |                                                          |
| heartbeat_timestamp | 2014-09-15 09:23:51                                      |
| host                | network                                                  |
| id                  | d6e9c48b-b3e3-419d-8d3d-3fde3cb2cf5d                     |
| started_at          | 2014-09-04 02:45:57                                      |
| topic               | dhcp_agent                                               |
+---------------------+----------------------------------------------------------+

+---------------------+----------------------------------------------------------+

root@network:
root@network:/etc/neutron# neutron dhcp-agent-network-add d6e9c48b-b3e3-419d-8d3d-3fde3cb2cf5d mtt-net
Added network mtt-net to DHCP agent
root@network:/etc/neutron# 

root@network:/etc/neutron#

root@network:/etc/neutron# ip netns
qdhcp-8a4ed74a-80fd-451b-9978-e7f6114342e8
qrouter-5d1bf816-0faf-41c9-93cf-f0d55fade535
qrouter-83f00a66-c05e-4d99-b61f-08bc4fdbd52a
qrouter-bc4766c4-2e6a-47d9-920f-a8064d9dc992
qrouter-febfa164-1125-431d-a281-cd94eda3bdb6
qdhcp-6b98c5f8-2bbf-4fbc-818c-6b73a825bbc2
qdhcp-10ac84fa-2a2d-4f22-9f14-1e4296ff1de2
qdhcp-064d9cc0-d760-45f0-88d5-a619b993ceea
root@network:

root@network:

Why need to manually execute the command: neutron dhcp-agent-network-add d6e9c48b-b3e3-419d-8d3d-3fde3cb2cf5d mtt-net ????

Why can't create it automatically ? Thanks.