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

Metadata check intermittently fails resulting in badly formatted logs #509

Open
dansiviter opened this issue Oct 14, 2021 · 1 comment
Open

Comments

@dansiviter
Copy link

Expected Behavior

GoogleCloudPropertyDefiner correctly identifies it's running in GCP every time resulting in google_cloud_logging being set consistently.

Actual Behaviour

GoogleCloudPropertyDefiner intermittently fails to detect it's running in GCP when running in GKE with Istio/ASM. I believe this is due to the Istio sidecar having a small delay being bound into the mesh (see kubernetes/kubernetes#65502) which means all requests fail until it is ready.

Steps To Reproduce

  1. Deploy service using GKE with Istio/ASM with Dynamic appender selection enabled,
  2. Restart Pod Several times.
  3. Observe that not all of the Pods will have JSON formatting.

Environment Information

  • GKE
  • Istio or Anthos Service Mesh

Example Application

No response

Version

micronaut-gcp v3.5.0

@viniciusccarvalho
Copy link
Collaborator

@dansiviter If I understood this correctly, the problem is that we detect gcp environment by trying to call the metadata endpoint of gcp, and the istio side car is returning an error (4xx/5xx) and then the request fails?

We could probably fix this by adding some sort of retry mechanism, having the default to fail immediately (to avoid causing latency startup on the service), and make it configurable. I'm not sure how long would take the proxy to be ready.

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

No branches or pull requests

2 participants