Improve performance of the NOS driver#74
Open
naved001 wants to merge 3 commits intoansible-network:develfrom
Open
Improve performance of the NOS driver#74naved001 wants to merge 3 commits intoansible-network:develfrom
naved001 wants to merge 3 commits intoansible-network:develfrom
Conversation
running-config can take a long time.
…nd trips This significantly improves performance.
|
Build succeeded. ✔️ ansible-tox-py36 SUCCESS in 4m 05s |
tzumainn
reviewed
Feb 21, 2023
Contributor
tzumainn
left a comment
There was a problem hiding this comment.
These changes worked for me, reducing operations from nearly 12 minutes to something closer to 6 minutes!
Contributor
|
@NilashishC hi! I saw you helped on the previous PR for the NOS driver; is it possible to help with this one as well? Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Without these optimizations, it was taking around 9-10 minutes to configure a a switchport in access mode. The commits in this PR cuts this down by half. There are 2 major changes:
show running-config | include host-name. In our case, because the switches are stacked this returns the configuration from all of our 8 stacked switches which takes a while to generate. By setting match to none, it ignores comparing[1] the source config and running config.Not sure if this has a place in this repository as the driver without the optimizations maybe okay for people who don't have their switches stacked, but I wanted to submit this in case folks are interested.
[1] https://docs.ansible.com/ansible/latest/collections/community/network/nos_config_module.html#parameter-match