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

Improvement for the error log while Subnet Discovery failed #3545

Closed
guessi opened this issue Jan 29, 2024 · 0 comments
Closed

Improvement for the error log while Subnet Discovery failed #3545

guessi opened this issue Jan 29, 2024 · 0 comments
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.

Comments

@guessi
Copy link
Contributor

guessi commented Jan 29, 2024

Is your feature request related to a problem?

Currently, AWS-LBC would have the following error log emit (as follow) if it failed to do Subnet Discovery. However, with unclear error log, it is hard to identify which tag it is looking for.

{
  "level": "error",
   ...
  "msg": "Reconciler error",
   ...  
  "error": "couldn't auto-discover subnets: unable to resolve at least one subnet (0 match VPC and tags)"
}

Code block to be improved:

Describe the solution you'd like

While user is trying to create internal Load balancer, but having kubernetes.io/role/elb: 1 tagged but having no kubernetes.io/role/internal-elb tagged. It is quite confusing to get "unable to resolve at least one subnet (0 match VPC and tags)", would be better to have "which tag" it is looking for to let user more easily to find out the missing tag is kubernetes.io/role/internal-elb: 1.

It would be better to have tag key included in the error log.

Expected results:

  • For the error of internal load balancer reconciler error:
"error": "couldn't auto-discover subnets: unable to resolve at least one subnet (0 match VPC and tags: [kubernetes.io/role/internal-elb])"
  • For the error of internet-facing load balancer reconciler error:
"error": "couldn't auto-discover subnets: unable to resolve at least one subnet (0 match VPC and tags: [kubernetes.io/role/elb])"

Describe alternatives you've considered

n/a

@guessi guessi changed the title Reconciler error should better logging with target tag key included Improvement for the error log while Subnet Discovery failed Jan 29, 2024
@shraddhabang shraddhabang added the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Jan 30, 2024
@guessi guessi closed this as completed Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.
Projects
None yet
Development

No branches or pull requests

2 participants