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

aws-elasticloadbalancingv2: health and unhealthy threshold counts can vary #26941

Closed
toxygene opened this issue Aug 30, 2023 · 5 comments · Fixed by #26949
Closed

aws-elasticloadbalancingv2: health and unhealthy threshold counts can vary #26941

toxygene opened this issue Aug 30, 2023 · 5 comments · Fixed by #26949
Assignees
Labels
@aws-cdk/aws-elasticloadbalancingv2 Related to Amazon Elastic Load Balancing V2 bug This issue is a bug. effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md p2

Comments

@toxygene
Copy link

toxygene commented Aug 30, 2023

The validateTargetGroup method in the NetworkTargetGroup class has a check to ensure the healthy and unhealthy threshold counts are the same (https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-elasticloadbalancingv2/lib/nlb/network-target-group.ts#L262-L268), but this does not appear to be a requirement of AWS.

➜  aws elbv2 describe-target-groups --target-group-arns [omitted] --query 'TargetGroups[0].[HealthyThresholdCount,UnhealthyThresholdCount]'
[
    5,
    5
]

Expected Behavior

The NetworkTargetGroup is created

Current Behavior

An error message of Healthy and Unhealthy Threshold Counts must be the same.

Reproduction Steps

Create a NetworkTargetGroup with differing healthy and unhealthy threshold counts.

Possible Solution

Remove https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-elasticloadbalancingv2/lib/nlb/network-target-group.ts#L262-L268

Additional Information/Context

No response

CDK CLI Version

2.91.0

Framework Version

No response

Node.js Version

18.17.1

OS

macOS 13.5.1

Language

Python

Language Version

3.9.16

Other information

No response

@toxygene toxygene added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 30, 2023
@github-actions github-actions bot added the @aws-cdk/aws-elasticloadbalancingv2 Related to Amazon Elastic Load Balancing V2 label Aug 30, 2023
@peterwoodworth
Copy link
Contributor

peterwoodworth commented Aug 30, 2023

I can't find any docs on the topic, and neither the PR or the issue it fixed linked to any docs either. I'm not sure that your CLI output shows that the values can differ. Can you use escape hatches to set the values manually and see if it deploys? Or link to docs that states the values can differ?

@peterwoodworth peterwoodworth added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels Aug 30, 2023
@toxygene
Copy link
Author

My apologies -- I copy/pasted the output from the wrong target group. Here is the output for a target group with differing thresholds:

➜  aws elbv2 describe-target-groups --target-group-arns [omitted] --query 'TargetGroups[0].[HealthyThresholdCount,UnhealthyThresholdCount]' 
[
    5,
    2
]

Additionally, here is a screenshot of the web console:
Screenshot 2023-08-30 at 10 32 38 AM

@peterwoodworth peterwoodworth added good first issue Related to contributions. See CONTRIBUTING.md p2 effort/small Small work item – less than a day of effort and removed response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. labels Aug 30, 2023
@peterwoodworth
Copy link
Contributor

Great, thanks!

@msambol
Copy link
Contributor

msambol commented Aug 30, 2023

@peterwoodworth I'll take this.

@mergify mergify bot closed this as completed in #26949 Aug 31, 2023
mergify bot pushed a commit that referenced this issue Aug 31, 2023
…ld counts (#26949)

`HealthyThresholdCount` and `UnhealthyThresholdCount` do not need to be the same.

In fact, the [docs](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/target-group-health-checks.html#health-check-settings)  have their default values as 5 and 2.

Closes #26941.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

mikewrighton pushed a commit that referenced this issue Sep 14, 2023
…ld counts (#26949)

`HealthyThresholdCount` and `UnhealthyThresholdCount` do not need to be the same.

In fact, the [docs](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/target-group-health-checks.html#health-check-settings)  have their default values as 5 and 2.

Closes #26941.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-elasticloadbalancingv2 Related to Amazon Elastic Load Balancing V2 bug This issue is a bug. effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants