ansible-junos-stdlib
ansible-junos-stdlib copied to clipboard
juniper.device.system reboot fails when junos.has_2RE
Issue Type
- Bug Report
Module Name
juniper.device.system
juniper.device collection and Python libraries version
ansible --version
ansible [core 2.12.5.post0]
config file = None
configured module search path = ['/home/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.8/site-packages/ansible
ansible collection location = /home/runner/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.8.12 (default, Sep 21 2021, 00:10:52) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
jinja version = 2.10.3
libyaml = True
Collection Version
----------------- -------
ansible.netcommon 3.0.1
ansible.utils 2.6.1
awx.awx 21.1.0
community.general 5.0.2
juniper.device 1.0.1
OS / Environment
MX480 with dual routing engine (re0/re1)
Summary
After upgrading the backup routing engine of a MX480 device, following task is run to reboot it:
- name: "Reboot RE {{ engine }} if {{ inventory_hostname }}"
juniper.device.system:
action: "reboot"
other_re: "true"
port: "{{ netconf_port }}"
timeout: "{{ wait_time }}"
vmhost: "{{ vmhost | default(omit) }}"
register: reboot
But this fails with following error:
"msg": "reboot failed. Error: RpcError(severity: error, bad_element: in, message: error: syntax error, expecting <invoke-on>\nerror: syntax error, expecting <filter type=\"subtree\"> or <filter type=\"subtree\" />)",
Steps to reproduce
Initiate a reboot of a MX480 with dual routing engine using above task
Expected results
The reboot task to reboot routing engine 1
Actual results
"msg": "reboot failed. Error: RpcError(severity: error, bad_element: in, message: error: syntax error, expecting <invoke-on>\nerror: syntax error, expecting <filter type=\"subtree\"> or <filter type=\"subtree\" />)",