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

r/aws_lb: Allow assigning EIP to network LB #1956

Merged
merged 2 commits into from
Oct 20, 2017
Merged

r/aws_lb: Allow assigning EIP to network LB #1956

merged 2 commits into from
Oct 20, 2017

Conversation

radeksimko
Copy link
Member

@radeksimko radeksimko commented Oct 19, 2017

Apologies for slightly bigger scope of this PR, but it was necessary to make tests pass.

Passing allocation ID w/out subnet causes AWS API to return 500 Internal Server Error and the SDK to retry for ~1-2 hours. The API bug was reported and acked by AWS support, so it replies with something more sensible, e.g. 400.

NLBs create their own ENIs, like other load balancers, and leaves them around for a short while after deletion which upsets other depending resources as we try to clean them up - EIPs in this case:

        Error: Error applying: 2 error(s) occurred:
        
        * aws_eip.lb[1] (destroy): 1 error(s) occurred:
        
        * aws_eip.lb.1: AuthFailure: You do not have permission to access the specified resource.
            status code: 400, request id: def27ac4-2f37-4f91-ad56-2774e4c7029e
        * aws_eip.lb[0] (destroy): 1 error(s) occurred:
        
        * aws_eip.lb.0: AuthFailure: You do not have permission to access the specified resource.
            status code: 400, request id: f916f6d1-bc0e-4616-816d-0799151e43c6

As opposed to ALB's & ELB's ENIs we can't cleanup those ENIs, so I just added retry. 🤷‍♂️

Snippet from debug log

to prove that waiter is actually necessary & effective:

2017/10/19 10:10:15 [DEBUG] Found 2 ENIs to cleanup for NLB "arn:aws:elasticloadbalancing:eu-west-2:187416307283:loadbalancer/net/radek-test/033bdf33f3c50e5c"
2017/10/19 10:10:16 [DEBUG] Found 2 ENIs to cleanup for NLB "arn:aws:elasticloadbalancing:eu-west-2:187416307283:loadbalancer/net/radek-test/033bdf33f3c50e5c"
2017/10/19 10:10:17 [DEBUG] Found 2 ENIs to cleanup for NLB "arn:aws:elasticloadbalancing:eu-west-2:187416307283:loadbalancer/net/radek-test/033bdf33f3c50e5c"
2017/10/19 10:10:20 [DEBUG] Found 2 ENIs to cleanup for NLB "arn:aws:elasticloadbalancing:eu-west-2:187416307283:loadbalancer/net/radek-test/033bdf33f3c50e5c"
2017/10/19 10:10:24 [DEBUG] Found 2 ENIs to cleanup for NLB "arn:aws:elasticloadbalancing:eu-west-2:187416307283:loadbalancer/net/radek-test/033bdf33f3c50e5c"
2017/10/19 10:10:32 [DEBUG] Found 2 ENIs to cleanup for NLB "arn:aws:elasticloadbalancing:eu-west-2:187416307283:loadbalancer/net/radek-test/033bdf33f3c50e5c"
2017/10/19 10:10:43 [DEBUG] ENIs gone for NLB "arn:aws:elasticloadbalancing:eu-west-2:187416307283:loadbalancer/net/radek-test/033bdf33f3c50e5c"

Test results

screen shot 2017-10-19 at 11 06 15

@radeksimko radeksimko added the bug Addresses a defect in current functionality. label Oct 19, 2017
Copy link
Contributor

@catsby catsby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ghost
Copy link

ghost commented Apr 10, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants