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

Implement asyncio for move_and_rebuild_hosts.py #256

Closed
sadsfae opened this issue May 30, 2019 · 2 comments
Closed

Implement asyncio for move_and_rebuild_hosts.py #256

sadsfae opened this issue May 30, 2019 · 2 comments

Comments

@sadsfae
Copy link
Member

sadsfae commented May 30, 2019

With large deployments we're bottlenecked on parsing move_and_rebuild_hosts.py for every single host among a few hundred or more.

This is an RFE to implement the asyncio library (available in Python3) to do this more concurrently.

https://docs.python.org/3/library/asyncio.html

A logical place to start is here:

https://github.com/redhat-performance/quads/blob/master/quads/tools/move_and_rebuild_hosts.py#L21

Care or intelligent locking/sleep should be taken into consideration when interacting with JunOS devices from multiple sessions however, perhaps shuffling them towards the bottom of the queue if one is active to the same IP address / device using the queue module:

https://docs.python.org/3/library/asyncio-queue.html#asyncio-queues

@sadsfae
Copy link
Member Author

sadsfae commented Jul 31, 2019

Update: this has been promoted forward to be in our 1.1.0 release scope because it's just better to accomplish a proper asyncio implementation (and actually less change) than to hobble together the second part of #277

Even though python3-paramiko is not asyncio compatible we will not be using asyncio tasks for the network automation portion of QUADS as to not step on multiple connections / changes to the same switching.

@grafuls
Copy link
Contributor

grafuls commented Aug 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants