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

emgr list fails with 'IndexError: list index out of range' #594

Open
santhoshtt opened this issue Jan 9, 2025 · 2 comments
Open

emgr list fails with 'IndexError: list index out of range' #594

santhoshtt opened this issue Jan 9, 2025 · 2 comments
Assignees

Comments

@santhoshtt
Copy link

Describe the bug

Below emgr module errors out with "IndexError: list index out of range"

ibm.power_aix.emgr:
action: list
become: true
become_user: root
register: results

error:
{msg=MODULE FAILURE
See stdout/stderr for the exact error, rc=1, module_stdout=Traceback (most recent call last):
File "/var/tmp/.ansible-a_aaasophia3/tmp/ansible-tmp-1736415922.8769765-27559-202457549355476/AnsiballZ_emgr.py", line 107, in
_ansiballz_main()
File "/var/tmp/.ansible-a_aaasophia3/tmp/ansible-tmp-1736415922.8769765-27559-202457549355476/AnsiballZ_emgr.py", line 99, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/var/tmp/.ansible-a_aaasophia3/tmp/ansible-tmp-1736415922.8769765-27559-202457549355476/AnsiballZ_emgr.py", line 47, in invoke_module
runpy.run_module(mod_name='ansible_collections.ibm.power_aix.plugins.modules.emgr', init_globals=dict(_module_fqn='ansible_collections.ibm.power_aix.plugins.modules.emgr', _modlib_path=modlib_path),
File "/usr/opt/python3/lib/python3.9/runpy.py", line 225, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/opt/python3/lib/python3.9/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/usr/opt/python3/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/tmp/ansible_ibm.power_aix.emgr_payload_8v8xb4ve/ansible_ibm.power_aix.emgr_payload.zip/ansible_collections/ibm/power_aix/plugins/modules/emgr.py", line 599, in
File "/tmp/ansible_ibm.power_aix.emgr_payload_8v8xb4ve/ansible_ibm.power_aix.emgr_payload.zip/ansible_collections/ibm/power_aix/plugins/modules/emgr.py", line 590, in main
File "/tmp/ansible_ibm.power_aix.emgr_payload_8v8xb4ve/ansible_ibm.power_aix.emgr_payload.zip/ansible_collections/ibm/power_aix/plugins/modules/emgr.py", line 326, in parse_ifix_details
IndexError: list index out of range

To Reproduce
Steps to reproduce the behavior:

  1. Create ansible task with below
    ibm.power_aix.emgr:
    action: list
    become: true
    become_user: root
    register: results

  2. task run display above mentioned error

Expected behavior
List of installed ifixes on target

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: [ AIX 7300-02-01-2346]
  • Python Version: [2.7.10 and 3.9.18]
  • OpenSSH Version: [ 8.1.112.2000]
  • Ansible Version: [ 2.10.7]
  • AIX Collection Version: [1.6.4]

Additional context
There are ifixes installed on the target AIX instance.

@schamola
Copy link
Contributor

Hi @santhoshtt
Thanks for raising the issue.
We will look into it and get back to you !

@vivekpandeyibm
Copy link
Contributor

Hi @santhoshtt

We are not able to recreate this issue on our system , it seems we are missing some corner cases.
Can you please provide the output of emgr -l?
Also, it is recommended to use the latest version of the power_aix collection for better performance and usability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants