neutron-metadata-agent broken pipe

Albert Braden Albert.Braden at
Tue Dec 10 18:10:02 UTC 2019

It looks like we may be encountering this bug:

I'm testing this patch now.

From: Albert Braden
Sent: Monday, December 9, 2019 1:11 PM
To: openstack-discuss at
Subject: RE: neutron-metadata-agent broken pipe

>From my VM, if I try the metadata server repeatedly, it eventually gets a response:

albertb@<html><body><h1>503:~ $ curl
<html><body><h1>503 Service Unavailable</h1>
No server is available to handle this request.
albertb@<html><body><h1>503:~ $ curl
<html><body><h1>504 Gateway Time-out</h1>
The server didn't respond in time.
albertb@<html><body><h1>503:~ $ curl
i-000017ccalbertb@<html><body><h1>503:~ $

Then I see this in neutron-metadata-agent.log:

2019-12-09 12:41:55.213 266833 INFO eventlet.wsgi.server [-],<local> "GET /2009-04-04/meta-data/instance-id HTTP/1.1" status: 200  len: 146 time: 0.3922560

When it fails (503/504) nothing is logged by Neutron but I see haproxy logs:

Dec  9 13:06:14 us01odc-p02-ctrl3 haproxy-metadata-proxy-569e2c42-3935-48e9-ae41-074650e57b2b[267096]: [09/Dec/2019:13:06:14.475] listener listener/metadata 0/0/-1/-1/0 503 212 - - SC-- 58/58/57/57/3 0/0 "GET /2009-04-04/meta-data/instance-id HTTP/1.1"
Dec  9 13:06:59 us01odc-p02-ctrl3 haproxy-metadata-proxy-569e2c42-3935-48e9-ae41-074650e57b2b[267096]: [09/Dec/2019:13:06:27.067] listener listener/metadata 0/0/0/-1/32001 504 194 - - sH-- 90/90/89/89/0 0/0 "GET /2009-04-04/meta-data/instance-id HTTP/1.1"

The load on my controllers is around 15 but they have 48 CPU so 15 should be OK.

When I look at RMQ I see everything fine except for the q-plugin queue; it has 3 consumers but there are thousands of unacked messages and the number gradually increases. Could that be causing the neutron-metadata issue?

From: Albert Braden <Albert.Braden at<mailto:Albert.Braden at>>
Sent: Monday, December 9, 2019 12:20 PM
To: openstack-discuss at<mailto:openstack-discuss at>
Subject: RE: neutron-metadata-agent broken pipe

When I try to build a VM I see this in the VM logs:

2019-12-09 20:02:21,396 -[WARNING]: Calling '' failed [0/120s]: bad status code [503]
2019-12-09 20:03:41,084 -[WARNING]: Failed fetching userdata from url
2019-12-09 12:03:53,041 -[WARNING]: Failed running /var/lib/cloud/scripts/per-boot/ [1]
2019-12-09 12:03:53,043 -[WARNING]: Failed to run module scripts-per-boot (per-boot in /var/lib/cloud/scripts/per-boot)

This is the failing line from the script:

name=`curl -s`<>

When I try this from the VM I get this error:

albertb@<html><body><h1>503:~ $ curl -s
<html><body><h1>503 Service Unavailable</h1>
No server is available to handle this request.

When I check neutron-metadata-agent.log for the time when the VM was failing I see the "broken pipe" errors:

2019-12-09 11:56:00.075 664593 INFO eventlet.wsgi.server [-] Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eventlet/", line 521, in handle_one_response
  File "/usr/lib/python2.7/dist-packages/eventlet/", line 462, in write
  File "/usr/lib/python2.7/", line 307, in flush
  File "/usr/lib/python2.7/dist-packages/eventlet/greenio/", line 390, in sendall
    tail = self.send(data, flags)
  File "/usr/lib/python2.7/dist-packages/eventlet/greenio/", line 384, in send
    return self._send_loop(self.fd.send, data, flags)
  File "/usr/lib/python2.7/dist-packages/eventlet/greenio/", line 371, in _send_loop
    return send_method(data, *args)
error: [Errno 32] Broken pipe

Why is my neutron-metadata server failing? Has anyone else seen this problem? We are running Rocky with about 200 hypervisors; it started after we added 100.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the openstack-discuss mailing list