-
Notifications
You must be signed in to change notification settings - Fork 168
Closed
Description
Issue Type
- Bug Report
Module Name
juniper_junos_system
Juniper.Junos role and Python libraries version
ansible 2.4.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.6 (default, Oct 26 2016, 20:30:19) [GCC 4.8.4]
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.9.dev0
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
OS / Environment
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
On a Linux based QFX5200, juniper_junos_system with reboot option fails.
Steps to reproduce
Run the YAML file to reboot QFX5200 on Linux Platform.
- name: Reboot all REs of the device
juniper_junos_system:
action: "reboot"
user: "user"
passwd: "passwd"Expected results
Device to be shutdown.
Actual results
PLAY [Testing Juniper Junos Core Modules] **************************************************************************************************************************************
META: ran handlers
TASK [Reboot all REs of the device] ********************************************************************************************************************************************
task path: /etc/ansible/ANS_virtualenv/pb/Renamed_Juniper_Junos_Ansible.pb.yaml:442
Using module file /root/.ansible/roles/Juniper.junos/library/juniper_junos_system.py
<imax> ESTABLISH LOCAL CONNECTION FOR USER: root
<imax> EXEC /bin/sh -c 'echo ~ && sleep 0'
<imax> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1529666208.03-209991485885803 `" && echo ansible-tmp-1529666208.03-209991485885803="` echo /root/.ansible/tmp/ansible-tmp-1529666208.03-209991485885803 `" ) && sleep 0'
<imax> PUT /tmp/tmpEMcqEb TO /root/.ansible/tmp/ansible-tmp-1529666208.03-209991485885803/juniper_junos_system.py
<imax> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1529666208.03-209991485885803/ /root/.ansible/tmp/ansible-tmp-1529666208.03-209991485885803/juniper_junos_system.py && sleep 0'
<imax> EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1529666208.03-209991485885803/juniper_junos_system.py; rm -rf "/root/.ansible/tmp/ansible-tmp-1529666208.03-209991485885803/" > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_LiUprk/ansible_module_juniper_junos_system.py", line 464, in <module>
main()
File "/tmp/ansible_LiUprk/ansible_module_juniper_junos_system.py", line 381, in main
junos_module.add_sw()
File "/tmp/ansible_LiUprk/ansible_modlib.zip/ansible/module_utils/juniper_junos_common.py", line 1345, in add_sw
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_LiUprk/ansible_module_juniper_junos_system.py\", line 464, in <module>\n main()\n File \"/tmp/ansible_LiUprk/ansible_module_juniper_junos_system.py\", line 381, in main\n junos_module.add_sw()\n File \"/tmp/ansible_LiUprk/ansible_modlib.zip/ansible/module_utils/juniper_junos_common.py\", line 1345, in add_sw\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