-
Notifications
You must be signed in to change notification settings - Fork 109
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
File copy hangs until timeout is reached regardless of transfer time #736
Comments
Hello! Not totally related, but it seems to fail towards Nexus 7k with http: fatal: [N7K]: FAILED! => changed=false
copy_cmd: copy http://********@192.168.1.10/n7000-s2-dk9.8.4.6a.bin bootflash:/n7000-s2-dk9.8.4.6a.bin vrf management
file_system: 'bootflash:'
local_file: bootflash:/n7000-s2-dk9.8.4.6a.bin
remote_file: n7000-s2-dk9.8.4.6a.bin
remote_scp_server: 192.168.1.10
Here's my play: - name: cisco.nxos.nxos_upload | Upload compliant software image.
cisco.nxos.nxos_file_copy:
file_pull: true
file_pull_protocol: http
file_pull_timeout: 7200
remote_file: "{{ software_image }}"
remote_scp_server: "{{ software_file_server }}"
remote_scp_server_user: "undefined"
remote_scp_server_password: "undefined"
vrf: "{{ software_vrf }}"
Also would be nice that "remote_scp_server_user" and "remote_scp_server_password" not is required when using other protocols than scp. "Remote_scp_server" could also be called something like "remote_file_server" as other protcols than scp is used. Thank you so much! Br |
@xibriz Could you please share the device interaction logs for the play that's timing out? I suspect it has to do with some minor prompt mismatch from your appliance. Steps to enable it is described in here: https://docs.ansible.com/ansible/latest/network/user_guide/network_debug_troubleshooting.html#enabling-networking-device-interaction-logging |
@jorgenspange I will be really helpful if you could open a separate issue for the ones your mentioned. Thank you! |
@xibriz With help from @praveenramoorthy, I was able to reproduce the file_copy issue on our end as well. The other problem mentioned here about subsequent tasks failing even when the file copy task has Similar to the logs that you've shared, we found that for every iteration, ansible "hangs" once the copy completes to a. We believe that this has something to do with an internal buffer in While "resetting" the device's prompt state in preparation for the next task, the When we switched to I'll shortly be opening a ticket in the ansible/pylibssh GitHub repo to track this and keep this thread updated. |
SUMMARY
nxos_file_copy hangs until timeout is reached regadless of how long time the file copy operation takes.
ISSUE TYPE
COMPONENT NAME
nxos_file_copy
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
Initiate a file copy from the device using SCP.
EXPECTED RESULTS
I expect the task to return a result when the file copy is done, but my observations show that the task will "hang" for the total amount of the timeout value (in this case 600sec/10min).
I have observed a timeout error after 10 minutes even tough the file copy is finished below 5 minutes.
When the timeout is reached, the result could be successfull/return the expected result, or it could be a timeout error. If the result is a timeout error following tasks will fail with a AnsibleConnectionFailure saying something like "cli prompt is not identified from the last received response window".
ACTUAL RESULTS
I observe the following results from the first task:
And then the next task will fail with:
This will happen even tough I manually comfirm the transfer beeing complete several minutes before the error occurs.
Some times I can observe the last output saying:
When I manually do the transfer I can see the following happen:
The text was updated successfully, but these errors were encountered: