Conversation
liacob
requested review from
jeffkala,
pke11y and
pszulczewski
as code owners
September 22, 2026 10:01
This branch has not been deployed
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.
I ran into this while upgrading a Catalyst 9200-48P to IOS XE 17.15.6 using PyNTC 2.0.0. The switch upgraded successfully, but
install_os()raised a NetmikoReadTimeout, causing our automation to report the upgrade as failed.The error was:
The traceback pointed to this call inside
install_os():The command being executed was:
This command performs the installation and reboots the switch. Netmiko waits for the normal CLI prompt, but that prompt may never return on the original SSH session once the switch starts rebooting.
PyNTC already handles
IOErrorat this point and continues with reboot detection and image verification. However, Netmiko’sReadTimeoutis not anIOError, so it escapes that handler and stops the upgrade workflow before those checks run. The same gap is still present ondevelop.Without the original session log, I cannot confirm exactly when the prompt stopped returning. What was confirmed on the device was that the upgrade had completed despite the exception.
Changes
ReadTimeoutspecifically around the install command that reboots the switch.packages.conf.IOErrorandReadTimeout.The timeout is not treated as proof of success. The device still has to pass reboot detection and image verification. The handler does not retry the installation or catch timeouts from unrelated commands.
Why Change Image Verification?
Previously, install-mode upgrades replaced
image_namewithpackages.confbefore calling_image_booted().Both the old and new IOS XE versions can boot through
packages.conf, so finding that filename inshow versiondoes not establish that the requested upgrade succeeded. This becomes particularly important when recovering from a timeout.Keeping the requested filename allows the existing
_image_booted()logic to extract the expected version and compare it withshow version. The boot configuration still points topackages.conf; this change only affects verification.Testing
Before the fix, the new
ReadTimeoutcases failed while the existingIOErrorcases passed.The patch has not yet been tested on a physical switch. It also leaves the existing reboot detector unchanged, including its requirement that the device report an uptime below 10 minutes.