New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JuniperJunosModule' object has no attribute '_pyez_conn' #561
Comments
I am seeing the same issue. Interesting to note, when I sniff the network connection I can see ansible connecting to the router and appears to get the data from the device. I see this on a couple different systems/version (linux and mac) both showing the same problem.
One more note... on this system (ubuntu20)... I do not see ansible make the network connection like I do with the other two versions. Getting different behaviors with the module here.
|
Hi, |
The new release of ansible should have this fixed. Closing this issue due to inactivity |
Doesn't seem fixed. |
Same here:
Any workaround for this? |
Same problem here |
This problem is hitting me today! I'm encountering this as I try to upgrade from the old |
@rahkumar651991 we need this issue reopened. |
Hi is there any update with this? Have the same issue. |
I am having the same issue with the juniper.device.software module. I am running ansible core 2.12.10 I get the error "AttributeError: 'JuniperJunosModule' object has no attribute '_pyez_conn' " |
@abailey8 @smeego78 can you confirm you are using either |
@jrokeach I can confirm I'm using - name: Upgrade software on ACX710
connection: local
juniper.device.software:
package: "{{ local_file_dir }}/{{ acx710_file }}"
validate: false
checksum_timeout: 300
cleanfs_timeout: 300
install_timeout: 1800
logfile: "{{ log_dir }}/{{ inventory_hostname }}.log"
when: "'ACX71' in inventory_hostname"
register: upgrade_response
notify:
- Wait_for_reboot Yet it still does not work. For what its worth, I used this play yesterday and successfully upgraded an ACX710. Today I was working on some other Ansible items that led me to install LibSSH ( |
Is there any update on this issue - I started to migrate from the older UPDATE: It turns out I had |
Hi @achhabr1
Please re-validated the playbook with following version and update.
Thanks |
Pass logs and information provided. So, closing the ticket. If you have any issues with the latest Juniper Ansible collection, please don't hesitate to open a ticket. |
Issue Type
Module Name
facts
juniper.device collection and Python libraries version
(python3-venv) [ac043s@sdnautosr12 juniper]$ pip list
Package Version
ansible 4.2.0
ansible-core 2.11.2
bcrypt 3.2.0
cffi 1.14.5
colorama 0.4.4
configparser 5.0.2
cryptography 3.4.7
future 0.18.2
icdiff 1.9.1
Jinja2 3.0.1
jsnapy 1.3.6
junos-eznc 2.6.1
jxmlease 1.0.3
lxml 4.6.3
MarkupSafe 2.0.1
ncclient 0.6.9
netaddr 0.8.0
netmiko 3.4.0
ntc-templates 2.1.0
packaging 21.0
paramiko 2.7.2
pip 21.1.3
pycparser 2.20
PyNaCl 1.4.0
pyparsing 2.4.7
pyserial 3.5
PyYAML 5.4.1
resolvelib 0.5.4
scp 0.13.5
setuptools 41.6.0
six 1.16.0
tenacity 7.0.0
textfsm 1.1.2
transitions 0.8.8
xmltodict 0.12.0
yamlordereddictloader 0.4.0
(python3-venv) [ac043s@sdnautosr12 juniper]$
OS / Environment
Porter 3
Summary
Connection not happening new ansible 4.2.0
(python3-venv) [ac043s@sdnautosr12 juniper]$ python
Python 3.8.6 (default, Jan 22 2021, 11:41:28)
[GCC 8.4.1 20200928 (Red Hat 8.4.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
Playbook
`---
name: Install Junos OS
hosts: porter3
connection: juniper.device.pyez
gather_facts: no
collections:
vars:
OS_version: "21.1R1-S1.1"
OS_package: "jinstall-host-nfx-3-x86-64-21.1R1-S1.1-secure-signed.tgz"
pkg_dir: "{{ lookup('env', 'HOME') }}/images"
log_dir: "{{ lookup('env', 'HOME') }}/log"
netconf_port: 830
wait_time: 3600
ansible_python_interpreter: "{{ lookup('env', 'HOME') }}/python3-venv/bin/python"
tasks:
name: Checking NETCONF connectivity
wait_for:
host: "{{ inventory_hostname }}"
port: "{{ netconf_port }}"
timeout: 5
name: Get device facts
facts:
`
Verbose output of the Error
TASK [Get device facts] ***************************************************************************************************************************************************************************************
task path: /home/ac043s/software_sdnautos02/ansible_development/juniper/porter3upgrade.yml:25
redirecting (type: connection) ansible.builtin.netconf to ansible.netcommon.netconf
Loading collection ansible.netcommon from /home/ac043s/python3-venv/lib64/python3.8/site-packages/ansible_collections/ansible/netcommon
redirecting (type: netconf) ansible.builtin.junos to junipernetworks.junos.junos
Loading collection junipernetworks.junos from /home/ac043s/python3-venv/lib64/python3.8/site-packages/ansible_collections/junipernetworks/junos
attempting to start connection
using connection plugin ansible.netcommon.netconf
Found ansible-connection at path /home/ac043s/python3-venv/bin/ansible-connection
found existing local domain socket, using it!
local domain socket path is /home/ac043s/.ansible/pc/5ecf442b60
ESTABLISH LOCAL CONNECTION FOR USER: ac043s
EXEC /bin/sh -c '( umask 77 && mkdir -p "
echo /home/ac043s/.ansible/tmp/ansible-local-29214wabu3363
"&& mkdir "echo /home/ac043s/.ansible/tmp/ansible-local-29214wabu3363/ansible-tmp-1625602138.1041296-29252-272465699950870
" && echo ansible-tmp-1625602138.1041296-29252-272465699950870="echo /home/ac043s/.ansible/tmp/ansible-local-29214wabu3363/ansible-tmp-1625602138.1041296-29252-272465699950870
" ) && sleep 0'Using module file /home/ac043s/.ansible/collections/ansible_collections/juniper/device/plugins/modules/facts.py
PUT /home/ac043s/.ansible/tmp/ansible-local-29214wabu3363/tmpggveq12s TO /home/ac043s/.ansible/tmp/ansible-local-29214wabu3363/ansible-tmp-1625602138.1041296-29252-272465699950870/AnsiballZ_facts.py
EXEC /bin/sh -c 'chmod u+x /home/ac043s/.ansible/tmp/ansible-local-29214wabu3363/ansible-tmp-1625602138.1041296-29252-272465699950870/ /home/ac043s/.ansible/tmp/ansible-local-29214wabu3363/ansible-tmp-1625602138.1041296-29252-272465699950870/AnsiballZ_facts.py && sleep 0'
EXEC /bin/sh -c '/home/ac043s/python3-venv/bin/python /home/ac043s/.ansible/tmp/ansible-local-29214wabu3363/ansible-tmp-1625602138.1041296-29252-272465699950870/AnsiballZ_facts.py && sleep 0'
EXEC /bin/sh -c 'rm -f -r /home/ac043s/.ansible/tmp/ansible-local-29214wabu3363/ansible-tmp-1625602138.1041296-29252-272465699950870/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/home/ac043s/.ansible/tmp/ansible-local-29214wabu3363/ansible-tmp-1625602138.1041296-29252-272465699950870/AnsiballZ_facts.py", line 100, in
_ansiballz_main()
File "/home/ac043s/.ansible/tmp/ansible-local-29214wabu3363/ansible-tmp-1625602138.1041296-29252-272465699950870/AnsiballZ_facts.py", line 92, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/home/ac043s/.ansible/tmp/ansible-local-29214wabu3363/ansible-tmp-1625602138.1041296-29252-272465699950870/AnsiballZ_facts.py", line 40, in invoke_module
runpy.run_module(mod_name='ansible_collections.juniper.device.plugins.modules.facts', init_globals=dict(_module_fqn='ansible_collections.juniper.device.plugins.modules.facts', _modlib_path=modlib_path),
File "/usr/lib64/python3.8/runpy.py", line 207, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib64/python3.8/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/usr/lib64/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/tmp/ansible_facts_payload_0easwoi1/ansible_facts_payload.zip/ansible_collections/juniper/device/plugins/modules/facts.py", line 369, in
File "/tmp/ansible_facts_payload_0easwoi1/ansible_facts_payload.zip/ansible_collections/juniper/device/plugins/modules/facts.py", line 311, in main
File "/tmp/ansible_facts_payload_0easwoi1/ansible_facts_payload.zip/ansible_collections/juniper/device/plugins/module_utils/juniper_junos_common.py", line 611, in init
File "/tmp/ansible_facts_payload_0easwoi1/ansible_facts_payload.zip/ansible_collections/juniper/device/plugins/module_utils/juniper_junos_common.py", line 686, in get_connection
File "/tmp/ansible_facts_payload_0easwoi1/ansible_facts_payload.zip/ansible_collections/juniper/device/plugins/module_utils/juniper_junos_common.py", line 722, in fail_json
File "/tmp/ansible_facts_payload_0easwoi1/ansible_facts_payload.zip/ansible_collections/juniper/device/plugins/module_utils/juniper_junos_common.py", line 1164, in close_configuration
AttributeError: 'JuniperJunosModule' object has no attribute '_pyez_conn'
fatal: [ptr74-jdm]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File "/home/ac043s/.ansible/tmp/ansible-local-29214wabu3363/ansible-tmp-1625602138.1041296-29252-272465699950870/AnsiballZ_facts.py", line 100, in \n _ansiballz_main()\n File "/home/ac043s/.ansible/tmp/ansible-local-29214wabu3363/ansible-tmp-1625602138.1041296-29252-272465699950870/AnsiballZ_facts.py", line 92, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/home/ac043s/.ansible/tmp/ansible-local-29214wabu3363/ansible-tmp-1625602138.1041296-29252-272465699950870/AnsiballZ_facts.py", line 40, in invoke_module\n runpy.run_module(mod_name='ansible_collections.juniper.device.plugins.modules.facts', init_globals=dict(_module_fqn='ansible_collections.juniper.device.plugins.modules.facts', _modlib_path=modlib_path),\n File "/usr/lib64/python3.8/runpy.py", line 207, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File "/usr/lib64/python3.8/runpy.py", line 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File "/usr/lib64/python3.8/runpy.py", line 87, in _run_code\n exec(code, run_globals)\n File "/tmp/ansible_facts_payload_0easwoi1/ansible_facts_payload.zip/ansible_collections/juniper/device/plugins/modules/facts.py", line 369, in \n File "/tmp/ansible_facts_payload_0easwoi1/ansible_facts_payload.zip/ansible_collections/juniper/device/plugins/modules/facts.py", line 311, in main\n File "/tmp/ansible_facts_payload_0easwoi1/ansible_facts_payload.zip/ansible_collections/juniper/device/plugins/module_utils/juniper_junos_common.py", line 611, in init\n File "/tmp/ansible_facts_payload_0easwoi1/ansible_facts_payload.zip/ansible_collections/juniper/device/plugins/module_utils/juniper_junos_common.py", line 686, in get_connection\n File "/tmp/ansible_facts_payload_0easwoi1/ansible_facts_payload.zip/ansible_collections/juniper/device/plugins/module_utils/juniper_junos_common.py", line 722, in fail_json\n File "/tmp/ansible_facts_payload_0easwoi1/ansible_facts_payload.zip/ansible_collections/juniper/device/plugins/module_utils/juniper_junos_common.py", line 1164, in close_configuration\nAttributeError: 'JuniperJunosModule' object has no attribute '_pyez_conn'\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
PLAY RECAP ****************************************************************************************************************************************************************************************************
ptr74-jdm : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
`
The text was updated successfully, but these errors were encountered: