-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Birdwatcher returns empty array of routes #32
Comments
Hi Stavros, I guess you already figured it out, but it's most likely related to the additional
|
Hi Johannes, Yes the issue is still present. I don't think the problem is the double "/" because when I remove it I still get an empty array of routes: With double "/"[skon321@lg-glo-01 ~]$ curl http://103.247.138.73:29184//routes/protocol/103.247.139.24 Without double "/"[skon321@lg-glo-01 ~]$ curl http://103.247.138.73:29184/routes/protocol/103.247.139.24 But when checking the Route Server I can see that the 'protocol 103.247.139.24 has routes: Any idea why this happens on Bird 1.6.8 while works fine on Bird 2.0.7 ? |
Hi Stavros, could you please share the log output of birdwatcher for the query and also sniff the BIRD socket with Johannes |
Hi, it's most likely resulting from your use of dots in the protocol name. I did some testing and sniffed the socket:
Output from
Basically what happens is that birdwatcher performs an invalid query because the protocol name is not quoted/the dot is not escaped. This is not visible in the result as birdwatcher will return data (and logs the query with 200 OK) even though the query is incorrect (or the queried protocol does not exist). Comparison on CLI:
You could try the same with BIRD2 and see why it behaves differently. |
Hi Johannes, Indeed, your last comment was to the point. Birdwatcher has issue with special characters when is operating with Bird 1.6.8. After renaming one of my BGP peers from "200.0.20.1" to "amsixcw" I could successfully retrieve the prefixes. The issue does not exist when birdwatcher is combined with Bird 2.0+ (I can confirm this as well). Any workaround to solve this in the code? Maybe a quick patch or dirty hack? Otherwise we need to upgrade to Bird 2.0+ and this will take some time. Thank's again for the help. |
@annikahannig, we should quote all protocol names regardless of if they need quoting (e.g. when including special character like a dot) or not. This will prevent issues like this one. |
Good news, Stavros:
I need to test all affected endpoints and will create a PR soon. |
I did the fix locally on my laptop (per your advice) and rolled out in production a custom build of birdwatcher, it works !!! https://lg.ams-ix.net/routeservers/mum-rs1-v4 Will wait for the official fix and close the issue. |
Hi @stkonst, the fix is merged, could you please verify that the current version also works for you? |
Hi guys,
When running the URL to see the routes for a specific peer I don't receive anything from birdwatcher:
[email protected]:/root# curl http://103.247.138.73:29184//routes/protocol/103.247.139.24
Moved Permanently.
When checking the raw output in my browser I see nothing in the array:
{"api":{"Version":"2.0.0","result_from_cache":false,"cache_status":{"cached_at":{"date":"2020-12-25T15:43:33.356887066Z","timezone_type":"UTC","timezone":"UTC"}}},"cached_at":"2020-12-25T15:43:33.356887066Z","routes":[],"ttl":"2020-12-25T15:53:33.356887066Z"}
Do you know why this happens? We run Bird 1.6.8 and the latest version of birdwatcher (but same issue was happening in the previous version).
Thank's
Stavros
The text was updated successfully, but these errors were encountered: