Skip to content
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

[BUG]: Incompatible with pysnmp >6.2.2 #704

Closed
MallocArray opened this issue Jul 22, 2024 · 7 comments
Closed

[BUG]: Incompatible with pysnmp >6.2.2 #704

MallocArray opened this issue Jul 22, 2024 · 7 comments
Assignees
Labels
needs-triage Issue requires triage. type/bug Something isn't working
Milestone

Comments

@MallocArray
Copy link

MallocArray commented Jul 22, 2024

Bug Description

Dell playbooks failing after upgrading pysnmp to 6.2.2 - 6.2.4 but working with pysnmp 4.4.12

Opened issue with OMSDK repo as well
dell/omsdk#46

Component or Module Name

dellemc.openmanage.idrac_system_info

Ansible Version

2.16.9

Python Version

3.11

iDRAC/OME/OME-M version

iDRAC 7.00.00
MX740c blades

Operating System

Stream9 based Execution Environment

Playbook Used

    - name: Get system inventory
      dellemc.openmanage.idrac_system_info:
        idrac_ip: "{{ ansible_host }}"
        idrac_user: "{{ idrac_username }}"
        idrac_password: "{{ idrac_password }}"
        validate_certs: "{{ dell_validate_certs | default(omit) }}"
        ca_path: "{{ dell_ca_path | default(omit) }}"
      delegate_to: localhost
      tags: always
      register: idrac_system_info
      until: idrac_system_info is not failed
      retries: 0
      delay: 15

Logs

TASK [Get system inventory] *******************************************************************************************
task path: /runner/Dell/idrac/idrac_configuration.yml:23
ESTABLISH LOCAL CONNECTION FOR USER: root
EXEC /bin/sh -c 'echo ~root && sleep 0'
EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /root/.ansible/tmp"&& mkdir "echo /root/.ansible/tmp/ansible-tmp-1721674740.740452-903-140029397416120" && echo ansible-tmp-1721674740.740452-903-140029397416120="echo /root/.ansible/tmp/ansible-tmp-1721674740.740452-903-140029397416120" ) && sleep 0'
Using module file /runner/collections/ansible_collections/dellemc/openmanage/plugins/modules/idrac_system_info.py
PUT /root/.ansible/tmp/ansible-local-8692e_20hs7/tmpbrey9cjp TO /root/.ansible/tmp/ansible-tmp-1721674740.740452-903-140029397416120/AnsiballZ_idrac_system_info.py
EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1721674740.740452-903-140029397416120/ /root/.ansible/tmp/ansible-tmp-1721674740.740452-903-140029397416120/AnsiballZ_idrac_system_info.py && sleep 0'
EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1721674740.740452-903-140029397416120/AnsiballZ_idrac_system_info.py && sleep 0'
EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1721674740.740452-903-140029397416120/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/root/.ansible/tmp/ansible-tmp-1721674740.740452-903-140029397416120/AnsiballZ_idrac_system_info.py", line 107, in
_ansiballz_main()
File "/root/.ansible/tmp/ansible-tmp-1721674740.740452-903-140029397416120/AnsiballZ_idrac_system_info.py", line 99, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/root/.ansible/tmp/ansible-tmp-1721674740.740452-903-140029397416120/AnsiballZ_idrac_system_info.py", line 47, in invoke_module
runpy.run_module(mod_name='ansible_collections.dellemc.openmanage.plugins.modules.idrac_system_info', init_globals=dict(_module_fqn='ansible_collections.dellemc.openmanage.plugins.modules.idrac_system_info', _modlib_path=modlib_path),
File "", line 226, in run_module
File "", line 98, in _run_module_code
File "", line 88, in _run_code
File "/tmp/ansible_dellemc.openmanage.idrac_system_info_payload_1qk0etkl/ansible_dellemc.openmanage.idrac_system_info_payload.zip/ansible_collections/dellemc/openmanage/plugins/modules/idrac_system_info.py", line 121, in
File "/tmp/ansible_dellemc.openmanage.idrac_system_info_payload_1qk0etkl/ansible_dellemc.openmanage.idrac_system_info_payload.zip/ansible_collections/dellemc/openmanage/plugins/modules/idrac_system_info.py", line 106, in main
File "/tmp/ansible_dellemc.openmanage.idrac_system_info_payload_1qk0etkl/ansible_dellemc.openmanage.idrac_system_info_payload.zip/ansible_collections/dellemc/openmanage/plugins/module_utils/dellemc_idrac.py", line 86, in enter
File "/usr/local/lib/python3.11/site-packages/omsdk/sdkinfra.py", line 88, in importPath
module_loaded = self.load_from_file(fl[i])
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/omsdk/sdkinfra.py", line 61, in load_from_file
py_mod = load_module(mod_name, filepath, False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/omsdk/sdkinfra.py", line 43, in load_module
loader.exec_module(module)
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/usr/local/lib/python3.11/site-packages/omdrivers/iDRAC.py", line 1915, in
'SysObjectID' : ObjectIdentity('SNMPv2-MIB', 'sysObjectID'),
^^^^^^^^^^^^^^
NameError: name 'ObjectIdentity' is not defined

Steps to Reproduce

Run playbook with pysnmp 4.4.12 installed successfully

Upgrade to pysnmp 6.2.4 and run same playbook and receive the logs above

Expected Behavior

Playbook runs as expected

Actual Behavior

See logs for errors

Screenshots

No response

Additional Information

No response

@MallocArray MallocArray added needs-triage Issue requires triage. type/bug Something isn't working labels Jul 22, 2024
@MallocArray MallocArray changed the title [BUG]: Incompatible with pysnmp 6.2.4 [BUG]: Incompatible with pysnmp >6.2.2 Jul 22, 2024
@anupamaloke
Copy link
Collaborator

@MallocArray, thank you for submitting this issue. We are looking into this error and will keep everyone updated with a potential fix.

@vdudejon
Copy link

I found that updating omdrivers/iDRAC.py with from pysnmp.smi.rfc1902 import ObjectIdentity fixed the issue

@kitos9112
Copy link

We're pinning pysnmp to "6.1.3" in order to workaround this.

@angyaljanos
Copy link

Same error here, i tried to downgrade pysnmp to 4.4.12 but the error remains.
My packages follows:

❯ pip list
Package            Version
------------------ --------
certifi            2024.7.4
charset-normalizer 3.3.2
future             1.0.0
idna               3.7
ipaddress          1.0.23
Jinja2             3.1.4
MarkupSafe         2.1.5
netaddr            1.3.0
omsdk              1.2.513
pip                22.0.2
ply                3.11
pyasn1             0.6.0
pycryptodomex      3.20.0
pysmi              1.4.4
pysnmp             4.4.12
pysnmp-mibs        0.1.6
PyYAML             6.0.1
requests           2.32.3
setuptools         59.6.0
urllib3            2.2.2

@stf1966
Copy link

stf1966 commented Aug 7, 2024

I found that updating omdrivers/iDRAC.py with from pysnmp.smi.rfc1902 import ObjectIdentity fixed the issue

same for me. Thanks

@vdudejon
Copy link

vdudejon commented Sep 1, 2024

This should be resolved now with the latest release of the Dell OMSDK

@rajshekarp87 rajshekarp87 pinned this issue Sep 2, 2024
@rajshekarp87 rajshekarp87 unpinned this issue Sep 2, 2024
@rajshekarp87
Copy link
Contributor

@MallocArray,
This issue is fixed with latest release of OMSDK. Please find below the links:
GitHub: https://github.com/dell/omsdk
PyPI: https://pypi.org/project/omsdk/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Issue requires triage. type/bug Something isn't working
Projects
Development

No branches or pull requests

8 participants