-
Notifications
You must be signed in to change notification settings - Fork 348
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
Module s3_object_info returns KeyError: 'mode' and other python errors #1287
Comments
Files identified in the description:
If these files are inaccurate, please update the |
Hi @gianmarco-mameli This issue has been fixed by this PR. I am closing this issue as the fix is available and is yet to be released. You can test your playbook with this fix and if you still see the failure, please reopen this issue. Thank you! |
Hi @GomathiselviS, sorry for my late feedback, it works if I clone the repo as collection in my environment. Any news about the release of the update collection via galaxy install? |
Hi @gianmarco-mameli, Thank you for the feedback. We plan to release the updated collection by the end of January or early February 2023. |
This is still happening in Thanks in advance. |
Hi, the problem is present in version 5.2, in my previous reply I confirmed the problem is not present if i clone the repo replacing the collection installed via Galaxy. So we have to wait the release of the next version containg the correction. |
Summary
Hi, I'm trying to retrieve an object info from a bucket on Minio instance using the module s3_object_info, but invocation gives me this errors
All works using the s3_object module with same url, access keys and bucket
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: KeyError: 'mode' fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/home/user/.ansible/tmp/ansible-tmp-1669367381.0905936-1417250-99374402727793/AnsiballZ_s3_object_info.py\", line 107, in <module>\n _ansiballz_main()\n File \"/home/user/.ansible/tmp/ansible-tmp-1669367381.0905936-1417250-99374402727793/AnsiballZ_s3_object_info.py\", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/user/.ansible/tmp/ansible-tmp-1669367381.0905936-1417250-99374402727793/AnsiballZ_s3_object_info.py\", line 47, in invoke_module\n runpy.run_module(mod_name='ansible_collections.amazon.aws.plugins.modules.s3_object_info', init_globals=dict(_module_fqn='ansible_collections.amazon.aws.plugins.modules.s3_object_info', _modlib_path=modlib_path),\n File \"/usr/lib/python3.9/runpy.py\", line 210, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib/python3.9/runpy.py\", line 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File \"/usr/lib/python3.9/runpy.py\", line 87, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_amazon.aws.s3_object_info_payload_fmhmtd7f/ansible_amazon.aws.s3_object_info_payload.zip/ansible_collections/amazon/aws/plugins/modules/s3_object_info.py\", line 818, in <module>\n File \"/tmp/ansible_amazon.aws.s3_object_info_payload_fmhmtd7f/ansible_amazon.aws.s3_object_info_payload.zip/ansible_collections/amazon/aws/plugins/modules/s3_object_info.py\", line 780, in main\n File \"/tmp/ansible_amazon.aws.s3_object_info_payload_fmhmtd7f/ansible_amazon.aws.s3_object_info_payload.zip/ansible_collections/amazon/aws/plugins/modules/s3_object_info.py\", line 703, in get_s3_connection\nKeyError: 'mode'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
Issue Type
Bug Report
Component Name
s3_object_info
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
Debian 11.5
Steps to Reproduce
Expected Results
The variable object_info populated retrieving from object on Minio
Actual Results
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: KeyError: 'mode' fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/home/user/.ansible/tmp/ansible-tmp-1669367381.0905936-1417250-99374402727793/AnsiballZ_s3_object_info.py\", line 107, in <module>\n _ansiballz_main()\n File \"/home/user/.ansible/tmp/ansible-tmp-1669367381.0905936-1417250-99374402727793/AnsiballZ_s3_object_info.py\", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/user/.ansible/tmp/ansible-tmp-1669367381.0905936-1417250-99374402727793/AnsiballZ_s3_object_info.py\", line 47, in invoke_module\n runpy.run_module(mod_name='ansible_collections.amazon.aws.plugins.modules.s3_object_info', init_globals=dict(_module_fqn='ansible_collections.amazon.aws.plugins.modules.s3_object_info', _modlib_path=modlib_path),\n File \"/usr/lib/python3.9/runpy.py\", line 210, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib/python3.9/runpy.py\", line 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File \"/usr/lib/python3.9/runpy.py\", line 87, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_amazon.aws.s3_object_info_payload_fmhmtd7f/ansible_amazon.aws.s3_object_info_payload.zip/ansible_collections/amazon/aws/plugins/modules/s3_object_info.py\", line 818, in <module>\n File \"/tmp/ansible_amazon.aws.s3_object_info_payload_fmhmtd7f/ansible_amazon.aws.s3_object_info_payload.zip/ansible_collections/amazon/aws/plugins/modules/s3_object_info.py\", line 780, in main\n File \"/tmp/ansible_amazon.aws.s3_object_info_payload_fmhmtd7f/ansible_amazon.aws.s3_object_info_payload.zip/ansible_collections/amazon/aws/plugins/modules/s3_object_info.py\", line 703, in get_s3_connection\nKeyError: 'mode'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
Code of Conduct
The text was updated successfully, but these errors were encountered: