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

Handle Load Balancing "None" Unit #503

Closed
spockNinja opened this issue Nov 11, 2020 · 8 comments · Fixed by #507
Closed

Handle Load Balancing "None" Unit #503

spockNinja opened this issue Nov 11, 2020 · 8 comments · Fixed by #507

Comments

@spockNinja
Copy link
Contributor

Bug Report

Resolve "None" unit error for elasticloadbalancing checks.

We received the "awslimitchecker does not know how to handle this" warning for Unit: None on elasticloadbalancing checks for Classic and Application load balancers.

It seems that "None" is the expected default, so it would seem that a different unit is being specified elsewhere. My guess is that something in elb.py is conflicting with the service quotas check somehow.

Version

9.0.0

Installation Method

We run pip install in CodeBuild to package up the requirements into a zipfile for an automated Lambda deployment.

pip install -r requirements.txt -t lambda-code/

Supporting Software Versions

python3.7

Actual Output

Usage:

from awslimitchecker.checker import AwsLimitChecker


AWS_REGION = os.getenv("AWS_REGION")
USE_TRUSTED_ADVISOR = os.getenv("USE_TRUSTED_ADVISOR")


def handle(event, context):
    aws_limit_checker = AwsLimitChecker(region=AWS_REGION)
    thresholds = aws_limit_checker.check_thresholds(use_ta=USE_TRUSTED_ADVISOR)
    for service, svc_limits in thresholds.items():
        ...

Output:

ERROR: Service Quota service_code=elasticloadbalancing QuotaName="Classic Load Balancers per Region" has Units set to "None"; awslimitchecker does not know how to handle this. This quota will be ignored. Please open a bug report.

As well as the same for "Application Load Balancers per Region".

Expected Output

No error.

TrustedAdvisor

I don't think so, I believe this is some mix of Service Quotas and whatever is going on in elb.py

Testing Assistance

Yes, we'd be happy to!

@skraga
Copy link

skraga commented Nov 24, 2020

We have the same issue

@adrianwnuk
Copy link

Same issue here.

@luoyimu1
Copy link

same issue as well, pls kindly advise.

@jantman
Copy link
Owner

jantman commented Dec 1, 2020

Apologies for the delay on this. I'll have a fix pushed up and ready to test today, with a target release date of Monday December 7.

@jantman
Copy link
Owner

jantman commented Dec 2, 2020

Ok, after digging into this a bit, I've determined a few things:

  1. Going by the automated acceptance tests of the master branch that run once a week on TravisCI, this error started happening between November 2 and November 9 of this year.
  2. The problem is that, sometime between those dates, the Service Quotas for "Application Load Balancers per Region" and "Classic Load Balancers per Region" had their Units value changed from Count to None.
  3. Unsurprisingly, I cannot find any announcement related to this in the AWS What's New feed after looking through all of October and November, and neither ELB nor Service Quotas seems to have a public roadmap or changelog/release notes. In the past I'd have opened a support case on one of my employer's accounts for this, but I think I've given up complaining to AWS when they change things with no notification.

I'll be pushing a change shortly to handle either Units value (Count or None) for LBs.

jantman added a commit that referenced this issue Dec 2, 2020
Fix #503 - Handle (A|E)LB per Region Service Quota with units Count or None
@jantman
Copy link
Owner

jantman commented Dec 2, 2020

A fix for this issue has been merged to the develop branch and is slated for release in 10.0.0 on Monday, December 7, 2020. Anyone who is able to test the fix is strongly encouraged to do so, and comment on this issue with their results. Instructions for installing awslimitchecker from a git branch are available in the Installing for Development documentation.

@spockNinja
Copy link
Contributor Author

@jantman Thank you for the investigation and the fix! 😍

@jantman jantman closed this as completed in b7fdcb4 Dec 7, 2020
@jantman
Copy link
Owner

jantman commented Dec 7, 2020

This has been fixed in 10.0.0, which is now live on PyPI and is being built on the Docker hub right now. Thank you so much for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants