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

bug: inconsistent messages are should in logs when new route/upstream is registred #2260

Open
ikatlinsky opened this issue Jul 9, 2024 · 3 comments · May be fixed by #2306
Open

bug: inconsistent messages are should in logs when new route/upstream is registred #2260

ikatlinsky opened this issue Jul 9, 2024 · 3 comments · May be fixed by #2306

Comments

@ikatlinsky
Copy link
Contributor

Current Behavior

Currently, almost each time new route/upstream is created via crd following messages are displayed:

(1) error	apisix/apisix_upstream.go:865	update status	{"status": {"conditions":[{"type":"ResourcesAvailable","status":"False","observedGeneration":1,"lastTransitionTime":"2024-07-09T06:51:14Z","reason":"ResourceSyncAborted","message":"upstream doesn't exist. It will be created after ApisixRoute is created referencing it."}]}}

(2) warn	apisix/apisix_upstream.go:509	sync ApisixUpstream failed, will retry	{"object": {"Type":1,"Object":{"Key":"bsl-api-apsx/pmi-df3dwey5kr","OldObject":null,"GroupVersion":"apisix.apache.org/v2"},"OldObject":null,"Tombstone":null}, "error": "upstream doesn't exist. It will be created after ApisixRoute is created referencing it."}

(3) error	apisix/apisix_upstream.go:865	update status	{"status": {"conditions":[{"type":"ResourcesAvailable","status":"True","observedGeneration":1,"lastTransitionTime":"2024-07-09T06:51:15Z","reason":"ResourcesSynced","message":"Sync Successfully"}]}}

Issues with that:

  1. errors 1 and 2 are clearly the same and should have the same log level or better - should not be duplicated
  2. error 1 is clearly not an error, but warning
  3. error 3 is for sure not an error and warn, but rather info or dbeug

Expected Behavior

  1. errors 1 and 2 should have the same log level of warn or only 1 message should be displayed
  2. error 3 should be info or debug, not error or info

Error Logs

2024-07-09T14:51:14+08:00	error	apisix/apisix_upstream.go:865	update status	{"status": {"conditions":[{"type":"ResourcesAvailable","status":"False","observedGeneration":1,"lastTransitionTime":"2024-07-09T06:51:14Z","reason":"ResourceSyncAborted","message":"upstream doesn't exist. It will be created after ApisixRoute is created referencing it."}]}}
2024-07-09T14:51:14+08:00	warn	apisix/apisix_upstream.go:509	sync ApisixUpstream failed, will retry	{"object": {"Type":1,"Object":{"Key":"bsl-api-apsx/pmi-df3dwey5kr","OldObject":null,"GroupVersion":"apisix.apache.org/v2"},"OldObject":null,"Tombstone":null}, "error": "upstream doesn't exist. It will be created after ApisixRoute is created referencing it."}
2024-07-09T14:51:15+08:00	error	apisix/apisix_upstream.go:865	update status	{"status": {"conditions":[{"type":"ResourcesAvailable","status":"True","observedGeneration":1,"lastTransitionTime":"2024-07-09T06:51:15Z","reason":"ResourcesSynced","message":"Sync Successfully"}]}}

Steps to Reproduce

  1. create route/upstream via crd
  2. observe logs

Environment

  • APISIX Ingress controller version: 1.8.2
  • Kubernetes cluster version: 1.29.5
@ikatlinsky
Copy link
Contributor Author

@Revolyssup hi! would be nice if that can be addressed in the same way as #2206, current logging approach makes it barely usable for alerting staff, as too many false positive errors are shown, thanks

Copy link

github-actions bot commented Oct 8, 2024

This issue has been marked as stale due to 90 days of inactivity. It will be closed in 30 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.

@github-actions github-actions bot added the stale label Oct 8, 2024
@ikatlinsky
Copy link
Contributor Author

Fix is still desired

@github-actions github-actions bot removed the stale label Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant