-
Notifications
You must be signed in to change notification settings - Fork 342
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
S3 behavior changed when KMS encryption requested with no Key ID #1473
Comments
@joshriverscambia2019 it looks to me like if |
The only thing I can add to what @hakbailey already said is that we can probably slightly increase the number of attempts here amazon.aws/plugins/modules/s3_bucket.py Line 819 in 68a36b2
The API may be slow which is why it may take longer to update. But this is only a supposition! |
I think by the time this error is seen we're in the |
Sorry for the slow reply, as I was out for a few days. Specifically, this issue was occurring while trying to "update" an existing bucket with kms set up with the account key. Running the module against that existing configuration failed as noted and we needed to re-code our role to allow it to function. I don't believe this is worth spending a lot of effort on, but I wanted to get it reported to improve the overall reliability. |
@joshriverscambia2019 thank you for reporting the issue, we appreciate it! So just to make sure I understand the scenario: you have an existing bucket that uses kms encryption with a customer-managed key, and when you try to update it to use an AWS-managed key (passing no |
@hakbailey Yes. That is the failure I ran into. Modifying the code to set |
@joshriverscambia2019 hmm. I'm still not able to recreate this error. The following worked fine:
Are there other details about the existing bucket that I'm missing? |
@hakbailey I can't reproduce it anymore either. Same versions and runtime environment, but I am not getting the "Bucket encryption failed to apply in the expected time" message anymore. My initial failures were spaced over 6 hours before I modified the code to Running a test playbook now has the bucket moving between algorithms without a hitch:
goes to
and back. There's some mystery here, but not an interesting one. Looks like things are functioning correctly now and there is no need to fix things in the Ansible module. |
@joshriverscambia2019 well I'm glad your issue was solved! Thanks for confirming. |
…ections#1473) tests/acm_certificate: retries aws_acm_info called when needed The aws_acm_info may return an empty list if a certificate has just been recreated (race condition). We now retry 3 times until we've got a list.
…ansible-collections#1467) tests/integration: ensure the CI gives more time to some slow targets Depends-On: ansible/ansible-zuul-jobs#1625 Depends-On: ansible-collections#1468 Depends-On: ansible-collections#1473 Reviewed-by: Mark Chappell <None>
…ections#1473) tests/acm_certificate: retries aws_acm_info called when needed The aws_acm_info may return an empty list if a certificate has just been recreated (race condition). We now retry 3 times until we've got a list. This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@c7510c2
…ansible-collections#1467) tests/integration: ensure the CI gives more time to some slow targets Depends-On: ansible/ansible-zuul-jobs#1625 Depends-On: ansible-collections#1468 Depends-On: ansible-collections#1473 Reviewed-by: Mark Chappell <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@19a24e5
…ections#1473) tests/acm_certificate: retries aws_acm_info called when needed The aws_acm_info may return an empty list if a certificate has just been recreated (race condition). We now retry 3 times until we've got a list. This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@c7510c2
…ansible-collections#1467) tests/integration: ensure the CI gives more time to some slow targets Depends-On: ansible/ansible-zuul-jobs#1625 Depends-On: ansible-collections#1468 Depends-On: ansible-collections#1473 Reviewed-by: Mark Chappell <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@19a24e5
…ansible-collections#1467) tests/integration: ensure the CI gives more time to some slow targets Depends-On: ansible/ansible-zuul-jobs#1625 Depends-On: ansible-collections#1468 Depends-On: ansible-collections#1473 Reviewed-by: Mark Chappell <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@19a24e5
…ansible-collections#1467) tests/integration: ensure the CI gives more time to some slow targets Depends-On: ansible/ansible-zuul-jobs#1625 Depends-On: ansible-collections#1468 Depends-On: ansible-collections#1473 Reviewed-by: Mark Chappell <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@19a24e5
…ansible-collections#1467) tests/integration: ensure the CI gives more time to some slow targets Depends-On: ansible/ansible-zuul-jobs#1625 Depends-On: ansible-collections#1468 Depends-On: ansible-collections#1473 Reviewed-by: Mark Chappell <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@19a24e5
…ansible-collections#1467) tests/integration: ensure the CI gives more time to some slow targets Depends-On: ansible/ansible-zuul-jobs#1625 Depends-On: ansible-collections#1468 Depends-On: ansible-collections#1473 Reviewed-by: Mark Chappell <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@19a24e5
…ansible-collections#1467) tests/integration: ensure the CI gives more time to some slow targets Depends-On: ansible/ansible-zuul-jobs#1625 Depends-On: ansible-collections#1468 Depends-On: ansible-collections#1473 Reviewed-by: Mark Chappell <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@19a24e5
…ansible-collections#1467) tests/integration: ensure the CI gives more time to some slow targets Depends-On: ansible/ansible-zuul-jobs#1625 Depends-On: ansible-collections#1468 Depends-On: ansible-collections#1473 Reviewed-by: Mark Chappell <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@19a24e5
…ansible-collections#1467) tests/integration: ensure the CI gives more time to some slow targets Depends-On: ansible/ansible-zuul-jobs#1625 Depends-On: ansible-collections#1468 Depends-On: ansible-collections#1473 Reviewed-by: Mark Chappell <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@19a24e5
…ansible-collections#1467) tests/integration: ensure the CI gives more time to some slow targets Depends-On: ansible/ansible-zuul-jobs#1625 Depends-On: ansible-collections#1468 Depends-On: ansible-collections#1473 Reviewed-by: Mark Chappell <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@19a24e5
…ansible-collections#1467) tests/integration: ensure the CI gives more time to some slow targets Depends-On: ansible/ansible-zuul-jobs#1625 Depends-On: ansible-collections#1468 Depends-On: ansible-collections#1473 Reviewed-by: Mark Chappell <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@19a24e5
…ansible-collections#1467) tests/integration: ensure the CI gives more time to some slow targets Depends-On: ansible/ansible-zuul-jobs#1625 Depends-On: ansible-collections#1468 Depends-On: ansible-collections#1473 Reviewed-by: Mark Chappell <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@19a24e5
…ansible-collections#1467) tests/integration: ensure the CI gives more time to some slow targets Depends-On: ansible/ansible-zuul-jobs#1625 Depends-On: ansible-collections#1468 Depends-On: ansible-collections#1473 Reviewed-by: Mark Chappell <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@19a24e5
…ansible-collections#1467) tests/integration: ensure the CI gives more time to some slow targets Depends-On: ansible/ansible-zuul-jobs#1625 Depends-On: ansible-collections#1468 Depends-On: ansible-collections#1473 Reviewed-by: Mark Chappell <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@19a24e5
…ansible-collections#1467) tests/integration: ensure the CI gives more time to some slow targets Depends-On: ansible/ansible-zuul-jobs#1625 Depends-On: ansible-collections#1468 Depends-On: ansible-collections#1473 Reviewed-by: Mark Chappell <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@19a24e5
…ansible-collections#1467) tests/integration: ensure the CI gives more time to some slow targets Depends-On: ansible/ansible-zuul-jobs#1625 Depends-On: ansible-collections#1468 Depends-On: ansible-collections#1473 Reviewed-by: Mark Chappell <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@19a24e5
…ansible-collections#1467) tests/integration: ensure the CI gives more time to some slow targets Depends-On: ansible/ansible-zuul-jobs#1625 Depends-On: ansible-collections#1468 Depends-On: ansible-collections#1473 Reviewed-by: Mark Chappell <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@19a24e5
…ansible-collections#1467) tests/integration: ensure the CI gives more time to some slow targets Depends-On: ansible/ansible-zuul-jobs#1625 Depends-On: ansible-collections#1468 Depends-On: ansible-collections#1473 Reviewed-by: Mark Chappell <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@19a24e5
…ansible-collections#1467) tests/integration: ensure the CI gives more time to some slow targets Depends-On: ansible/ansible-zuul-jobs#1625 Depends-On: ansible-collections#1468 Depends-On: ansible-collections#1473 Reviewed-by: Mark Chappell <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@19a24e5
…ansible-collections#1467) tests/integration: ensure the CI gives more time to some slow targets Depends-On: ansible/ansible-zuul-jobs#1625 Depends-On: ansible-collections#1468 Depends-On: ansible-collections#1473 Reviewed-by: Mark Chappell <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@19a24e5
Summary
As noted in https://github.com/ansible-collections/amazon.aws/blob/main/plugins/modules/s3_bucket.py#L64 AWS no longer supports disabling encryption for new S3 buckets.
Additionally, if
encryption: aws:kms
is requested without an explicitencryption_key_id
, the bucket will be configured withAES256
encryption. This can cause deployment to fail inwait_encryption_is_applied
as the state never aligns with the request.This is a minor behavior bug, but can be a little tricky to comprehend the failure. It might be worth either;
encryption: aws:kms
from being specified withoutencryption_key_id
.Issue Type
Bug Report
Component Name
amazon.aws.s3_bucket
Ansible Version
$ ansible --version
ansible [core 2.14.4]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /root/.local/pipx/venvs/ansible/lib/python3.9/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /root/.local/bin/ansible
python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] (/root/.local/pipx/venvs/ansible/bin/python)
jinja version = 3.1.2
libyaml = True
Collection Versions
AWS SDK versions
Configuration
OS / Environment
Debialn Bullseye
Steps to Reproduce
Expected Results
Expected success.
Actual Results
fatal: [localhost]: FAILED! => {"changed": false, "live_encryption": {"SSEAlgorithm": "AES256"}, "msg": "Bucket encryption failed to apply in the expected time", "requested_encryption": {"SSEAlgorithm": "aws:kms"}}
Code of Conduct
The text was updated successfully, but these errors were encountered: