Skip to content

ping query type broken in 1.0.0-beta.59 on Junos 19.4R1-S2.2 #90

Description

@bastelfreak

Hi, since I upgraded to 1.0.0-beta.59, I cannot run the ping query type anymore.

Bug Description

I start a ping query type to an ip that's reachable from a JunOS virtual MX. hyperglass now displays Something went wrong.

Expected behavior

I expect that a ping works

Steps to Reproduce

  • Setup latest hyperglass
  • Download junos VM image
  • configure junos with a default route
  • tell hyperglass to ping any ip on the VMX

Local Configurations

I didn't configure anything in the commands.yml. Section from the devices.yaml:

---
routers:
- name: ***
  address: ***
  network:
    name: primary
    display_name: ***
  credential:
    username: hyperglass
    password: foobar
  display_name: ***
  port: 22
  nos: juniper
  proxy:
  vrfs:
  - name: default
    display_name: whatsthis
    ipv4:
      source_address: ***
      force_cidr: false

Logs

[10/09/20 15:08:14] INFO     Starting query execution for query Que routes.py:87
ry(query_location=***,
query_type=ping, query_vrf=default,
query_target=***)
INFO     Opening connection to           async_driver.py:100
10.92.118.76
INFO     Attempting to acquire    base_network_driver.py:323
`exec` privilege level
INFO     Acquired requested       base_network_driver.py:360
privilege level `exec`
INFO     Connection to 10.92.118.76      async_driver.py:104
opened successfully
[10/09/20 15:08:18] INFO     Closing connection to           async_driver.py:120
***
[2020-10-09 15:08:18 +0000] [19889] [ERROR] Exception in ASGI application
Traceback (most recent call last):
File "/opt/hyperglass/hyperglass-server/virtualenv/lib64/python3.6/site-packages/uvicorn/protocols/http/httptools_impl.py", line 390, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/opt/hyperglass/hyperglass-server/virtualenv/lib64/python3.6/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
return await self.app(scope, receive, send)
File "/opt/hyperglass/hyperglass-server/virtualenv/lib64/python3.6/site-packages/fastapi/applications.py", line 183, in __call__
await super().__call__(scope, receive, send)  # pragma: no cover
File "/opt/hyperglass/hyperglass-server/virtualenv/lib64/python3.6/site-packages/starlette/applications.py", line 102, in __call__
await self.middleware_stack(scope, receive, send)
File "/opt/hyperglass/hyperglass-server/virtualenv/lib64/python3.6/site-packages/starlette/middleware/errors.py", line 181, in __call__
raise exc from None
File "/opt/hyperglass/hyperglass-server/virtualenv/lib64/python3.6/site-packages/starlette/middleware/errors.py", line 159, in __call__
await self.app(scope, receive, _send)
File "/opt/hyperglass/hyperglass-server/virtualenv/lib64/python3.6/site-packages/starlette/middleware/cors.py", line 86, in __call__
await self.simple_response(scope, receive, send, request_headers=headers)
File "/opt/hyperglass/hyperglass-server/virtualenv/lib64/python3.6/site-packages/starlette/middleware/cors.py", line 142, in simple_response
await self.app(scope, receive, send)
File "/opt/hyperglass/hyperglass-server/virtualenv/lib64/python3.6/site-packages/starlette/exceptions.py", line 82, in __call__
raise exc from None
File "/opt/hyperglass/hyperglass-server/virtualenv/lib64/python3.6/site-packages/starlette/exceptions.py", line 71, in __call__
await self.app(scope, receive, sender)
File "/opt/hyperglass/hyperglass-server/virtualenv/lib64/python3.6/site-packages/starlette/routing.py", line 550, in __call__
await route.handle(scope, receive, send)
File "/opt/hyperglass/hyperglass-server/virtualenv/lib64/python3.6/site-packages/starlette/routing.py", line 227, in handle
await self.app(scope, receive, send)
File "/opt/hyperglass/hyperglass-server/virtualenv/lib64/python3.6/site-packages/starlette/routing.py", line 41, in app
response = await func(request)
File "/opt/hyperglass/hyperglass-server/virtualenv/lib64/python3.6/site-packages/fastapi/routing.py", line 197, in app
dependant=dependant, values=values, is_coroutine=is_coroutine
File "/opt/hyperglass/hyperglass-server/virtualenv/lib64/python3.6/site-packages/fastapi/routing.py", line 147, in run_endpoint_function
return await dependant.call(**values)
File "/opt/hyperglass/hyperglass-server/virtualenv/lib64/python3.6/site-packages/hyperglass/api/routes.py", line 120, in query
cache_output = await execute(query_data)
File "/opt/hyperglass/hyperglass-server/virtualenv/lib64/python3.6/site-packages/hyperglass/execution/main.py", line 72, in execute
output = await driver.parsed_response(response)
File "/opt/hyperglass/hyperglass-server/virtualenv/lib64/python3.6/site-packages/hyperglass/execution/drivers/_common.py", line 65, in parsed_response
_output = await coro(commands=self.query, output=response)
TypeError: object str can't be used in 'await' expression
INFO     Attempting to acquire    base_network_driver.py:323
`exec` privilege level
INFO     Acquired requested       base_network_driver.py:360
privilege level `exec`
INFO     Connection to ***      async_driver.py:124
closed successfully

Possible Solution

Environment

Server

Metric Value
hyperglass Version 1.0.0-beta.59
hyperglass Path /opt/hyperglass/hyperglass-server/hyperglass
Python Version 3.6.8
Platform Info Linux-5.8.9-1.el7.elrepo.x86_64-x86_64-with-centos-7.8.2003-Core
CPU Info Intel Xeon Processor (Skylake, IBRS)
Logical Cores 4
Physical Cores 1
Processor Speed 2.095076GHz
Total Memory 4.13 GB
Memory Utilization 37.6%
Total Disk Space 51.65 GB
Disk Utilization 18.1%

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions