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

validation_gateway_solo_io_valid_config metric not working #5128

Closed
asayah opened this issue Aug 6, 2021 · 6 comments · Fixed by #5321
Closed

validation_gateway_solo_io_valid_config metric not working #5128

asayah opened this issue Aug 6, 2021 · 6 comments · Fixed by #5321
Assignees
Labels
Good First Issue Good issue for newbies Impact: L Priority: High Required in next 3 months to make progress, bugs that affect multiple users, or very bad UX Size: S 1 - 3 days Type: Bug Something isn't working

Comments

@asayah
Copy link
Contributor

asayah commented Aug 6, 2021

validation_gateway_solo_io_valid_config metric doesn't report an issue even if the control plane configuration is invalid

@asayah asayah added the Type: Bug Something isn't working label Aug 6, 2021
@chrisgaun
Copy link

chrisgaun commented Aug 13, 2021

@asayah can you add steps to replicate it

@jameshbarton
Copy link
Contributor

Steps to reproduce:

  1. Set up port-forward for glooe prom server:
kubectl port-forward -n gloo-system deployment/glooe-prometheus-server 9090
  1. Add a VS that points to a non-existent Upstream:
kubectl apply -f https://raw.githubusercontent.com/solo-io/solo-blog/main/prometheus-auth-intg/httpbin-vs-original.yaml
  1. Confirm that control plane is invalid with glooctl check:
Error: 3 errors occurred:
	* Found virtual service with warnings: gloo-system httpbin-vs (Reason: warning:
  Route Warning: InvalidDestinationWarning. Reason: *v1.Upstream { gloo-system.default-httpbin-8000 } not found)
	* Virtual service references unknown upstream: (Virtual service: gloo-system httpbin-vs | Upstream: gloo-system default-httpbin-8000)
	* Found proxy with warnings: gloo-system gateway-proxy
Reason: warning:
  Route Warning: InvalidDestinationWarning. Reason: *v1.Upstream { gloo-system.default-httpbin-8000 } not found
  1. Confirm that the metric's value is set to 1 (expected value with invalid control plane is 0):
% curl "http://localhost:9090/federate?match[]=\{gloo!=''\}" | grep validation_gateway_solo_io_valid_config
<snip>
# TYPE validation_gateway_solo_io_valid_config untyped
validation_gateway_solo_io_valid_config{gloo="gateway",instance="10.84.1.5:9091",job="kubernetes-pods",kubernetes_namespace="gloo-system",kubernetes_pod_name="gateway-7956b65865-rzctb",pod_template_hash="7956b65865"} 1 1629754615305

Context:

% glooctl version
Client: {"version":"1.8.6"}
Server: {"type":"Gateway","enterprise":true,"kubernetes":{"containers":[{"Tag":"1.8.6","Name":"discovery","Registry":"quay.io/solo-io"},{"Tag":"1.8.5","Name":"extauth-ee","Registry":"quay.io/solo-io"},{"Tag":"1.8.6","Name":"gateway","Registry":"quay.io/solo-io"},{"Tag":"1.8.5","Name":"gloo-ee-envoy-wrapper","Registry":"quay.io/solo-io"},{"Tag":"1.8.5","Name":"gloo-ee","Registry":"quay.io/solo-io"},{"Tag":"1.8.5","Name":"observability-ee","Registry":"quay.io/solo-io"},{"Tag":"1.8.5","Name":"rate-limit-ee","Registry":"quay.io/solo-io"},{"Tag":"5","Name":"redis","Registry":"docker.io"}],"namespace":"gloo-system"}}

@chrisgaun chrisgaun added Good First Issue Good issue for newbies Priority: High Required in next 3 months to make progress, bugs that affect multiple users, or very bad UX Impact: L labels Aug 27, 2021
@chrisgaun
Copy link

For making all glooctl check into metrics...

Metrics will not give same granularity.

Can give boolean on "something is wrong"

@sam-heilbron
Copy link
Contributor

@sam-heilbron sam-heilbron added the Size: S 1 - 3 days label Sep 7, 2021
@jenshu jenshu self-assigned this Sep 9, 2021
@chrisgaun chrisgaun reopened this Sep 17, 2021
@jenshu
Copy link
Contributor

jenshu commented Sep 24, 2021

Verified the fix is working in gloo-ee v1.9.0-beta14. Note, following the above steps produces only warnings, so the valid config metric will still show as 1 unless you install gloo with allowWarnings=false (which will treat the warnings as errors), e.g.:

helm install -n gloo-system gloo-ee gloo-ee/gloo-ee --create-namespace --set-string license_key=$GLOO_LICENSE_KEY --set gloo-fed.enabled=false --set gloo.gateway.validation.allowWarnings=false  --version 1.9.0-beta14

After setting allowWarnings=false and applying the above config, I can confirm that the validation_gateway_solo_io_valid_config shows 0.

@jenshu
Copy link
Contributor

jenshu commented Sep 24, 2021

this has been backported to 1.8 as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Good issue for newbies Impact: L Priority: High Required in next 3 months to make progress, bugs that affect multiple users, or very bad UX Size: S 1 - 3 days Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants