Open andyjsharp opened 5 years ago
You can set version: none
so that no validation is done
Or you can use the rpc way to upgrade:
- name: "Upgrade JunOS {{ OS_Version }} on Backup RE of {{ inventory_hostname }}"
when: junos.RE1.mastership_state == "backup" and junos.RE1.status == "OK"
juniper.device.rpc:
rpcs:
- request-package-add
kwargs:
reboot: true
other-routing-engine: true
no-validate: true
unlink: false
package-name: "/var/tmp/{{ OS_Package }}"
logfile: "{{ LogDir }}/{{inventory_hostname }}-upgrade.txt"
port: "{{ netconf_port }}"
timeout: "{{ wait_time }}"
register: response
notify:
- wait_reboot
Issue Type
Module Name
juniper_junos_software Juniper.Junos role and Python libraries version
OS / Environment
]Junos: 17.3R3.9 Summary
Using kwargs for re0 or re1 to define which RE to upgrade fails to produce the expected results because the version checks fail to understand which RE has been selected via the kwargs. It incorrectly assumes that only the master should be taken into consideration.
Steps to reproduce
Using the following example if RE0 and RE1
RE0 = code version 1.2.0 RE1 = code version 1.2.3 RE0 = backup RE1 = master
Connection made to the VIP address of the router.
If we attempt to install code version 1.2.3 onto RE0 which does not have the correct version of code installed, we fail to get the software installed because the version check is made to the master (RE1) and because that is running version 1.2.3 we never succeed to upgrade RE0.
Expected results We would expect that it is possible to upgrade either RE1 or RE0 as instructed.
Actual results
RE0 is not getting upgraded when it should be when RE1 is master and the master has the correct code version installed already.