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

same issue as issue 21. ilo_oem_utils.py line 4087 json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) #32

Open
kristyburns opened this issue Apr 10, 2024 · 0 comments

Comments

@kristyburns
Copy link

same issue as issue 21. I attached my yml files and host file
hosts.txt
ilo_redfish.txt
ilofwupdate.txt

ansible-playbook [core 2.15.9]
config file = /root/.ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.9/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible-playbook
python version = 3.9.18 (main, Sep 22 2023, 17:58:34) [GCC 8.5.0 20210514 (Red Hat 8.5.0-20)] (/usr/bin/python3.9)
jinja version = 3.1.3
libyaml = True
Using /root/.ansible.cfg as config file
host_list declined parsing /root/playbook/hosts as it did not pass its verify_file() method
script declined parsing /root/playbook/hosts as it did not pass its verify_file() method
auto declined parsing /root/playbook/hosts as it did not pass its verify_file() method
Parsed /root/playbook/hosts inventory source with ini plugin
Read vars_file 'ilo_redfish.yml'
Read vars_file 'ilo_redfish.yml'
Read vars_file 'ilo_redfish.yml'
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: ILOfwupdate.yml ***********************************************************************************************************************
1 plays in ILOfwupdate.yml
Read vars_file 'ilo_redfish.yml'
Read vars_file 'ilo_redfish.yml'
Read vars_file 'ilo_redfish.yml'

PLAY [ATL] **************************************************************************************************************************************
Read vars_file 'ilo_redfish.yml'
Read vars_file 'ilo_redfish.yml'
Read vars_file 'ilo_redfish.yml'

TASK [hpe.ilo.update_firmware_with_upload : Validate server authentication input provided by user] **********************************************
task path: /root/.ansible/collections/ansible_collections/hpe/ilo/roles/update_firmware_with_upload/tasks/main.yml:2
skipping: [10.10.198.234] => {
"changed": false,
"false_condition": "(username is not defined or password is not defined) and (cert_file is not defined or key_file is not defined) and (auth_token is not defined)",
"skip_reason": "Conditional result was False"
}
Read vars_file 'ilo_redfish.yml'

TASK [hpe.ilo.update_firmware_with_upload : Fail when more than one valid authentication method is provided] ************************************
task path: /root/.ansible/collections/ansible_collections/hpe/ilo/roles/update_firmware_with_upload/tasks/main.yml:8
skipping: [10.10.198.234] => {
"changed": false,
"false_condition": "((username is defined or password is defined) and (cert_file is defined or key_file is defined) and auth_token is defined) or ((username is defined or password is defined) and (cert_file is defined or key_file is defined)) or ((username is defined or password is defined) and auth_token is defined) or ((cert_file is defined or key_file is defined) and auth_token is defined)",
"skip_reason": "Conditional result was False"
}
Read vars_file 'ilo_redfish.yml'

TASK [hpe.ilo.update_firmware_with_upload : Perform firmware upgrade on the server using image uri when username and password are defined] ******
task path: /root/.ansible/collections/ansible_collections/hpe/ilo/roles/update_firmware_with_upload/tasks/main.yml:19
<10.10.198.234> ESTABLISH LOCAL CONNECTION FOR USER: root
<10.10.198.234> EXEC /bin/sh -c 'echo ~root && sleep 0'
<10.10.198.234> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /root/.ansible/tmp"&& mkdir "echo /root/.ansible/tmp/ansible-tmp-1712761993.7120252-107148-279675681118923" && echo ansible-tmp-1712761993.7120252-107148-279675681118923="echo /root/.ansible/tmp/ansible-tmp-1712761993.7120252-107148-279675681118923" ) && sleep 0'
Using module file /root/.ansible/collections/ansible_collections/hpe/ilo/plugins/modules/ilo_firmware.py
<10.10.198.234> PUT /root/.ansible/tmp/ansible-local-107140oe51cnak/tmpp6ttmdic TO /root/.ansible/tmp/ansible-tmp-1712761993.7120252-107148-279675681118923/AnsiballZ_ilo_firmware.py
<10.10.198.234> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1712761993.7120252-107148-279675681118923/ /root/.ansible/tmp/ansible-tmp-1712761993.7120252-107148-279675681118923/AnsiballZ_ilo_firmware.py && sleep 0'
<10.10.198.234> EXEC /bin/sh -c '/usr/bin/env python /root/.ansible/tmp/ansible-tmp-1712761993.7120252-107148-279675681118923/AnsiballZ_ilo_firmware.py && sleep 0'
<10.10.198.234> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1712761993.7120252-107148-279675681118923/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/root/.ansible/tmp/ansible-tmp-1712761993.7120252-107148-279675681118923/AnsiballZ_ilo_firmware.py", line 107, in
_ansiballz_main()
File "/root/.ansible/tmp/ansible-tmp-1712761993.7120252-107148-279675681118923/AnsiballZ_ilo_firmware.py", line 99, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/root/.ansible/tmp/ansible-tmp-1712761993.7120252-107148-279675681118923/AnsiballZ_ilo_firmware.py", line 47, in invoke_module
runpy.run_module(mod_name='ansible_collections.hpe.ilo.plugins.modules.ilo_firmware', init_globals=dict(_module_fqn='ansible_collections.hpe.ilo.plugins.modules.ilo_firmware', _modlib_path=modlib_path),
File "/usr/lib64/python3.9/runpy.py", line 225, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib64/python3.9/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/tmp/ansible_ilo_firmware_payload_tzs5cnwq/ansible_ilo_firmware_payload.zip/ansible_collections/hpe/ilo/plugins/modules/ilo_firmware.py", line 386, in
File "/tmp/ansible_ilo_firmware_payload_tzs5cnwq/ansible_ilo_firmware_payload.zip/ansible_collections/hpe/ilo/plugins/modules/ilo_firmware.py", line 363, in main
File "/tmp/ansible_ilo_firmware_payload_tzs5cnwq/ansible_ilo_firmware_payload.zip/ansible_collections/hpe/ilo/plugins/module_utils/ilo_oem_utils.py", line 4087, in firmware_upgrade_with_upload
File "/usr/lib64/python3.9/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
fatal: [10.10.198.234]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File "/root/.ansible/tmp/ansible-tmp-1712761993.7120252-107148-279675681118923/AnsiballZ_ilo_firmware.py", line 107, in \n _ansiballz_main()\n File "/root/.ansible/tmp/ansible-tmp-1712761993.7120252-107148-279675681118923/AnsiballZ_ilo_firmware.py", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/root/.ansible/tmp/ansible-tmp-1712761993.7120252-107148-279675681118923/AnsiballZ_ilo_firmware.py", line 47, in invoke_module\n runpy.run_module(mod_name='ansible_collections.hpe.ilo.plugins.modules.ilo_firmware', init_globals=dict(_module_fqn='ansible_collections.hpe.ilo.plugins.modules.ilo_firmware', _modlib_path=modlib_path),\n File "/usr/lib64/python3.9/runpy.py", line 225, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File "/usr/lib64/python3.9/runpy.py", line 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code\n exec(code, run_globals)\n File "/tmp/ansible_ilo_firmware_payload_tzs5cnwq/ansible_ilo_firmware_payload.zip/ansible_collections/hpe/ilo/plugins/modules/ilo_firmware.py", line 386, in \n File "/tmp/ansible_ilo_firmware_payload_tzs5cnwq/ansible_ilo_firmware_payload.zip/ansible_collections/hpe/ilo/plugins/modules/ilo_firmware.py", line 363, in main\n File "/tmp/ansible_ilo_firmware_payload_tzs5cnwq/ansible_ilo_firmware_payload.zip/ansible_collections/hpe/ilo/plugins/module_utils/ilo_oem_utils.py", line 4087, in firmware_upgrade_with_upload\n File "/usr/lib64/python3.9/json/init.py", line 346, in loads\n return _default_decoder.decode(s)\n File "/usr/lib64/python3.9/json/decoder.py", line 337, in decode\n obj, end = self.raw_decode(s, idx=_w(s, 0).end())\n File "/usr/lib64/python3.9/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": " KBKBKB Data = <http.client.HTTPResponse object at 0x7fb8fbf7f250>\n",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}

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

1 participant