Tests like neutron.tests.fullstack.test_agent_bandwidth_report.TestPlacementBandwidthReport.test_configurations_are_synced_towards_placement(NIC Switch agent) are failing from time to time due to problem with connection from neutron-server to the fake placement service.
Example of such error https://storage.bhs.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_f66/703143/3/check/neutron-fullstack/f667c93/testr_results.html
Error in neutron-server:
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client [req-29a0f974-e549-4784-924e-0ee82cc8c910 - - - - -] Connection Error appeared: requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=8081): Max retries exceeded with url: /placement/resource_providers?name=ubuntu-bionic-ovh-bhs1-0014319701 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fc0d34cb5c0>: Failed to establish a new connection: [Errno 111] ECONNREFUSED',))
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client Traceback (most recent call last):
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client File "/home/zuul/src/opendev.org/openstack/neutron/.tox/dsvm-fullstack/lib/python3.6/site-packages/urllib3/connection.py", line 157, in _new_conn
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client (self._dns_host, self.port), self.timeout, **extra_kw
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client File "/home/zuul/src/opendev.org/openstack/neutron/.tox/dsvm-fullstack/lib/python3.6/site-packages/urllib3/util/connection.py", line 84, in create_connection
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client raise err
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client File "/home/zuul/src/opendev.org/openstack/neutron/.tox/dsvm-fullstack/lib/python3.6/site-packages/urllib3/util/connection.py", line 74, in create_connection
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client sock.connect(sa)
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client File "/home/zuul/src/opendev.org/openstack/neutron/.tox/dsvm-fullstack/lib/python3.6/site-packages/eventlet/greenio/base.py", line 267, in connect
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client socket_checkerr(fd)
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client File "/home/zuul/src/opendev.org/openstack/neutron/.tox/dsvm-fullstack/lib/python3.6/site-packages/eventlet/greenio/base.py", line 51, in socket_checkerr
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client raise socket.error(err, errno.errorcode[err])
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client ConnectionRefusedError: [Errno 111] ECONNREFUSED
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client During handling of the above exception, another exception occurred:
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client Traceback (most recent call last):
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client File "/home/zuul/src/opendev.org/openstack/neutron/.tox/dsvm-fullstack/lib/python3.6/site-packages/urllib3/connectionpool.py", line 672, in urlopen
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client chunked=chunked,
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client File "/home/zuul/src/opendev.org/openstack/neutron/.tox/dsvm-fullstack/lib/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client conn.request(method, url, **httplib_request_kw)
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client File "/usr/lib/python3.6/http/client.py", line 1254, in request
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client self._send_request(method, url, body, headers, encode_chunked)
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client File "/usr/lib/python3.6/http/client.py", line 1300, in _send_request
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client self.endheaders(body, encode_chunked=encode_chunked)
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client File "/usr/lib/python3.6/http/client.py", line 1249, in endheaders
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client self._send_output(message_body, encode_chunked=encode_chunked)
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client File "/usr/lib/python3.6/http/client.py", line 1036, in _send_output
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client self.send(msg)
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client File "/usr/lib/python3.6/http/client.py", line 974, in send
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client self.connect()
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client File "/home/zuul/src/opendev.org/openstack/neutron/.tox/dsvm-fullstack/lib/python3.6/site-packages/urllib3/connection.py", line 184, in connect
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client conn = self._new_conn()
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client File "/home/zuul/src/opendev.org/openstack/neutron/.tox/dsvm-fullstack/lib/python3.6/site-packages/urllib3/connection.py", line 169, in _new_conn
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client self, "Failed to establish a new connection: %s" % e
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7fc0d34cb5c0>: Failed to establish a new connection: [Errno 111] ECONNREFUSED
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client During handling of the above exception, another exception occurred:
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client Traceback (most recent call last):
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client File "/home/zuul/src/opendev.org/openstack/neutron/.tox/dsvm-fullstack/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client timeout=timeout
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client File "/home/zuul/src/opendev.org/openstack/neutron/.tox/dsvm-fullstack/lib/python3.6/site-packages/urllib3/connectionpool.py", line 720, in urlopen
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client File "/home/zuul/src/opendev.org/openstack/neutron/.tox/dsvm-fullstack/lib/python3.6/site-packages/urllib3/util/retry.py", line 436, in increment
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client raise MaxRetryError(_pool, url, error or ResponseError(cause))
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=8081): Max retries exceeded with url: /placement/resource_providers?name=ubuntu-bionic-ovh-bhs1-0014319701 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fc0d34cb5c0>: Failed to establish a new connection: [Errno 111] ECONNREFUSED',))
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client During handling of the above exception, another exception occurred:
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client Traceback (most recent call last):
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client File "/home/zuul/src/opendev.org/openstack/neutron/.tox/dsvm-fullstack/lib/python3.6/site-packages/neutron_lib/placement/client.py", line 114, in request
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client **kwargs)
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client File "/home/zuul/src/opendev.org/openstack/neutron/.tox/dsvm-fullstack/lib/python3.6/site-packages/requests/api.py", line 60, in request
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client return session.request(method=method, url=url, **kwargs)
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client File "/home/zuul/src/opendev.org/openstack/neutron/.tox/dsvm-fullstack/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client resp = self.send(prep, **send_kwargs)
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client File "/home/zuul/src/opendev.org/openstack/neutron/.tox/dsvm-fullstack/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client r = adapter.send(request, **kwargs)
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client File "/home/zuul/src/opendev.org/openstack/neutron/.tox/dsvm-fullstack/lib/python3.6/site-packages/requests/adapters.py", line 516, in send
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client raise ConnectionError(e, request=request)
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=8081): Max retries exceeded with url: /placement/resource_providers?name=ubuntu-bionic-ovh-bhs1-0014319701 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fc0d34cb5c0>: Failed to establish a new connection: [Errno 111] ECONNREFUSED',))
2020-02-04 12:09:41.164 29846 ERROR neutron_lib.placement.client
The good news is that the extra logs are now visible.
I checked the fake placement client logs: storage. bhs.cloud. ovh.net/ v1/AUTH_ dcaab5e32b234d5 6b626f72581e364 4c/zuul_ opendev_ logs_f66/ 703143/ 3/check/ neutron- fullstack/ f667c93/ controller/ logs/dsvm- fullstack- logs/TestPlacem entBandwidthRep ort.test_ configurations_ are_synced_ towards_ placement_ NIC-Switch- agent_/ placement- -2020-02- 04--12- 09-21-528383_ log.txt providers_ inventories: {"resource_ provider_ generation" : 1, "inventories": {"NET_BW_ EGR_KILOBIT_ PER_SEC" : {"allocation_ ratio": 1.0, "min_unit": 1, "step_size": 1, "reserved": 0, "total": 1000}, "NET_BW_ IGR_KILOBIT_ PER_SEC" : {"allocation_ ratio": 1.0, "min_unit": 1, "step_size": 1, "reserved": 0, "total": 1000}}} wsgi_app /home/zuul/ src/opendev. org/openstack/ neutron/ neutron/ tests/fullstack /servers/ placement. py:130
http://
.
.
.
2020-02-04 12:09:37.629 29984 DEBUG __main__ [-] Response from put_resource_
and the restart came here.
The new service logs: providers_ inventories: {"resource_ provider_ generation" : 1, "inventories": {"NET_BW_ EGR_KILOBIT_ PER_SEC" : {"allocation_ ratio": 1.0, "min_unit": 1, "step_size": 1, "reserved": 0, "total": 1000}, "NET_BW_ IGR_KILOBIT_ PER_SEC" : {"allocation_ ratio": 1.0, "min_unit": 1, "step_size": 1, "reserved": 0, "total": 1000}}} wsgi_app /home/zuul/ src/opendev. org/openstack/ neutron/ neutron/ tests/fullstack /servers/ placement. py:130
2020-02-04 12:09:37.629 29984 DEBUG __main__ [-] Response from put_resource_
2020-02-04 12:10:04.582 30833 INFO neutron. common. config [-] Logging enabled! common. config [-] /home/zuul/ src/opendev. org/openstack/ neutron/ neutron/ tests/fullstack /servers/ placement. py version 15.1.0.dev432 common. config [-] command line: /home/zuul/ src/opendev. org/openstack/ neutron/ neutron/ tests/fullstack /servers/ placement. py --log-dir /opt/stack/ logs/dsvm- fullstack- logs/TestPlacem entBandwidthRep ort.test_ configurations_ are_synced_ towards_ placement_ NIC-Switch- agent_ --log-file placement- -2020-02- 04--12- 10-01-611315. log --config-file /tmp/tmpokrmznn l/tmpjh5gv_ ss/placement. ini setup_logging /home/zuul/ src/opendev. org/openstack/ neutron/ neutron/ common/ config. py:111
2020-02-04 12:10:04.582 30833 INFO neutron.
2020-02-04 12:10:04.583 30833 DEBUG neutron.
2020-02-04 12:10:04.586 30833 INFO __main__ [-] Placement fixture started on port: 8081
And that's all. Seemingly it started, it's waiting for requests.
I check if there should be something weird.