-
Notifications
You must be signed in to change notification settings - Fork 555
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
IOS: discard_config() fails at large catalyst-stack #2023
Comments
@heitmanr When you run this command manually via SSH
Does the switch prompt for anything or is there anything else odd about the switches response? Also do you have the full exception stack trace or a way to get it (so I can see the internal calls on where it is failing in the code)? |
No, since "file prompt quiet" is default in this specific setup... nothing... it takes 11 seconds at this particular switch, that's all...
I'll attach the "debug"-log including the traceback. |
I've been adding
to the Switch-Config so I can monitor the commands entering the switch even when they are decrypted by SSH. At the Syslog-Server the following Output Appears:
=> the "copy running-config flash:/candidate_config.txt"-command reaches the switch:
|
Workaround (for me, 100% Catalyst IOS):
Positive side-effect:
|
Okay, it looks like we just need to increase the read_timeout on these two lines. I believe the default read_timeout is 10 seconds so if this command takes longer than 10 seconds, then you will get the error that you observed: https://github.com/napalm-automation/napalm/blob/develop/napalm/ios/ios.py#L672-L673 |
Oh, I've been using "global_delay_factor" before. Changed the "optional_args" to:
Now it takes 11s for the exception to get thrown:
in
the netmiko-debug stops now with "EOF"
|
@heitmanr Yes, those lines are hard-coded in the napalm driver so it needs to be changed in the napalm code itself. You possibly could change the behavior by setting: fast_cli=False, and global_delay_factor=4 as optional_args. Doing that might override the default read_timeout value. |
Description of Issue/Question
When using NAPALM to get a kind of preview of required configuration changes, the sequence
works fine and finds all configs to be changed.
When aborting the change using
this runs in a kind of internal napalm/netmiko-timeout.
The Exception raised is:
I assume this is a timeout on my client, since
Last line in "netmiko.log" is
HOSTNAME#copy running-config flash:/candidate_config.txt
When running the python script, this command never gets executed [no flash:/candidate_config.txt file is written into flash]
Trying this command manually per SSH, it takse ~11s but works fine.
Running this at (non-stacked) Catalyst-Switches using the same IOS-Release works fine.
Did you follow the steps from https://github.com/napalm-automation/napalm#faq
Setup
Windows 10 client
Catalyst 2960X, 15.2(7)E8
napalm version
(Paste verbatim output from
pip freeze | grep napalm
between quotes below)Network operating system version
(Paste verbatim output from
show version
- or equivalent - between quotes below)Steps to Reproduce the Issue
I assume, the whole setup is required so it's almost impossible to reproduce in a lab environment.
Error Traceback
The Exception raised:
I'll upload netmiko.log.
The text was updated successfully, but these errors were encountered: