Skip to content

Robot libraries cause too much traffic in the network #121

@miczyg1

Description

@miczyg1

I noticed it when running test on VP46xx when cleaning up the test stands. I was getting inconsistent results when running BPS suite on the platforms, failing sometimes in the suite setup and sometimes in the middle of the tests. Sometimes tests passed sometimes not on multiple invocations of the suite with run.sh script. The cause was the timeout on the HTTP requests to sniepit. After a quick investigation it occurs that every robot library invocation from this repo causes the lib to call its __init__. The __init__ then needs to query snipeit for IPs, etc. In our test repository, there are may calls to the libraries, mainly for power management (these are the most frequent and common probably). Relevant logs:

Initializing library 'osfv.rf.rte_robot.RobotRTE' with arguments [ 192.168.10.244 | True ] failed: ReadTimeout: HTTPConnectionPool(host='192.168.4.202', port=80): Read timed out. (read timeout=10)
Traceback (most recent call last):
  File "/home/miczyg/Projects/Dasharo/open-source-firmware-validation/venv/lib/python3.13/site-packages/urllib3/connectionpool.py", line 537, in _make_request
    response = conn.getresponse()
  File "/home/miczyg/Projects/Dasharo/open-source-firmware-validation/venv/lib/python3.13/site-packages/urllib3/connection.py", line 466, in getresponse
    httplib_response = super().getresponse()
  File "/usr/lib64/python3.13/http/client.py", line 1430, in getresponse
    response.begin()
    ~~~~~~~~~~~~~~^^
  File "/usr/lib64/python3.13/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
                              ~~~~~~~~~~~~~~~~~^^
  File "/usr/lib64/python3.13/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
               ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
    [ Message content over the limit has been removed. ]
        timeout=10,
    )
  File "/home/miczyg/Projects/Dasharo/open-source-firmware-validation/venv/lib/python3.13/site-packages/requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
  File "/home/miczyg/Projects/Dasharo/open-source-firmware-validation/venv/lib/python3.13/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
           ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/miczyg/Projects/Dasharo/open-source-firmware-validation/venv/lib/python3.13/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/miczyg/Projects/Dasharo/open-source-firmware-validation/venv/lib/python3.13/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/home/miczyg/Projects/Dasharo/open-source-firmware-validation/venv/lib/python3.13/site-packages/requests/adapters.py", line 532, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='192.168.4.202', port=80): Read timed out. (read timeout=10)
Parent suite setup failed:
ReadTimeout: HTTPConnectionPool(host='192.168.4.202', port=80): Read timed out. (read timeout=10)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions