You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.
The queries are sent from the Hyperglass (installed in a Docker Container) encrypted to the hyperglass agent installed on a BIRD router / Ubuntu Linux 18.04 (Bionic Beaver). The connection between hyperglass and hyperglass-agent is established and working (ping and traceroute are working).
After a bit of reading code, I think I found the error in nos_utils/bird.py
Assuming the bird output generated with birdc "show route all where 8.8.8.0/24 ~ net like the following, the parse_bird_output() in bird.py mentioned above returns an empty newline.
BIRD data:
BIRD 1.6.3 ready.
0.0.0.0/0 via 1.2.3.4 on wan [router01 00:00:00 from 1.2.3.4] * (100/?) [i]
Type: BGP unicast univ
BGP.origin: IGP
BGP.as_path:
BGP.next_hop: 1.2.3.4
BGP.local_pref: 100
via 1.2.3.4 on wan [router02 00:00:00 from 1.2.3.4] (100/?) [i]
Type: BGP unicast univ
BGP.origin: IGP
BGP.as_path:
BGP.next_hop: 1.2.3.4
BGP.local_pref: 100
Local test script:
Tested the parse_bird_output() locally, with the following:
#!/usr/bin/env python3data: str="""BIRD 1.6.3 ready.0.0.0.0/0 via 1.2.3.4 on wan [router01 00:00:00 from 1.2.3.4] * (100/?) [i] Type: BGP unicast univ BGP.origin: IGP BGP.as_path: BGP.next_hop: 1.2.3.4 BGP.local_pref: 100 via 1.2.3.4 on wan [router02 00:00:00 from 1.2.3.4] (100/?) [i] Type: BGP unicast univ BGP.origin: IGP BGP.as_path: BGP.next_hop: 1.2.3.4 BGP.local_pref: 100"""defparse_bird_output(raw):
"""Parse raw BIRD output and return parsed output. Arguments: raw {str} -- Raw BIRD output query_data {object} -- Validated query object not_found {str} -- Lookup not found message template Returns: str -- Parsed output """defremove_ready(lines):
forlineinlines:
ifnotre.match(r".*(BIRD \d+\.\d+\.?\d* ready\.).*", line):
yieldline.strip()
raw_split=re.split(r"(Table)", raw.strip())
ifnotraw_split:
lines='Not found !'else:
lines=raw_splitoutput="\n".join(remove_ready(lines))
returnoutputprint(*parse_bird_output(data))
Starting in hyperglass v1.0.0-beta.76, I've started deprecating hyperglass-agent. Moving forward, FRR & BIRD can be interacted with in the same manner as any other device, i.e. via SSH. See here for details/caveats). Everything will still work as-is for now, but I'd encourage you to try moving to frr_ssh/bird_ssh as the nos (and of course, let me know of any problems via a new hyperglass issue).
In the course of today's hyperglass installation, the following error occurred when querying any BGP route of the BIRD router:
The query completed, but no results were found.
System environment
Hyperglass operating system: Docker container with alpine Linux Version 3.9
Hyperglass version: 1.0.0b64
Hyperglass python version: 3.6.12
Hyperglass-agent operating system: Ubuntu Linux 18.04 (Bionic Beaver)
Hyperglass-agent version: 0.1.6
Hyperglass-agent python version: 3.6.12
BIRD Version: 1.6.3
Setup
The queries are sent from the Hyperglass (installed in a Docker Container) encrypted to the hyperglass agent installed on a BIRD router / Ubuntu Linux 18.04 (Bionic Beaver). The connection between hyperglass and hyperglass-agent is established and working (ping and traceroute are working).
After a bit of reading code, I think I found the error in nos_utils/bird.py
Assuming the bird output generated with
birdc "show route all where 8.8.8.0/24 ~ net
like the following, the parse_bird_output() in bird.py mentioned above returns an empty newline.BIRD data:
Local test script:
Tested the parse_bird_output() locally, with the following:
Log output:
The text was updated successfully, but these errors were encountered: