HewlettPackard / ilo-ansible-collection

Ansible Collection and Sample Playbooks for HPE iLO
Apache License 2.0
43 stars 23 forks source link

Module ilo_firmware : json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) #43

Open feloeht opened 2 months ago

feloeht commented 2 months ago

Hi,

When updating ilo with UpdateFirmwareWithUpload or FirmwareUpload, update is being processed by the server, but the ansible playbook abort with the following traceback.

fatal: [cdnedg502 -> localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"<stdin>\", line 107, in <module>\n File \"<stdin>\", line 99, in _ansiballz_main\n File \"<stdin>\", line 47, in invoke_module\n File \"<frozen runpy>\", line 226, in run_module\n File \"<frozen runpy>\", line 98, in _run_module_code\n File \"<frozen runpy>\", line 88, in _run_code\n File \"/var/folders/sc/62g8kr2n34dfmrvvgkg0m1v80000gn/T/ansible_hpe.ilo.ilo_firmware_payload_0sl5mlpa/ansible_hpe.ilo.ilo_firmware_payload.zip/ansible_collections/hpe/ilo/plugins/modules/ilo_firmware.py\", line 386, in <module>\n File \"/var/folders/sc/62g8kr2n34dfmrvvgkg0m1v80000gn/T/ansible_hpe.ilo.ilo_firmware_payload_0sl5mlpa/ansible_hpe.ilo.ilo_firmware_payload.zip/ansible_collections/hpe/ilo/plugins/modules/ilo_firmware.py\", line 363, in main\n File \"/var/folders/sc/62g8kr2n34dfmrvvgkg0m1v80000gn/T/ansible_hpe.ilo.ilo_firmware_payload_0sl5mlpa/ansible_hpe.ilo.ilo_firmware_payload.zip/ansible_collections/hpe/ilo/plugins/module_utils/ilo_oem_utils.py\", line 4096, in firmware_upgrade_with_upload\n File \"/opt/homebrew/Cellar/python@3.12/3.12.6/Frameworks/Python.framework/Versions/3.12/lib/python3.12/json/__init__.py\", line 346, in loads\n return _default_decoder.decode(s)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/opt/homebrew/Cellar/python@3.12/3.12.6/Frameworks/Python.framework/Versions/3.12/lib/python3.12/json/decoder.py\", line 337, in decode\n obj, end = self.raw_decode(s, idx=_w(s, 0).end())\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/opt/homebrew/Cellar/python@3.12/3.12.6/Frameworks/Python.framework/Versions/3.12/lib/python3.12/json/decoder.py\", line 355, in raw_decode\n raise JSONDecodeError(\"Expecting value\", s, err.value) from None\njson.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

I'm using the same code as the example : https://galaxy-stage.ansible.com/ui/repo/published/hpe/ilo/content/module/ilo_firmware/.

Ansible version:

ansible [core 2.17.4]
  config file = /Users/feloeht/ansible-dedale-cdn/ansible.cfg
  configured module search path = ['/Users/feloeht/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/homebrew/Cellar/ansible/10.4.0/libexec/lib/python3.12/site-packages/ansible
  ansible collection location = /Users/feloeht/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/homebrew/bin/ansible
  python version = 3.12.6 (main, Sep  6 2024, 19:03:47) [Clang 15.0.0 (clang-1500.3.9.4)] (/opt/homebrew/Cellar/ansible/10.4.0/libexec/bin/python)
  jinja version = 3.1.4
  libyaml = True

Any idea regarding a workaround ?

Thanks.

rajeevkallur commented 1 month ago

We are working on it.