You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to transfer a file using SCP to an IOS device, you get a "No such file or directory" error. If you switch back to Paramiko it works fine.
ISSUE TYPE
Bug Report
PYLISSH and LIBSSH VERSION
libssh_0.9.3
ansible_pylibssh-0.4.0
OS / ENVIRONMENT
This is running from a custom EE based off of quay.io/ansible/awx-ee:0.6.0. The only additions are some extra packages for netbox, scp, and pylibssh.
The target is a Cisco 3750xp running IOS 15.2(4)E8. I have run this with ssh1 and ssh2 enabled on the switch, and both ended with the same result.
This is actually the output when you add the var ansible_network_cli_ssh_type: paramiko, nothing else was changed between this run and the failed one using libssh.
TASK [upgrade : ansible.netcommon.net_put] *************************************
task path: /runner/project/roles/upgrade/tasks/xfer.yml:3
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
redirecting (type: become) ansible.builtin.enable to ansible.netcommon.enable
<10.255.79.10> attempting to start connection
<10.255.79.10> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /usr/local/bin/ansible-connection
<10.255.79.10> found existing local domain socket, using it!
<10.255.79.10> updating play_context for connection
<10.255.79.10>
<10.255.79.10> local domain socket path is /home/runner/.ansible/pc/11ab5503fd
Getting network OS from inventory
changed: [3750xp-stack] => {
"changed": true,
"destination": "flash:c3750e-universalk9-mz.152-4.E10.bin"
}
TASK [upgrade : ansible.netcommon.net_put] *************************************
task path: /runner/project/roles/upgrade/tasks/xfer.yml:3
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
redirecting (type: become) ansible.builtin.enable to ansible.netcommon.enable
<10.255.79.10> attempting to start connection
<10.255.79.10> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /usr/local/bin/ansible-connection
<10.255.79.10> found existing local domain socket, using it!
<10.255.79.10> updating play_context for connection
<10.255.79.10>
<10.255.79.10> local domain socket path is /home/runner/.ansible/pc/11ab5503fd
Getting network OS from inventory
fatal: [3750xp-stack]: FAILED! => {
"changed": false,
"destination": "flash:c3750e-universalk9-mz.152-4.E10.bin",
"msg": "Exception received: Error transferring file to flash:c3750e-universalk9-mz.152-4.E10.bin: Initializing SCP session of remote file [flash:c3750e-universalk9-mz.152-4.E10.bin] for write failed with error [b'Socket error: No such file or directory']"
}
The text was updated successfully, but these errors were encountered:
I am having a very similar issue copying files to IOS devices with net_put. It works with paramiko but not with libssh. This issue may be related to #500
Here is my playbook:
hosts: rtr01
tasks:
- name: PUSH TEST FILE TO DEVICE
ansible.netcommon.net_put:
src: /home/software/cisco/.tgz
dest: flash:/.tgz
vars:
ansible_connection: network_cli
ansible_network_cli_ssh_type: paramiko
It works when I specify "ansible_network_cli_ssh_type: paramiko" variable, but without specifying paramiko and using libssh it fails with this error:
"Exception received unable to connect to socket /home//.ansible/pc/17de54cbc6. See the socket path issue category in Network Debug and Troubleshooting guide."
SUMMARY
When attempting to transfer a file using SCP to an IOS device, you get a "No such file or directory" error. If you switch back to Paramiko it works fine.
ISSUE TYPE
PYLISSH and LIBSSH VERSION
OS / ENVIRONMENT
This is running from a custom EE based off of
quay.io/ansible/awx-ee:0.6.0
. The only additions are some extra packages for netbox, scp, and pylibssh.The target is a Cisco 3750xp running IOS 15.2(4)E8. I have run this with ssh1 and ssh2 enabled on the switch, and both ended with the same result.
STEPS TO REPRODUCE
Running this task
EXPECTED RESULTS
This is actually the output when you add the var
ansible_network_cli_ssh_type: paramiko
, nothing else was changed between this run and the failed one using libssh.SSH Logs from the switch: https://gist.github.com/vrelk/da99ec3107e18d7239f0286ee582e2c9 (start/end trimmed)
ACTUAL RESULTS
This is the debug output on the switch that corresponds to this task (with ssh and scp debugging enabled): https://gist.github.com/vrelk/23fa0dfd09b8f27f79118684bac75d08
The text was updated successfully, but these errors were encountered: