-
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
[PR #929/0b97186c backport][stable-4] elbv2 - Fix KeyError when passing two TGs #933
Merged
softwarefactory-project-zuul
merged 1 commit into
stable-4
from
patchback/backports/stable-4/0b97186c83af537ec58e53531aea55c1997636f0/pr-929
Jul 15, 2022
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
elbv2 - Fix KeyError when passing two TGs SUMMARY Fixes: ansible-collections/community.aws#1089 ISSUE TYPE Bugfix Pull Request COMPONENT NAME plugins/module_utils/elbv2.py ADDITIONAL INFORMATION Based on the docs, if you want to balance across multiple TGs you shouldn't pass a TargetGroupArn, and instead just the ForwardConfig. (https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.create_listener) The Amazon Resource Name (ARN) of the target group. Specify only when Type is forward and you want to route to a single target group. To route to one or more target groups, use ForwardConfig instead. However, it is also valid (but redundant) to Pass the ARN and a ForwardConfig If you specify both ForwardConfig and TargetGroupArn, you can specify only one target group using ForwardConfig and it must be the same target group specified in TargetGroupArn. Original Error: The full traceback is: Traceback (most recent call last): File "/home/alex/.ansible/tmp/ansible-tmp-1650531340.4967074-29141-25081229266719/AnsiballZ_elb_application_lb.py", line 102, in <module> _ansiballz_main() File "/home/alex/.ansible/tmp/ansible-tmp-1650531340.4967074-29141-25081229266719/AnsiballZ_elb_application_lb.py", line 94, in _ansiballz_main invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS) File "/home/alex/.ansible/tmp/ansible-tmp-1650531340.4967074-29141-25081229266719/AnsiballZ_elb_application_lb.py", line 40, in invoke_module runpy.run_module(mod_name='ansible_collections.community.aws.plugins.modules.elb_application_lb', init_globals=None, run_name='__main__', alter_sys=True) File "/usr/lib/python3.10/runpy.py", line 209, in run_module return _run_module_code(code, init_globals, run_name, mod_spec) File "/usr/lib/python3.10/runpy.py", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/tmp/ansible_community.aws.elb_application_lb_payload_dy92ctf5/ansible_community.aws.elb_application_lb_payload.zip/ansible_collections/community/aws/plugins/modules/elb_application_lb.py", line 821, in <module> File "/tmp/ansible_community.aws.elb_application_lb_payload_dy92ctf5/ansible_community.aws.elb_application_lb_payload.zip/ansible_collections/community/aws/plugins/modules/elb_application_lb.py", line 815, in main File "/tmp/ansible_community.aws.elb_application_lb_payload_dy92ctf5/ansible_community.aws.elb_application_lb_payload.zip/ansible_collections/community/aws/plugins/modules/elb_application_lb.py", line 653, in create_or_update_alb File "/tmp/ansible_community.aws.elb_application_lb_payload_dy92ctf5/ansible_community.aws.elb_application_lb_payload.zip/ansible_collections/amazon/aws/plugins/module_utils/elbv2.py", line 928, in compare_rules File "/tmp/ansible_community.aws.elb_application_lb_payload_dy92ctf5/ansible_community.aws.elb_application_lb_payload.zip/ansible_collections/amazon/aws/plugins/module_utils/elbv2.py", line 894, in _compare_rule File "/tmp/ansible_community.aws.elb_application_lb_payload_dy92ctf5/ansible_community.aws.elb_application_lb_payload.zip/ansible_collections/amazon/aws/plugins/module_utils/elbv2.py", line 894, in <listcomp> File "/tmp/ansible_community.aws.elb_application_lb_payload_dy92ctf5/ansible_community.aws.elb_application_lb_payload.zip/ansible_collections/amazon/aws/plugins/module_utils/elbv2.py", line 29, in _prune_ForwardConfig KeyError: 'TargetGroupArn' Reviewed-by: Alina Buzachis <None> (cherry picked from commit 0b97186)
tremble
approved these changes
Jul 15, 2022
ansibullbot
added
bug
This issue/PR relates to a bug
community_review
module_utils
module_utils
needs_triage
new_contributor
Help guide this first time contributor
plugins
plugin (any type)
python3
tests
tests
traceback
labels
Jul 15, 2022
This comment was marked as outdated.
This comment was marked as outdated.
regate |
softwarefactory-project-zuul
bot
deleted the
patchback/backports/stable-4/0b97186c83af537ec58e53531aea55c1997636f0/pr-929
branch
July 15, 2022 14:00
abikouo
pushed a commit
to abikouo/amazon.aws
that referenced
this pull request
Sep 18, 2023
…sible-collections#933) ec2_asg: Add functionality to detach specified instances from ASG SUMMARY Adds feature to detach specified instances from a AutoScalingGroup rather than terminating them directly. Detached instances are not terminated and can be managed independently. Implements ansible-collections#649 ISSUE TYPE Feature Pull Request COMPONENT NAME ec2_asg ADDITIONAL INFORMATION Makes use of https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/autoscaling.html#AutoScaling.Client.detach_instances Reviewed-by: Alina Buzachis <None> Reviewed-by: Mandar Kulkarni <[email protected]> Reviewed-by: Jill R <None> Reviewed-by: Joseph Torcasso <None>
abikouo
pushed a commit
to abikouo/amazon.aws
that referenced
this pull request
Sep 18, 2023
…sible-collections#933) ec2_asg: Add functionality to detach specified instances from ASG SUMMARY Adds feature to detach specified instances from a AutoScalingGroup rather than terminating them directly. Detached instances are not terminated and can be managed independently. Implements ansible-collections#649 ISSUE TYPE Feature Pull Request COMPONENT NAME ec2_asg ADDITIONAL INFORMATION Makes use of https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/autoscaling.html#AutoScaling.Client.detach_instances Reviewed-by: Alina Buzachis <None> Reviewed-by: Mandar Kulkarni <[email protected]> Reviewed-by: Jill R <None> Reviewed-by: Joseph Torcasso <None>
abikouo
pushed a commit
to abikouo/amazon.aws
that referenced
this pull request
Oct 24, 2023
…sible-collections#933) ec2_asg: Add functionality to detach specified instances from ASG SUMMARY Adds feature to detach specified instances from a AutoScalingGroup rather than terminating them directly. Detached instances are not terminated and can be managed independently. Implements ansible-collections#649 ISSUE TYPE Feature Pull Request COMPONENT NAME ec2_asg ADDITIONAL INFORMATION Makes use of https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/autoscaling.html#AutoScaling.Client.detach_instances Reviewed-by: Alina Buzachis <None> Reviewed-by: Mandar Kulkarni <[email protected]> Reviewed-by: Jill R <None> Reviewed-by: Joseph Torcasso <None>
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
mergeit
Merge the PR (SoftwareFactory)
module_utils
module_utils
needs_triage
new_contributor
Help guide this first time contributor
plugins
plugin (any type)
python3
tests
tests
traceback
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a backport of PR #929 as merged into main (0b97186).
SUMMARY
Fixes: ansible-collections/community.aws#1089
ISSUE TYPE
COMPONENT NAME
plugins/module_utils/elbv2.py
ADDITIONAL INFORMATION
Based on the docs, if you want to balance across multiple TGs you shouldn't pass a TargetGroupArn, and instead just the ForwardConfig. (https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.create_listener)
However, it is also valid (but redundant) to Pass the ARN and a ForwardConfig
Original Error: