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
Software update fails with "You must provide either 'host' or 'sock_fd' value" #608
Comments
After much wringing of the hands, I tried a different approach using the Nevertheless, I tried using the - name: Upgrade OS on Juniper Devices
hosts: juniper_upgrade
gather_facts: false
roles:
- Juniper.junos
collections:
- juniper.device
vars:
local_file_dir: /home/ansuser/ansible/files/software/juniper
network_util_dir: /home/juniper-backup/software
log_dir: "{{ playbook_dir }}/logs"
wait_time: 3600
ansible_user: network-ansible
ansible_ssh_key: /home/ansuser/.ssh/id_rsa
acx710_file: junos-install-acx-arm-64-21.4R1-S2.3.tgz
tasks:
- name: Verify NETCONF connectivity
ansible.builtin.wait_for:
host: "{{ inventory_hostname }}"
timeout: 5
# ------------- ACX710 ---------------
- name: Transfer install file to Ansible machine
delegate_to: localhost
ansible.builtin.command:
cmd: "scp ansuser@172.16.201.50:{{ network_util_dir }}/acx710/{{ acx710_file }} {{ local_file_dir }}/{{ acx710_file }}"
when: "'ACX71' in inventory_hostname"
- name: Upgrade software on ACX710
juniper_junos_software:
local_package: "{{ local_file_dir }}/{{ acx710_file }}"
validate: false
checksum_timeout: 420
cleanfs_timeout: 600
install_timeout: 2000
logfile: "{{ log_dir }}/{{ inventory_hostname }}.log"
when: "'ACX71' in inventory_hostname"
register: upgrade_response
notify:
- Wait_for_reboot
- name: Print the response
ansible.builtin.debug:
msg: "{{ upgrade_response }}"
when: "'ACX71' in inventory_hostname"
- name: Delete the temporary installation file from Ansible host
delegate_to: localhost
ansible.builtin.file:
path: "{{ local_file_dir }}/{{ acx710_file }}"
state: absent
when: "'ACX71' in inventory_hostname"
# ------------- ( END OF JUNIPER MODELS ) ---------------
handlers:
- name: Wait_for_reboot
ansible.builtin.wait_for:
host: "{{ inventory_hostname }}"
timeout: "{{ wait_time }}"
when: not upgrade_response.check_mode
This was successful, leading me to believe something is missing from |
I know that this type of error "You must provide either 'host' or 'sock_fd' value" can be mitigated setting paramiko as ssh_type. Maybe you can give it a try.
|
Can see the same issue, tried setting paramiko, in multiple ways but none worked out. In other attempts I hit either ansible/ansible#68034 or netconf will not be working as in ansible/ansible#50162 and the non-deprecated [put module[(https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/net_put_module.html#ansible-collections-ansible-netcommon-net-put-module) also doesn't work. I'm at a loss and do hope Juniper can throw sufficient resources at this - so there will again a clear path that works well. For the record, I intentionally broke stuff with the above tests and my own playbooks, removing
Installing it had absolutely no effect, putting me back at with the ACX example from above and mine.
It'll always be the SCP affected, I have not found a workaround yet. |
In my experience juniper.device modules ONLY work with local connection type. So try setting local connection type. Either for the whole play or for a single tasks, which is using juniper.device modules. |
Hi @mactizzle https://github.com/Juniper/ansible-junos-stdlib/blob/master/tests/pb.juniper_junos_software.yml Thanks |
Hi @chidanandpujar , since opening this we have manually upgraded all of the 710s in our network so I no longer have any to test on. I do have quite a few ACX2100s that are currently in an upgrade cycle (15.1R3.6 > 21.2R3-S6.11). If you think testing on those will prove useful for this issue then I'll give it a shot. Otherwise I can see about getting a spare 710 from our warehouse to bench-test. I do foresee hitting PR1568757 (must use no-validate when upgrading Pre 21.2 to 21.2 and onward), so I will need to add Will this work for your test? EDIT: disregard... lapse of memory. We can only upgrade the ACX2100s via USB since the version jump is so big. I'll post back if I can bench-test a 710, otherwise hopefully someone else can chime in here. |
Hi @mactizzle Thanks |
Hi @mactizzle ,
Thanks |
Hi @mactizzle , Thanks |
Issue Type
Module Name
junipernetworks.junos.junos_package
juniper.device collection and Python libraries version
OS / Environment
ACX710 (JUNOS 20.2R1.10)
Summary
While attempting an upgrade from 20.2R1.10 to 21.4R1-S2.3 on an ACX-710, junipernetworks.junos.junos_package fails with "You must provide either 'host' or 'sock_fd' value"
Steps to reproduce
Please see playbook below.
Expected results
Output similar to the example playbook
Actual results
The text was updated successfully, but these errors were encountered: