Closed mattwalter-cadenzallc closed 4 years ago
Hi @mattwalter-cadenzallc
can you share the command ‘show version’ output?
I'm seeing a similar issue now since the commit on 5/7, let me know if I should open a separate issue.
https://github.com/Juniper/ansible-junos-stdlib/commit/570d44925b0b0db47f5c4d47c6a1aa0251faad0f
ansible-playbook 2.8.8
config file = /etc/ansible/ansible.cfg
configured module search path = ['/var/lib/awx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /opt/my-envs/ansible2.8_py3/lib/python3.7/site-packages/ansible
executable location = /opt/my-envs/ansible2.8_py3/bin/ansible-playbook
python version = 3.7.4 (default, Feb 19 2020, 17:25:06) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
"module_stderr": "/var/lib/awx/.ansible/tmp/ansible-tmp-1592828642.9456952-110570275472584/AnsiballZ_juniper_junos_config.py:18: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
Traceback (most recent call last):
File \"/var/lib/awx/.ansible/tmp/ansible-tmp-1592828642.9456952-110570275472584/AnsiballZ_juniper_junos_config.py\", line 114, in <module>
_ansiballz_main()
File \"/var/lib/awx/.ansible/tmp/ansible-tmp-1592828642.9456952-110570275472584/AnsiballZ_juniper_junos_config.py\", line 106, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File \"/var/lib/awx/.ansible/tmp/ansible-tmp-1592828642.9456952-110570275472584/AnsiballZ_juniper_junos_config.py\", line 49, in invoke_module
imp.load_module('__main__', mod, module, MOD_DESC)
File \"/usr/local/lib/python3.7/imp.py\", line 234, in load_module
return load_source(name, filename, file)
File \"/usr/local/lib/python3.7/imp.py\", line 169, in load_source
module = _exec(spec, sys.modules[name])
File \"<frozen importlib._bootstrap>\", line 630, in _exec
File \"<frozen importlib._bootstrap_external>\", line 728, in exec_module
File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed
File \"/tmp/ansible_juniper_junos_config_payload_wu4e7872/__main__.py\", line 1148, in <module>
File \"/tmp/ansible_juniper_junos_config_payload_wu4e7872/__main__.py\", line 1080, in main
File \"/tmp/ansible_juniper_junos_config_payload_wu4e7872/ansible_juniper_junos_config_payload.zip/ansible/module_utils/juniper_junos_common.py\", line 1573, in diff_configuration
TypeError: diff() got an unexpected keyword argument 'ignore_warning'
",
@jhlasnik It seems, your PyEz(junos-eznc) may not be in sync with your ansible roles. Upgrading PyEz should resolve this.
It is different from this issue. If the issue still pertains after upgrading PyEz you can open a separate issue for it. Do share the 'pip list' and 'ansible-galaxy list' output in that situation.
@jhlasnik It seems, your PyEz(junos-eznc) may not be in sync with your ansible roles. Upgrading PyEz should resolve this.
It is different from this issue. If the issue still pertains after upgrading PyEz you can open a separate issue for it. Do share the 'pip list' and 'ansible-galaxy list' output in that situation.
Yeah, after digging through the code changes more I see that. This wasn't noted in the requirements file as requiring a certain version of junos-eznc.
Show version output:
show version Hostname: xxxxxxxxxxxxxxxxxxxxxx Model: nfx250_s2_10_t JUNOS Host Software [4.1.27-rt30-WR8.0.0.25_ovp:3.0.3] JUNOS Host nfx-2 platform package [18.4R3.3] NFX-2 LTE package [18.4R3.3] JUNOS Host nfx-2 base package [18.4R3.3] JUNOS Host nfx-2 control-plane flex package [18.4R3.3] JUNOS Host nfx-2 data-plane package [18.4R3.3] JUNOS Host qfx-jdm package [18.4R3.3]
{master:0}
Will take a look and confirm, thanks!
Looking at your junos-eznc version you may need to upgrade that. Going from 2.3.1 to 2.4.1 resolved my issue.
Will take a look and confirm, thanks!
Looking at your junos-eznc version you may need to upgrade that. Going from 2.3.1 to 2.4.1 resolved my issue.
I actually also had the same issue you had with other devices recently. (napalm was holding junos-eznc to 2.2.1) 2.4.1 fixed that issue. The NFX JDM device is also now showing diff's as expected too now. Thanks!
Issue resolved.
Issue Type
Module Name
juniper_junos_config
Juniper.Junos role and Python libraries version
OS / Environment
NFX250 JDM (Model: nfx250_s2_10_t) 18.4R3.3
Summary
When setting
diff: True
we expect to see a file generated that shows the changes of the candidate config vs the committed. The file output instead showsUnable to parse diff from response!
. The same playbook/task run on other devices returns expected results.Other than not generating the diff file contents, juniper_junos_config works for the NFX JDM devices.
Steps to reproduce
Expected results
Actual results