pierky / arouteserver

A tool to automatically build (and test) feature-rich configurations for BGP route servers.
https://arouteserver.readthedocs.org/
GNU General Public License v3.0
284 stars 46 forks source link

PeeringDB API calls for `clients-from-peeringdb` done without API key #139

Closed pierky closed 3 weeks ago

pierky commented 1 month ago

PeeringDB API calls made to handle the clients-from-peeringdb command are done without the API key:

GET /api/net?asn=xxx
GET /api/netixlan?ixlan_id=xxx
pierky commented 1 month ago

The clients-from-peeringdb command performs multiple PDB API calls sequentially to obtain ASNs' info. Users reported some errors related to 429s and an investigation on the PeeringDB side showed some logs where those API calls were made without any API key.

Even though I was not able to reproduce the issue (all the API calls were made with the proper API key) I introduce here this workaround to reduce the n. of calls made in one minute, to match the limit on the PeeringDB side.

pierky commented 1 month ago

I've just pushed out a new alpha release that contains this fix. If CI/CD will be happy, it will be available under the PyPi test instance in a few hours. It will be possible to install it by following the instructions at https://arouteserver.readthedocs.io/en/latest/INSTALLATION.html#development-and-pre-release-versions

If everything goes well, I plan to ship it as part of a new release in a few days.