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

[PR #1428/fa58965f backport][stable-4] Fix detection of ssm connection bucket region #1563

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Oct 18, 2022

This is a backport of PR #1428 as merged into main (fa58965).

Fix detection of ssm connection bucket region by ensuring that the boto client is created normally and able to use supported credential sources

SUMMARY

PR #1176 introduced detection of an S3 bucket's region to handle cases where the bucket is in a different region than the SSM connection itself. This change did not use the preferred mechanism for creating client objects, which caused it to not have access to credentials from all supported sources. It also broke the ability to use this plugin in partitions other than aws. (e.g. aws-us-gov).

This change fixes this by building the bucket location client using _get_boto_client and the region for the connection to ensure it is both getting the proper credentials and starting in a region from the same partition as the client itself. From the default global region (or a hard-coded region), it will detect the bucket's region and continue S3 API calls using the bucket's own region.

Fixes bug introduced from #1176
Fixes #1413

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

aws_ssm connection plugin

Fix detection of ssm connection bucket region

Fix detection of ssm connection bucket region by ensuring that the boto client is created normally and able to use supported credential sources
SUMMARY
PR #1176 introduced detection of an S3 bucket's region to handle cases where the bucket is in a different region than the SSM connection itself. This change did not use the preferred mechanism for creating client objects, which caused it to not have access to credentials from all supported sources. It also broke the ability to use this plugin in partitions other than aws. (e.g. aws-us-gov).
This change fixes this by building the bucket location client using _get_boto_client and the region for the connection to ensure it is both getting the proper credentials and starting in a region from the same partition as the client itself. From the default global region (or a hard-coded region), it will detect the bucket's region and continue S3 API calls using the bucket's own region.
Fixes bug introduced from #1176
Fixes #1413
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
aws_ssm connection plugin

Reviewed-by: Markus Bergholz <git@osuv.de>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: Mark Chappell <None>
(cherry picked from commit fa58965)
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ ansible-galaxy-importer SUCCESS in 6m 26s
✔️ build-ansible-collection SUCCESS in 5m 27s
ansible-test-sanity-docker-devel FAILURE in 8m 34s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 9m 13s
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 11m 13s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 37s
ansible-test-sanity-docker-stable-2.14 FAILURE in 10m 18s (non-voting)
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 6m 34s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 7m 58s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 37s
✔️ ansible-test-splitter SUCCESS in 2m 48s
⚠️ integration-community.aws-1 SKIPPED
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
✔️ ansible-test-changelog SUCCESS in 2m 30s

@ansibullbot ansibullbot added bug This issue/PR relates to a bug community_review connection connection plugin needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) labels Oct 18, 2022
@markuman markuman added the mergeit Merge the PR (SoftwareFactory) label Nov 15, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build failed (gate pipeline). For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

✔️ ansible-galaxy-importer SUCCESS in 4m 21s
✔️ build-ansible-collection SUCCESS in 5m 47s
ansible-test-sanity-docker-devel FAILURE in 9m 05s (non-voting)
ansible-test-sanity-docker-milestone FAILURE in 8m 40s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 9m 30s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 9m 06s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 10m 29s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 6m 26s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 7m 10s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 5m 54s
✔️ ansible-test-changelog SUCCESS in 2m 13s
✔️ ansible-test-splitter SUCCESS in 2m 53s
integration-community.aws-1 FAILURE in 7m 08s
integration-community.aws-2 FAILURE in 5m 26s
integration-community.aws-3 FAILURE in 6m 50s
integration-community.aws-4 FAILURE in 5m 10s
integration-community.aws-5 FAILURE in 5m 10s
integration-community.aws-6 FAILURE in 6m 24s
integration-community.aws-7 FAILURE in 5m 49s
integration-community.aws-8 FAILURE in 5m 05s
integration-community.aws-9 FAILURE in 6m 20s
integration-community.aws-10 FAILURE in 6m 29s
integration-community.aws-11 FAILURE in 6m 44s
integration-community.aws-12 FAILURE in 7m 21s
integration-community.aws-13 FAILURE in 5m 06s
integration-community.aws-14 FAILURE in 5m 13s
integration-community.aws-15 FAILURE in 5m 27s
integration-community.aws-16 FAILURE in 5m 02s
integration-community.aws-17 FAILURE in 5m 33s
integration-community.aws-18 FAILURE in 5m 14s
integration-community.aws-19 FAILURE in 7m 25s
integration-community.aws-20 FAILURE in 6m 04s
integration-community.aws-21 FAILURE in 7m 43s
integration-community.aws-22 FAILURE in 7m 07s

@markuman
Copy link
Member

recheck

@markuman markuman removed the mergeit Merge the PR (SoftwareFactory) label Nov 20, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ ansible-galaxy-importer SUCCESS in 4m 06s
✔️ build-ansible-collection SUCCESS in 6m 18s
ansible-test-sanity-docker-devel FAILURE in 9m 29s (non-voting)
ansible-test-sanity-docker-milestone FAILURE in 8m 34s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 9m 54s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 9m 32s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 9m 21s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 7m 58s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 56s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 5m 59s
✔️ ansible-test-changelog SUCCESS in 2m 20s
✔️ ansible-test-splitter SUCCESS in 2m 24s
⚠️ integration-community.aws-1 SKIPPED
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
⚠️ integration-community.aws-19 SKIPPED
⚠️ integration-community.aws-20 SKIPPED
⚠️ integration-community.aws-21 SKIPPED
⚠️ integration-community.aws-22 SKIPPED

@markuman markuman added the mergeit Merge the PR (SoftwareFactory) label Dec 2, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

✔️ ansible-galaxy-importer SUCCESS in 3m 59s
✔️ build-ansible-collection SUCCESS in 5m 11s
ansible-test-sanity-docker-devel FAILURE in 11m 00s (non-voting)
ansible-test-sanity-docker-milestone FAILURE in 8m 56s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 9m 57s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 51s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 9m 59s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 7m 11s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 7m 43s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 43s
✔️ ansible-test-changelog SUCCESS in 2m 50s
✔️ ansible-test-splitter SUCCESS in 3m 00s
⚠️ integration-community.aws-1 SKIPPED
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
⚠️ integration-community.aws-19 SKIPPED
⚠️ integration-community.aws-20 SKIPPED
⚠️ integration-community.aws-21 SKIPPED
⚠️ integration-community.aws-22 SKIPPED

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 08d2398 into stable-4 Dec 2, 2022
@softwarefactory-project-zuul softwarefactory-project-zuul bot deleted the patchback/backports/stable-4/fa58965fceb8613d734242e552313199892c96d1/pr-1428 branch December 2, 2022 06:29
@github-actions
Copy link

github-actions bot commented Dec 2, 2022

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

abikouo pushed a commit to abikouo/community.aws that referenced this pull request Oct 24, 2023
…tions#1563)

elb_application_lb - fix missing attributes on create

SUMMARY
The create_or_update_alb() function didn't include all attributes when creating a new ALB. This fix just adds a call to the existing update_elb_attributes() and modify_elb_attributes() methods to ensure ALB attributes match supplied params after creating the new ALB.
Fixes ansible-collections#1510
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
elb_application_lb

Reviewed-by: Mark Chappell
Reviewed-by: Helen Bailey <hebailey@redhat.com>
Reviewed-by: Alina Buzachis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug community_review connection connection plugin mergeit Merge the PR (SoftwareFactory) needs_triage new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants