No DHCP agents available

asked 2017-07-19 07:28:12 -0500

anonymous user

Anonymous

updated 2017-07-21 06:16:10 -0500

Hi, I set up OpenStack Ocata on CentOS 7. When I try to create a new instance in dashboard, I get this error:

Failed to perform requested operation on instance "testv", the instance has an error status: Please try again later [Error: Build of instance b0a15c42-4b63-469a-9d5c-168eeebb9304 aborted: Unable to establish connection to http://Controller_IP:9696/v2.0/networks.json?id=c8dff4fa-ba7d-45b3-8c40-3cf927318b6d: HTTPConnectionPool(host='Controller_IP', port=9696): Max retries exceeded].

Controller (/var/log/neutron/server.log)

2017-07-19 08:33:25.889 2452 WARNING neutron.db.agentschedulers_db [req-5d249910-9e55-4107-be19-1c3c1b27ee4f - - - - -] No DHCP agents available, skipping rescheduling
2017-07-19 08:34:02.905 2452 WARNING neutron.db.agents_db [req-aa375d6c-dfb3-464c-8d81-c4595a9a1411 - - - - -] Agent healthcheck: found 3 dead agents out of 3:
                Type       Last heartbeat host
      Metadata agent  2017-07-12 08:08:29 localhost.localdomain
          DHCP agent  2017-07-12 08:08:27 localhost.localdomain
  Linux bridge agent  2017-07-12 08:08:33 localhost.localdomain
2017-07-19 08:34:02.926 2452 WARNING neutron.db.agentschedulers_db [req-5d249910-9e55-4107-be19-1c3c1b27ee4f - - - - -] No DHCP agents available, skipping rescheduling
2017-07-19 08:34:39.944 2452 WARNING neutron.db.agents_db [req-aa375d6c-dfb3-464c-8d81-c4595a9a1411 - - - - -] Agent healthcheck: found 3 dead agents out of 3:
                Type       Last heartbeat host
      Metadata agent  2017-07-12 08:08:29 localhost.localdomain
          DHCP agent  2017-07-12 08:08:27 localhost.localdomain
  Linux bridge agent  2017-07-12 08:08:33 localhost.localdomain
2017-07-19 08:34:39.974 2452 WARNING neutron.db.agentschedulers_db [req-5d249910-9e55-4107-be19-1c3c1b27ee4f - - - - -] No DHCP agents available, skipping rescheduling
2017-07-19 08:35:16.975 2452 WARNING neutron.db.agents_db [req-aa375d6c-dfb3-464c-8d81-c4595a9a1411 - - - - -] Agent healthcheck: found 3 dead agents out of 3:
                Type       Last heartbeat host
      Metadata agent  2017-07-12 08:08:29 localhost.localdomain
          DHCP agent  2017-07-12 08:08:27 localhost.localdomain
  Linux bridge agent  2017-07-12 08:08:33 localhost.localdomain
2017-07-19 08:35:17.005 2452 WARNING neutron.db.agentschedulers_db [req-5d249910-9e55-4107-be19-1c3c1b27ee4f - - - - -] No DHCP agents available, skipping rescheduling

Controller

[root@controller ~]# openstack network agent list

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

| ID                                   | Agent Type         | Host                  | Availability Zone | Alive | State | Binary                    |

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

| 0a7c60b5-1cae-4b8c-a8ea-374b39147391 | DHCP agent         | controller            | nova              | True  | UP    | neutron-dhcp-agent        |

| 67153a17-4680-47b1-8356-66e9000bc00c | Metadata agent     | localhost.localdomain | None              | False | UP    | neutron-metadata-agent    |

| 6944d727-8751-41e8-9595-8392299493e5 | DHCP agent         | localhost.localdomain | nova              | False | UP    | neutron-dhcp-agent        |

| 95bedfc6-f825-4a9f-af88-3a4a2721d226 | Linux bridge agent | controller            | None              | True  | UP    | neutron-linuxbridge-agent |

| bb98b13c-e9a8-4db2-8585-9288a47a0d29 | Metadata agent     | controller            | None              | True  | UP    | neutron-metadata-agent    |

| db4a01c0-f9eb-400f-b3fa-74228c2ba6d4 | Linux bridge agent | localhost.localdomain | None              | False | UP    | neutron-linuxbridge-agent |

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

Compute node (/var/log/neutron/linuxbridge-agent.log)


AttributeError: 'CommonAgentLoop' object has no attribute 'state_rpc'
Controller (Agents details)
[root@controller ~]# openstack network agent show 67153a17-4680-47b1-8356-66e9000bc00c
+-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field             | Value                                                                                                                                                           |
+-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
| admin_state_up    | UP                                                                                                                                                              |
| agent_type        | Metadata agent                                                                                                                                                  |
| alive             | False                                                                                                                                                           |
| availability_zone | None                                                                                                                                                            |
| binary            | neutron-metadata-agent                                                                                                                                          |
| configuration     | {u'log_agent_heartbeats': False, u'nova_metadata_port': 8775, u'nova_metadata_ip': u'controller', u'metadata_proxy_socket': u'/var/lib/neutron/metadata_proxy'} |
| created_at        | 2017-07-11 09:38:51                                                                                                                                             |
| description       | None                                                                                                                                                            |
| host              | localhost.localdomain                                                                                                                                           |
| id                | 67153a17-4680-47b1-8356-66e9000bc00c                                                                                                                            |
| last_heartbeat_at | 2017-07-12 08:08:29                                                                                                                                             |
| name              | None                                                                                                                                                            |
| started_at        | 2017-07-11 09:38:51                                                                                                                                             |
| topic             | N/A                                                                                                                                                             |
+-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
[root@controller ~]# openstack network agent show 6944d727-8751-41e8-9595-8392299493e5
+-------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field             | Value                                                                                                                                                                                          |
+-------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| admin_state_up    | UP                                                                                                                                                                                             |
| agent_type        | DHCP agent                                                                                                                                                                                     |
| alive             | False                                                                                                                                                                                          |
| availability_zone | nova                                                                                                                                                                                           |
| binary            | neutron-dhcp-agent                                                                                                                                                                             |
| configuration     | {u'notifies_port_ready': True, u'subnets': 1, u'dhcp_lease_duration': 86400, u'dhcp_driver': u'neutron.agent.linux.dhcp.Dnsmasq', u'networks': 1, u'log_agent_heartbeats': False, u'ports': 1} |
| created_at        | 2017-07-11 09:38:52                                                                                                                                                                            |
| description       | None                                                                                                                                                                                           |
| host              | localhost.localdomain                                                                                                                                                                          |
| id                | 6944d727-8751-41e8-9595-8392299493e5 ...
(more)
edit retag flag offensive close merge delete

Comments

The details aren't clear to me, but it's probably related to the fact that you call your controller localhost.localdomain instead of a real name or IP address.

Bernd Bausch gravatar imageBernd Bausch ( 2017-07-19 07:46:31 -0500 )edit

Which details you are interested in?

cloudadmin gravatar imagecloudadmin ( 2017-07-20 00:35:53 -0500 )edit

Why the agents are shown as up, but not alive.

Bernd Bausch gravatar imageBernd Bausch ( 2017-07-20 01:01:50 -0500 )edit

When I restart agents services, that services are up and alive except linux bridge agent on compute node. I will update the question.

cloudadmin gravatar imagecloudadmin ( 2017-07-21 03:35:56 -0500 )edit

I see 2 nodes, one named controller, the other localhost. Since both have the same agent set (DHCP, Metadata, Linuxbridge), they are probably the same node. My recommendation: Remove the "localhost" services with neutron agent-delete and check the logs on the compute node.

Bernd Bausch gravatar imageBernd Bausch ( 2017-07-21 10:22:11 -0500 )edit