Skip to content
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

Juniper structured throwing error #273

Open
astlaurent opened this issue Jul 12, 2024 · 2 comments
Open

Juniper structured throwing error #273

astlaurent opened this issue Jul 12, 2024 · 2 comments
Assignees
Labels
possible-bug Something isn't working

Comments

@astlaurent
Copy link

astlaurent commented Jul 12, 2024

Deployment Type

Docker

Version

v2.0.4

Steps to Reproduce

When using structured on Juniper for show bgp route I am getting back

rt, 0, rt_entry, 0, peerAs

When I set structured to false it works fine. (log attached)

Also I noticed that if I set structured as false I see 2 versions of BGP route in the drop down, one does the non xml command, one does the xml command. I assume that is a bug of some sort (image attached of that)

debug.txt

image

Expected Behavior

router to produce expected results

Observed Behavior

router did not product expected results

Configuration

org_name: redacted
plugins: []
primary_asn: redacted
request_timeout: 15
site_description: redacted Looking Glass
site_title: redacted Looking Glass

web:
    location_display_mode: dropdown
    text:
        title_mode: logo_only
    logo:
         light: /etc/hyperglass/static/custom/light.png
         dark: /etc/hyperglass/static/custom/dark.png
         favicon: /etc/hyperglass/static/custom/fav.png
         width: 50%
         height: null
    theme:
         default_color_mode: dark

structured:
    rpki:
        mode: external

Devices

- name: Router
    group: North Central
    address: x.x.1.100
    credential: *credential1
    platform: juniper_junos
    attrs: *attr1
    directives:
        - builtins: [bgp_route, traceroute, ping]

Logs

attached
@astlaurent astlaurent added the possible-bug Something isn't working label Jul 12, 2024
@astlaurent
Copy link
Author

looked into this error a bit more. It seems like on my Juniper installs the active route does not display the parameters for peer-as and local-as. It does show them for all the other inactive routes though. not sure what the fix would bee though. I am am not sure if this has to do with the fact we are using reflectors or if the the issue has to do with certain juniper code versions missing those parameters

@astlaurent
Copy link
Author

Worked on this a bit tonight and did a workaround for now and it seems to work properly

edited the juniper parser within the docker container
-vi /opt/hyperglass/hyperglass/parsing/juniper.py
-change the following lines to look like the following
peer_as: int = 0
source_as: int = OUR AS NUMBER
-type in exit
-Get docker container ID
sudo docker ps -a
copy container ID for hyperglass-hyperglass
-commit docker changes
sudo docker commit hyperglass-hyperglass
-restart service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
possible-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants