Skip to content

No check for other RE in case of WR Linux Based Hardware QFX 5200 #385

@mamathac

Description

@mamathac

Issue Type

  • Bug Report

Module Name

juniper_junos_software

Juniper.Junos role and Python libraries version

  (ANS_virtualenv) root@jsnapy-server:/etc/ansible/ANS_virtualenv/pb# pip freeze
asn1crypto==0.23.0
bcrypt==3.1.4
cffi==1.11.2
cryptography==2.1.3
enum34==1.1.6
idna==2.6
ipaddress==1.0.18
Jinja2==2.10
junos-eznc==2.1.8.dev1
lxml==4.1.1
MarkupSafe==1.0
ncclient==0.5.3
netaddr==0.7.19
paramiko==2.4.0
pyasn1==0.3.7
pycparser==2.18
PyNaCl==1.2.0
pyserial==3.4
PyYAML==3.12
scp==0.10.2
six==1.11.0
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

OS / Environment

regress@imax-re0> show version
Model: qfx5200-32c-32q
Junos: 16.2I20180618103614_evo-builder
Junos Package: junos-linux-install-qfx-x86-64-16.2I20180618103614_evo-builder.iso
Yocto: 2.2.1
Linux Kernel: 4.8.24-WR2.2.1_standard

Summary

Module looks for the other RE which is not present in case of WR based Linux.

Steps to reproduce

Run the playbook

   - name: Install Junos OS package
     juniper_junos_software:
        host={{ inventory_hostname }}
        user=root
        passwd=pwd
        reboot=yes
        port=830
        version={{ OS_version }}
        package={{ pkg_dir }}/{{ OS_package }}
        logfile=software.log
     register: sw
     notify:
     - wait_reboot
     tags:
        - ans_install_os_module

Expected results

Looking for successful Install.

Actual results

task path: /etc/ansible/ANS_virtualenv/pb/Renamed_Juniper_Junos_Ansible.pb.yaml:12
Using module file /root/.ansible/roles/Juniper.junos/library/juniper_junos_software.py
ESTABLISH LOCAL CONNECTION FOR USER: root
EXEC /bin/sh -c '( umask 77 && mkdir -p "echo $HOME/.ansible/tmp/ansible-tmp-1530497446.79-209502477282651" && echo ansible-tmp-1530497446.79-209502477282651="echo $HOME/.ansible/tmp/ansible-tmp-1530497446.79-209502477282651" ) && sleep 0'
PUT /tmp/tmpxheE1h TO /root/.ansible/tmp/ansible-tmp-1530497446.79-209502477282651/juniper_junos_software.py
EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1530497446.79-209502477282651/ /root/.ansible/tmp/ansible-tmp-1530497446.79-209502477282651/juniper_junos_software.py && sleep 0'
EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1530497446.79-209502477282651/juniper_junos_software.py; rm -rf "/root/.ansible/tmp/ansible-tmp-1530497446.79-209502477282651/" > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_gnGB5A/ansible_module_juniper_junos_software.py", line 797, in
main()
File "/tmp/ansible_gnGB5A/ansible_module_juniper_junos_software.py", line 709, in main
junos_module.add_sw()
File "/root/.ansible/roles/Juniper.junos/module_utils/juniper_junos_common.py", line 1283, in add_sw
self.sw = jnpr.junos.utils.sw.SW(self.dev)
File "/usr/local/lib/python2.7/dist-packages/jnpr/junos/utils/sw.py", line 92, in init
'localre' in dev.facts['current_re'])
TypeError: argument of type 'NoneType' is not iterable

fatal: [imax]: FAILED! => {
"changed": false,
"failed": true,
"module_stderr": "Traceback (most recent call last):\n File "/tmp/ansible_gnGB5A/ansible_module_juniper_junos_software.py", line 797, in \n main()\n File "/tmp/ansible_gnGB5A/ansible_module_juniper_junos_software.py", line 709, in main\n junos_module.add_sw()\n File "/root/.ansible/roles/Juniper.junos/module_utils/juniper_junos_common.py", line 1283, in add_sw\n self.sw = jnpr.junos.utils.sw.SW(self.dev)\n File "/usr/local/lib/python2.7/dist-packages/jnpr/junos/utils/sw.py", line 92, in init\n 'localre' in dev.facts['current_re'])\nTypeError: argument of type 'NoneType' is not iterable\n",
"module_stdout": "",
"msg": "MODULE FAILURE",
"rc": 0
}
to retry, use: --limit @/etc/ansible/ANS_virtualenv/pb/Renamed_Juniper_Junos_Ansible.pb.retry

PLAY RECAP ************************************************************************************************************************************************************
imax : ok=0 changed=0 unreachable=0 failed=1


Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions