Closed briantsaunders closed 6 years ago
Better solution needs created for the hostname handler or more time allocated...too many failures just due to delay of loading the configuration.
Have same issue when i push NAT config on any IOS devices... device lags when it has NAT applied and then i get :
TASK [napalm_install_config] *** fatal: [170501795]: FAILED! => {"changed": false, "failed": true, "msg": "cannot install config: Unable to find prompt: "}
even though config is properly applied...
@fherbet You might turn on logging to get more details on your issue:
Are you doing a replace or a merge operation?
Note, the above error is a pretty generic Netmiko error so it may nor not be the same cause as the above issue.
Proposed fix is here.
https://github.com/napalm-automation/napalm-ios/pull/207
@briantsaunders It would be interesting to know if the new solution works for your Catalyst 3850. You should not need to set the global_delay_factor here.
@ktbyers sure, i can test it out. how do I get the fix loaded into my environment?
@briantsaunders You should be able to do something like the following:
# Create a new git clone
git clone https://github.com/napalm-automation/napalm-ios
cd napalm-ios
# Make a new branch based upon develop branch
git checkout -b ktbyers-improve_hostname_handler develop
# Pull all my changes into that branch
git pull https://github.com/ktbyers/napalm-ios.git improve_hostname_handler
# From napalm-ios directory (use this new branch as the active code to use)
# Make sure okay in the virtual environment you are in (or rollback to previous napalm-ios when done)
pip install -e .
@ktbyers Just tested it on the 3850 I had previous issues with, no errors this time around upon commit_config().
>>> from napalm import get_network_driver
>>> driver = get_network_driver('ios')
>>> session = driver('10.253.182.6', 'admin', 'xxxxxx')
>>> session.open()
>>> import os
>>> filePath = os.path.join('candidate.txt')
>>> print filePath
candidate.txt
>>> session.load_replace_candidate(filePath)
>>> session.compare_config()
u'interface GigabitEthernet1/0/3\n +description This is a test\n-ip scp server enable'
>>> session.commit_config()
>>> session.get_facts()
{u'os_version': u'IOS-XE Software, Catalyst L3 Switch Software (CAT3K_CAA-UNIVERSALK9-M), Version 03.06.06E RELEASE SOFTWARE (fc1)', u'uptime': 2518920, u'interface_list': [u'Vlan1', u'Vlan10', u'Vlan20', u'Vlan30', u'Vlan40', u'Vlan50', u'Vlan60', u'Vlan70', u'Vlan80', u'Vlan90', u'Vlan100', u'Vlan110', u'Vlan120', u'GigabitEthernet0/0', u'GigabitEthernet1/0/1', u'GigabitEthernet1/0/2', u'GigabitEthernet1/0/3', u'GigabitEthernet1/0/4', u'GigabitEthernet1/0/5', u'GigabitEthernet1/0/6', u'GigabitEthernet1/0/7', u'GigabitEthernet1/0/8', u'GigabitEthernet1/0/9', u'GigabitEthernet1/0/10', u'GigabitEthernet1/0/11', u'GigabitEthernet1/0/12', u'GigabitEthernet1/0/13', u'GigabitEthernet1/0/14', u'GigabitEthernet1/0/15', u'GigabitEthernet1/0/16', u'GigabitEthernet1/0/17', u'GigabitEthernet1/0/18', u'GigabitEthernet1/0/19', u'GigabitEthernet1/0/20', u'GigabitEthernet1/0/21', u'GigabitEthernet1/0/22', u'GigabitEthernet1/0/23', u'GigabitEthernet1/0/24', u'GigabitEthernet1/0/25', u'GigabitEthernet1/0/26', u'GigabitEthernet1/0/27', u'GigabitEthernet1/0/28', u'GigabitEthernet1/0/29', u'GigabitEthernet1/0/30', u'GigabitEthernet1/0/31', u'GigabitEthernet1/0/32', u'GigabitEthernet1/0/33', u'GigabitEthernet1/0/34', u'GigabitEthernet1/0/35', u'GigabitEthernet1/0/36', u'GigabitEthernet1/0/37', u'GigabitEthernet1/0/38', u'GigabitEthernet1/0/39', u'GigabitEthernet1/0/40', u'GigabitEthernet1/0/41', u'GigabitEthernet1/0/42', u'GigabitEthernet1/0/43', u'GigabitEthernet1/0/44', u'GigabitEthernet1/0/45', u'GigabitEthernet1/0/46', u'GigabitEthernet1/0/47', u'GigabitEthernet1/0/48', u'GigabitEthernet1/1/1', u'GigabitEthernet1/1/2', u'GigabitEthernet1/1/3', u'GigabitEthernet1/1/4', u'Te1/1/1', u'Te1/1/2', u'Te1/1/3', u'Te1/1/4', u'Loopback0'], u'vendor': u'Cisco', u'serial_number': u'FCW2121F08S', u'model': u'WS-C3850-48P', u'hostname': u'agg-cat3850-01', u'fqdn': u'agg-cat3850-01.sandbox.local'}
>>> session.close()
>>>
@briantsaunders Nice...thanks.
@ktbyers I had the same issue and this update resolved it on an 887VA with IOS 15.4(3)M8. Thank you :-)
Hi @briantsaunders - we are currently in the process of reunification, please check https://napalm-automation.net/reunification/. Going forward, we'd like to ask you to submit Pull Requests and Issue to the main repository: https://github.com/napalm-automation/napalm. I believe this has been already fixed via https://github.com/napalm-automation/napalm-ios/commit/13fc6c4ceb2c57e8df25e34773fd7f6b5f2be5ba. Otherwise, please feel free to reopen at https://github.com/napalm-automation/napalm/issues.
Thanks for understanding!
Hey Team,
I was experiencing this same issue on an IOS-XE switch version 3.07.05. I upgraded my netmiko, napalm_base, and napalm_ios modules to most recent and this fixed the 'unable to find prompt' issue.
Thank you all!
Description of Issue/Question
Attempting to perform a commit_config() operation on a Cisco Catalyst 3850 device. I modify the global_delay_factor to 120 and still receive the error. When I manually enter the "configure replace candidate.txt force revert trigger error" on the device it takes greater than 20 seconds for the prompt to return. I noticed in the _commit_hostname_handler function in the ios.py code that the default only waits 12 seconds. Not sure if this is related or not.
Did you follow the steps from https://github.com/napalm-automation/napalm#faq
Setup
napalm-ios version
(Paste verbatim output from
pip freeze | grep napalm-ios
between quotes below)IOS version
(Paste verbatim output from
show version
between quotes below)Steps to Reproduce the Issue
Error Traceback
(Paste the complete traceback of the exception between quotes below)