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

testing flask gnmi timeout #32

Closed
wants to merge 8 commits into from
Closed

testing flask gnmi timeout #32

wants to merge 8 commits into from

Conversation

hellt
Copy link
Member

@hellt hellt commented Mar 6, 2024

if you run

docker exec client7 bash /config/install_gnmic.sh

in this branch you will see the error

hellt and others added 2 commits March 6, 2024 14:30
added a try exept on the function "sub_telemetry" and "update_port_status"
@hellt hellt marked this pull request as draft March 6, 2024 12:48
add except grpc.FutureTimeoutError to the gNMIclient to avoind timeout errors
fixed ident
write the Flask errors and output to the docker logs
fixed bug with the pygnmi timeout connection
missed a timeout and the sleep
@alfilipe
Copy link
Collaborator

The flask app have been changed to fix the issue with unavailable connections, it will try to connect every 10 seconds (the amount of seconds can be changed on the flask app under the function '__init__' of the class 'Telemetry').
The file "install_gnmic.sh" has been changed to allow the flask app stdout and stderr to be writen on the docker logs.

while the nodes are not reachable you will see some messages like those bellow:

[Flask] - sub_telemetry - unable to connect to the host pe1 will try agrain in 10 seconds
[Flask] - update_anysec_status - unable to connect to the host pe1 will try agrain in 10 seconds
[Flask] - update_port_status - unable to connect to the host p3 will try agrain in 10 seconds

while the node is available and an GNMI connection can be established but the GNMI path is not accessible yet, can be exepted the see some exception errors link the one bellow:

Exception in thread Thread-320:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 980, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.9/threading.py", line 917, in run
    self._target(*self._args, **self._kwargs)
  File "/flask_app/venv/lib/python3.9/site-packages/pygnmi/client.py", line 997, in enqueue_updates
    for update in subscription:
  File "/flask_app/venv/lib/python3.9/site-packages/grpc/_channel.py", line 542, in __next__
    return self._next()
  File "/flask_app/venv/lib/python3.9/site-packages/grpc/_channel.py", line 968, in _next
    raise self
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
        status = StatusCode.CANCELLED
        details = "Channel closed!"
        debug_error_string = "UNKNOWN:Error received from peer  {grpc_message:"Channel closed!", grpc_status:1, created_time:"2024-03-28T21:47:50.534257369+00:00"}"

after that the all will run as it is supposed to be.

error on upgrading pip.
added the '.' before '/venv/bin/python3' to force the pip to be upgraded under the virtual environment
Copy link
Collaborator

@tiago-amado tiago-amado left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to uncomment nodes from yml file. Those were commented only for tests.

@tiago-amado
Copy link
Collaborator

@alfilipe, we need to merge your code into the main. this branch was created for test proposes and there are changes in the yml file that must be reverted. Either we do that or we create a new clean branch and deploy the changes again.
@hellt, how do you suggest to proceed?

@hellt
Copy link
Member Author

hellt commented Jul 17, 2024

@tiago-amado I don't think we need to proceed with this now
The repo works from the main branch, @aaakpinar please confirm if that is the case and you don't have local changes that were not pushed to the repo.

As far as the future state of the automation panel is concerned, @siva19susi is almost done with the refactored versiont that we will use later in favor of the current python version.

@hellt
Copy link
Member Author

hellt commented Jul 25, 2024

superseded by #38

@hellt hellt closed this Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants