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

elb_application_lb Updating Listener Rules Of Existing LB Fails After Edit #46

Closed
Alex-Richman opened this issue Apr 22, 2020 · 6 comments
Labels
affects_2.10 bug This issue/PR relates to a bug module module needs_info This issue requires further information. Please answer any outstanding questions needs_template This issue/PR has an incomplete description. Please fill in the proposed template correctly plugins plugin (any type)

Comments

@Alex-Richman
Copy link

Copied from ansible/ansible#69017

SUMMARY

Updating the Listener Rules of an existing elbv2 load balancer via elb_application_lb successfully modifies the rules but raises an exception while parsing the response. If no update is made (e.g. playbook is run again after the failed run) then it correctly returns [OK].

ISSUE TYPE
  • Bug Report
COMPONENT NAME

elb_application_lb

STEPS TO REPRODUCE

Run playbook with some ELB rules, creating the ELB for the first time - Observe success

elb_application_lb:
  state: present
  ...
  listeners:
    ...
    Rules:
      ...
      - Type: fixed-response
         FixedResponseConfig:
         StatusCode: "403"
         ContentType: "text/plain"
         MessageBody: Forbidden

Modify parameters of one of the rules slightly, re-run playbook - Observe failure, but note that rules have updated in AWS console.

Re-run playbook again - Observe [OK].

The particular playbook I see this on has one source-ip rule, 5-13 host-header rules with forward actions, and a fixed-response default action. I'm not sure if it's specifically any of those which are causing the issue or if it happens more generally.

ACTUAL RESULTS
[WARNING]: Module invocation had junk after the JSON data:
... (massive blob of JSON representing the elb configuration)

fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "", "module_stdout": "modified_rule:" ... (massive blob of JSON representing the elb configuration) ... \\n", "msg": "MODULE FAILURE\\nSee stdout/stderr for the exact error", "rc": 0}
@briantist
Copy link
Contributor

I'm not certain but it might be related to this issue:
https://github.com/ansible-collections/amazon.aws/issues/8

Which is in the other collection because most of the code for the elbv2 modules is in the module util, which is in the other collection, while the modules are here in this one 😕

@ansibullbot
Copy link

@Alex-Richman: Greetings! Thanks for taking the time to open this issue. In order for the community to handle your issue effectively, we need a bit more information.

Here are the items we could not find in your description:

  • ansible version

Please set the description of this issue with this template:
https://raw.githubusercontent.com/ansible/ansible/devel/.github/ISSUE_TEMPLATE/bug_report.md

click here for bot help

@ansibullbot
Copy link

@ansibullbot ansibullbot added affects_2.10 bug This issue/PR relates to a bug module module needs_info This issue requires further information. Please answer any outstanding questions needs_template This issue/PR has an incomplete description. Please fill in the proposed template correctly needs_triage labels Aug 19, 2020
@ansibullbot ansibullbot added the plugins plugin (any type) label Aug 28, 2020
@gravesm
Copy link
Member

gravesm commented Jan 29, 2021

@Alex-Richman Thank you for reporting this! This has been fixed in module_utils but not yet released. Could you try the latest main branch of amazon.aws and see if this fixes your problem?

@markuman markuman mentioned this issue Feb 1, 2022
1 task
@jatorcasso
Copy link
Contributor

@markuman can we mark this as closed?

@markuman
Copy link
Member

markuman commented Mar 2, 2022

Yes. Thanks for investigate here @jatorcasso

@markuman markuman closed this as completed Mar 2, 2022
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this issue May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.10 bug This issue/PR relates to a bug module module needs_info This issue requires further information. Please answer any outstanding questions needs_template This issue/PR has an incomplete description. Please fill in the proposed template correctly plugins plugin (any type)
Projects
None yet
Development

No branches or pull requests

6 participants