Closed ktbyers closed 6 years ago
Here is the error you get when the SCP transfer fails:
>>>Load full config
Traceback (most recent call last):
File "napalm_test.py", line 33, in <module>
device.load_replace_candidate(filename='cisco1.txt')
File "/home/gituser/napalm-ios/napalm_ios/ios.py", line 209, in load_replace_candidate
file_system=self.dest_file_system)
File "/home/gituser/napalm-ios/napalm_ios/ios.py", line 193, in _load_candidate_wrapper
file_system=file_system)
File "/home/gituser/napalm-ios/napalm_ios/ios.py", line 430, in _scp_file
file_system=file_system, TransferClass=FileTransfer)
File "/home/gituser/napalm-ios/napalm_ios/ios.py", line 481, in _xfer_file
return (False, '')
File "/home/gituser/netmiko/netmiko/scp_handler.py", line 88, in __exit__
raise exc_type(exc_value)
scp.SCPException: Timout waiting for scp response
I think we can close also this one after merging https://github.com/napalm-automation/napalm/pull/381?
@mirceaulinic Let's leave this open for a couple more months. There still was a strange issue of why the SCP would fail with the self-signed certificate that I want to looki nto some more.
First Issue
Using napalm-ios/napalm-base develop branch as of 2017-04-29 and netmiko 1.3.0 (and sometimes develop version on this same date).
Running on a CSR1000V using
If I use
configure replace
operation and the file contains the following:Then the SCP transfer would fail.
It would fail to transfer the file. Debugging on router side indicated the SCP communication started, but ended when I would expect the file to be transferred.
Increasing the SCP timeout from 5 seconds to 30 seconds did not help. It doesn't look like the transfer even starts.
Manual transfer of same file from server to router works using SCP:
Second Issue
Same router would not let me to a configure replace where I removed the self-signed certificate. In other words, I had a perfectly valid config file that removed the self-signed certificate. I would get a message complaining about 'no quit' (i.e. the end of the self-signed certificate). I had to manually remove it and then do the configure replace operation.
Third Issue
The self-signed certificate contains a tab in the quit line and must be structured exactly this way. You cannot just copy and paste it (as the tab will get converted to spaces).