IBM / ansible-power-hmc

Developer contributions for Ansible Automation on Power (HMC)
GNU General Public License v3.0
26 stars 41 forks source link

hmc_update_upgrade module is failing for a fully patched HMC #130

Open christophegehin opened 3 months ago

christophegehin commented 3 months ago

Describe the bug My hmc is fully patched, when I run hmc_update_upgrade to list ptf, module is failing

To Reproduce Execute that task :

Expected behavior No error and the module should "tell" me : no ptf needed

Screenshots The full traceback is: Traceback (most recent call last): File "/tmp/ansible_ibm.power_hmc.hmc_update_upgrade_payload_g__xq9fj/ansible_ibm.power_hmc.hmc_update_upgrade_payload.zip/ansible_collections/ibm/power_hmc/plugins/module_utils/hmc_command_stack.py", line 558, in parseCSV ValueError: not enough values to unpack (expected 2, got 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/ansible/.ansible/tmp/ansible-tmp-1721991039.9847183-1907174-248505196513996/AnsiballZ_hmc_update_upgrade.py", line 107, in _ansiballz_main() File "/home/ansible/.ansible/tmp/ansible-tmp-1721991039.9847183-1907174-248505196513996/AnsiballZ_hmc_update_upgrade.py", line 99, in _ansiballz_main invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS) File "/home/ansible/.ansible/tmp/ansible-tmp-1721991039.9847183-1907174-248505196513996/AnsiballZ_hmc_update_upgrade.py", line 48, in invoke_module run_name='main', alter_sys=True) File "/usr/lib64/python3.6/runpy.py", line 205, in run_module return _run_module_code(code, init_globals, run_name, mod_spec) File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code mod_name, mod_spec, pkg_name, script_name) File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/tmp/ansible_ibm.power_hmc.hmc_update_upgrade_payload_gxq9fj/ansible_ibm.power_hmc.hmc_update_upgrade_payload.zip/ansible_collections/ibm/power_hmc/plugins/modules/hmc_update_upgrade.py", line 690, in File "/tmp/ansible_ibm.power_hmc.hmc_update_upgrade_payload_g__xq9fj/ansible_ibm.power_hmc.hmc_update_upgrade_payload.zip/ansible_collections/ibm/power_hmc/plugins/modules/hmc_update_upgrade.py", line 686, in main File "/tmp/ansible_ibm.power_hmc.hmc_update_upgrade_payload_gxq9fj/ansible_ibm.power_hmc.hmc_update_upgrade_payload.zip/ansible_collections/ibm/power_hmc/plugins/modules/hmc_update_upgrade.py", line 671, in run_module File "/tmp/ansible_ibm.power_hmc.hmc_update_upgrade_payload_gxq9fj/ansible_ibm.power_hmc.hmc_update_upgrade_payload.zip/ansible_collections/ibm/power_hmc/plugins/modules/hmc_update_upgrade.py", line 607, in perform_task File "/tmp/ansible_ibm.power_hmc.hmc_update_upgrade_payload_gxq9fj/ansible_ibm.power_hmc.hmc_update_upgrade_payload.zip/ansible_collections/ibm/power_hmc/plugins/modules/hmc_update_upgrade.py", line 402, in list_ptf File "/tmp/ansible_ibm.power_hmc.hmc_update_upgrade_payload_gxq9fj/ansible_ibm.power_hmc.hmc_update_upgrade_payload.zip/ansible_collections/ibm/power_hmc/plugins/module_utils/hmc_resource.py", line 178, in listHMCPTF File "/tmp/ansible_ibm.power_hmc.hmc_update_upgrade_payload_gxq9fj/ansible_ibm.power_hmc.hmc_update_upgrade_payload.zip/ansible_collections/ibm/power_hmc/plugins/module_utils/hmc_command_stack.py", line 594, in parseMultiLineCSV File "/tmp/ansible_ibm.power_hmc.hmc_update_upgrade_payload_gxq9fj/ansible_ibm.power_hmc.hmc_update_upgrade_payload.zip/ansible_collections/ibm/power_hmc/plugins/module_utils/hmc_command_stack.py", line 580, in parseCSV KeyError: '' fatal: [labhmc342]: FAILED! => { "ansible_facts": { "discovered_interpreter_python": "/usr/libexec/platform-python" }, "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_ibm.power_hmc.hmc_update_upgrade_payload_g__xq9fj/ansible_ibm.power_hmc.hmc_update_upgrade_payload.zip/ansible_collections/ibm/power_hmc/plugins/module_utils/hmc_command_stack.py\", line 558, in parseCSV\nValueError: not enough values to unpack (expected 2, got 1)\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"/home/ansible/.ansible/tmp/ansible-tmp-1721991039.9847183-1907174-248505196513996/AnsiballZ_hmc_update_upgrade.py\", line 107, in \n _ansiballz_main()\n File \"/home/ansible/.ansible/tmp/ansible-tmp-1721991039.9847183-1907174-248505196513996/AnsiballZ_hmc_update_upgrade.py\", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/ansible/.ansible/tmp/ansible-tmp-1721991039.9847183-1907174-248505196513996/AnsiballZ_hmc_update_upgrade.py\", line 48, in invoke_module\n run_name='main', alter_sys=True)\n File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_ibm.power_hmc.hmc_update_upgrade_payload_gxq9fj/ansible_ibm.power_hmc.hmc_update_upgrade_payload.zip/ansible_collections/ibm/power_hmc/plugins/modules/hmc_update_upgrade.py\", line 690, in \n File \"/tmp/ansible_ibm.power_hmc.hmc_update_upgrade_payload_gxq9fj/ansible_ibm.power_hmc.hmc_update_upgrade_payload.zip/ansible_collections/ibm/power_hmc/plugins/modules/hmc_update_upgrade.py\", line 686, in main\n File \"/tmp/ansible_ibm.power_hmc.hmc_update_upgrade_payload_gxq9fj/ansible_ibm.power_hmc.hmc_update_upgrade_payload.zip/ansible_collections/ibm/power_hmc/plugins/modules/hmc_update_upgrade.py\", line 671, in run_module\n File \"/tmp/ansible_ibm.power_hmc.hmc_update_upgrade_payload_gxq9fj/ansible_ibm.power_hmc.hmc_update_upgrade_payload.zip/ansible_collections/ibm/power_hmc/plugins/modules/hmc_update_upgrade.py\", line 607, in perform_task\n File \"/tmp/ansible_ibm.power_hmc.hmc_update_upgrade_payload_gxq9fj/ansible_ibm.power_hmc.hmc_update_upgrade_payload.zip/ansible_collections/ibm/power_hmc/plugins/modules/hmc_update_upgrade.py\", line 402, in list_ptf\n File \"/tmp/ansible_ibm.power_hmc.hmc_update_upgrade_payload_gxq9fj/ansible_ibm.power_hmc.hmc_update_upgrade_payload.zip/ansible_collections/ibm/power_hmc/plugins/module_utils/hmc_resource.py\", line 178, in listHMCPTF\n File \"/tmp/ansible_ibm.power_hmc.hmc_update_upgrade_payload_gxq9fj/ansible_ibm.power_hmc.hmc_update_upgrade_payload.zip/ansible_collections/ibm/power_hmc/plugins/module_utils/hmc_command_stack.py\", line 594, in parseMultiLineCSV\n File \"/tmp/ansible_ibm.power_hmc.hmc_update_upgrade_payload_g__xq9fj/ansible_ibm.power_hmc.hmc_update_upgrade_payload.zip/ansible_collections/ibm/power_hmc/plugins/module_utils/hmc_command_stack.py\", line 580, in parseCSV\nKeyError: ''\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1 }

Environment (please complete the following information): HMC : "version= Version: 10 Release: 3 Service Pack: 1060 HMC Build level 2406191052 MF71422 - iFix for HMC V10R3 M1050 MF71553 - HMC V10R3 M1051 MF71686 - iFix for HMC V10R3 M1051 MF71688 - iFix for HMC V10R3 M1051 MF71690 - HMC V10R3 M1060 MF71698 - iFix for HMC V10R3 M1060 ","base_version=V10R3

Python Version : 3.11.9 Open ssh : openssh-server-8.0p1-24.el8.x86_64 HMC collection : 1.9.0 ansible-core : 2.15.6

Additional context Add any other context about the problem here.