Closed simon3270 closed 2 years ago
Files identified in the description:
plugins/modules/s3_logging.py
](https://github.com/['ansible-collections/amazon.aws', 'ansible-collections/community.aws', 'ansible-collections/community.vmware']/blob/main/plugins/modules/s3_logging.py)If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
cc @jillr @markuman @s-hertel @tremble click here for bot help
@simon3270,
Thanks for taking the time to open this issue.
Looking at the output of ansible-galaxy collection list
that you provided it looks like you're using a much older version of the collections than you think you are. Specifically:
amazon.aws 1.4.0
community.aws 1.3.0
The stack trace you provided also mentions site-packages/boto/s3/bucket.py
this is the original AWS Python SDK (boto). With community.aws 1.5.0 we removed the last of the code from s3_logging
which used the boto SDK, migrating over to boto3/botocore. This would reinforce the implication that you're not using 3.0.1.
Please could you try re-installing the collection to update the version of the code you're using.
Thanks for the quick reply, @tremble :-)
My original code worked fine up until 24th January but then started throwing the XML error. This was about when 3.0.0 dropped, so my initial thought was that the 3.x.x version was a problem, so try the latest 2.x.x one (2.2.0). When I had added a call to ansible-galaxy collection install -r requirements.yml
, where requirements.yml had community.aws
in it at version 2.2.0, the code worked. I now think that it worked not because I was avoiding 3.x.x, but because I was no longer using the old 1.3.0! To test this, I tried again with 3.0.1 and all was OK.
With 3.0.1 being used, the collection list looks like this, with the extra local section at the top:
+ ansible-galaxy collection list
# /home/jenkins/.ansible/collections/ansible_collections
Collection Version
------------- -------
amazon.aws 3.0.0
community.aws 3.0.1
# /opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/ansible_collections
Collection Version
------------------------- -------
amazon.aws 1.4.0
...
community.aws 1.3.0
I think we can now close this issue, and I'll get back to my Jenkins administrators and try to get a more up-to-date base image to get more recent versions of some of the other collections.
Thanks again, Simon
Summary
When I try to set up server logging from a new S3 bucket, an XML error is thrown in v3.0.1. Exactly the same code works when I
ansible-galaxy install
v2.2.0.The call below follows a successful call to
aws_s3_bucket_info
.Issue Type
Bug Report
Component Name
s3_logging
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
RHEL 8.4
Steps to Reproduce
Expected Results
I expected sever logging to be enabled to the specified target bucket and logging prefix.
Actual Results
Code of Conduct