In the external-prometheus-deep integration test, wait for prom to roll out#6524
Merged
Pothulapati merged 1 commit intomainfrom Jul 20, 2021
Merged
In the external-prometheus-deep integration test, wait for prom to roll out#6524Pothulapati merged 1 commit intomainfrom
external-prometheus-deep integration test, wait for prom to roll out#6524Pothulapati merged 1 commit intomainfrom
Conversation
…roll out Fixes #6511 In the `external-prometheus-deep` integration test, make sure we wait for the rollout of the external prometheus instance before proceeding. Also remove the special logic around `if TestHelper.ExternalPrometheus()` in the helm-related tests because we know we're using the embedded linkerd prometheus instance in those tests.
Codecov Report
@@ Coverage Diff @@
## main #6524 +/- ##
==========================================
+ Coverage 44.48% 44.82% +0.34%
==========================================
Files 183 183
Lines 17639 23859 +6220
Branches 290 290
==========================================
+ Hits 7846 10694 +2848
- Misses 9056 12412 +3356
- Partials 737 753 +16
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
adleong
approved these changes
Jul 19, 2021
alpeb
added a commit
that referenced
this pull request
Jul 29, 2021
Another attempt at fixing #6511 Even after #6524, we continued experiencing discrepancies on the linkerd-edges integration test. The problem ended up being the external prometheus instance not being injected. The injector logs revealed this: ```console 2021-07-29T13:57:10.2497460Z time="2021-07-29T13:54:15Z" level=info msg="caches synced" 2021-07-29T13:57:10.2498191Z time="2021-07-29T13:54:15Z" level=info msg="starting admin server on :9995" 2021-07-29T13:57:10.2498935Z time="2021-07-29T13:54:15Z" level=info msg="listening at :8443" 2021-07-29T13:57:10.2499945Z time="2021-07-29T13:54:18Z" level=info msg="received admission review request 2b7b4970-db40-4bda-895b-bb2e95e98265" 2021-07-29T13:57:10.2511751Z time="2021-07-29T13:54:18Z" level=debug msg="admission request: &AdmissionRequest{UID:2b7b4970-db40-4bda-895b-bb2e95e98265,Kind:/v1, Kind=Service,Resource:{ v1 services},SubResource:,Name:metrics-api,Namespace:linkerd-viz... ``` Usually one expects the webhook server to start first ("listening at :8443") and then the admin server, but in this case it happened the other way around. The admin server serves the readiness probe, so k8s was signaled that the injector was ready before it could listen to webhook requests, and given the WebhookFailurePolicy is Ignore by default, sometimes this was causing for the prometheus pod creation event to get missed, and we see in the log above that it starts by processing the pods that are created afterwards, which are the viz ones. In this fix we start first the webhook server, then block on the syncing of the k8s API, which should give enough time for the webhook to be up, and finally we start the admin server.
alpeb
added a commit
that referenced
this pull request
Jul 29, 2021
Another attempt at fixing #6511 Even after #6524, we continued experiencing discrepancies on the linkerd-edges integration test. The problem ended up being the external prometheus instance not being injected. The injector logs revealed this: ```console 2021-07-29T13:57:10.2497460Z time="2021-07-29T13:54:15Z" level=info msg="caches synced" 2021-07-29T13:57:10.2498191Z time="2021-07-29T13:54:15Z" level=info msg="starting admin server on :9995" 2021-07-29T13:57:10.2498935Z time="2021-07-29T13:54:15Z" level=info msg="listening at :8443" 2021-07-29T13:57:10.2499945Z time="2021-07-29T13:54:18Z" level=info msg="received admission review request 2b7b4970-db40-4bda-895b-bb2e95e98265" 2021-07-29T13:57:10.2511751Z time="2021-07-29T13:54:18Z" level=debug msg="admission request: &AdmissionRequest{UID:2b7b4970-db40-4bda-895b-bb2e95e98265,Kind:/v1, Kind=Service,Resource:{ v1 services},SubResource:,Name:metrics-api,Namespace:linkerd-viz... ``` Usually one expects the webhook server to start first ("listening at :8443") and then the admin server, but in this case it happened the other way around. The admin server serves the readiness probe, so k8s was signaled that the injector was ready before it could listen to webhook requests, and given the WebhookFailurePolicy is Ignore by default, sometimes this was causing for the prometheus pod creation event to get missed, and we see in the log above that it starts by processing the pods that are created afterwards, which are the viz ones. In this fix we start first the webhook server, then block on the syncing of the k8s API, which should give enough time for the webhook to be up, and finally we start the admin server.
sannimichaelse
pushed a commit
to sannimichaelse/linkerd2
that referenced
this pull request
Aug 1, 2021
…roll out (linkerd#6524) Fixes linkerd#6511 In the `external-prometheus-deep` integration test, make sure we wait for the rollout of the external prometheus instance before proceeding. Also remove the special logic around `if TestHelper.ExternalPrometheus()` in the helm-related tests because we know we're using the embedded linkerd prometheus instance in those tests.
sannimichaelse
pushed a commit
to sannimichaelse/linkerd2
that referenced
this pull request
Aug 1, 2021
Another attempt at fixing linkerd#6511 Even after linkerd#6524, we continued experiencing discrepancies on the linkerd-edges integration test. The problem ended up being the external prometheus instance not being injected. The injector logs revealed this: ```console 2021-07-29T13:57:10.2497460Z time="2021-07-29T13:54:15Z" level=info msg="caches synced" 2021-07-29T13:57:10.2498191Z time="2021-07-29T13:54:15Z" level=info msg="starting admin server on :9995" 2021-07-29T13:57:10.2498935Z time="2021-07-29T13:54:15Z" level=info msg="listening at :8443" 2021-07-29T13:57:10.2499945Z time="2021-07-29T13:54:18Z" level=info msg="received admission review request 2b7b4970-db40-4bda-895b-bb2e95e98265" 2021-07-29T13:57:10.2511751Z time="2021-07-29T13:54:18Z" level=debug msg="admission request: &AdmissionRequest{UID:2b7b4970-db40-4bda-895b-bb2e95e98265,Kind:/v1, Kind=Service,Resource:{ v1 services},SubResource:,Name:metrics-api,Namespace:linkerd-viz... ``` Usually one expects the webhook server to start first ("listening at :8443") and then the admin server, but in this case it happened the other way around. The admin server serves the readiness probe, so k8s was signaled that the injector was ready before it could listen to webhook requests, and given the WebhookFailurePolicy is Ignore by default, sometimes this was causing for the prometheus pod creation event to get missed, and we see in the log above that it starts by processing the pods that are created afterwards, which are the viz ones. In this fix we start first the webhook server, then block on the syncing of the k8s API, which should give enough time for the webhook to be up, and finally we start the admin server.
sannimichaelse
pushed a commit
to sannimichaelse/linkerd2
that referenced
this pull request
Aug 13, 2021
…roll out (linkerd#6524) Fixes linkerd#6511 In the `external-prometheus-deep` integration test, make sure we wait for the rollout of the external prometheus instance before proceeding. Also remove the special logic around `if TestHelper.ExternalPrometheus()` in the helm-related tests because we know we're using the embedded linkerd prometheus instance in those tests. Signed-off-by: Sanni Michael <[email protected]>
sannimichaelse
pushed a commit
to sannimichaelse/linkerd2
that referenced
this pull request
Aug 13, 2021
Another attempt at fixing linkerd#6511 Even after linkerd#6524, we continued experiencing discrepancies on the linkerd-edges integration test. The problem ended up being the external prometheus instance not being injected. The injector logs revealed this: ```console 2021-07-29T13:57:10.2497460Z time="2021-07-29T13:54:15Z" level=info msg="caches synced" 2021-07-29T13:57:10.2498191Z time="2021-07-29T13:54:15Z" level=info msg="starting admin server on :9995" 2021-07-29T13:57:10.2498935Z time="2021-07-29T13:54:15Z" level=info msg="listening at :8443" 2021-07-29T13:57:10.2499945Z time="2021-07-29T13:54:18Z" level=info msg="received admission review request 2b7b4970-db40-4bda-895b-bb2e95e98265" 2021-07-29T13:57:10.2511751Z time="2021-07-29T13:54:18Z" level=debug msg="admission request: &AdmissionRequest{UID:2b7b4970-db40-4bda-895b-bb2e95e98265,Kind:/v1, Kind=Service,Resource:{ v1 services},SubResource:,Name:metrics-api,Namespace:linkerd-viz... ``` Usually one expects the webhook server to start first ("listening at :8443") and then the admin server, but in this case it happened the other way around. The admin server serves the readiness probe, so k8s was signaled that the injector was ready before it could listen to webhook requests, and given the WebhookFailurePolicy is Ignore by default, sometimes this was causing for the prometheus pod creation event to get missed, and we see in the log above that it starts by processing the pods that are created afterwards, which are the viz ones. In this fix we start first the webhook server, then block on the syncing of the k8s API, which should give enough time for the webhook to be up, and finally we start the admin server. Signed-off-by: Sanni Michael <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6511
In the
external-prometheus-deepintegration test, make sure we wait for the rollout of the external prometheus instance before proceeding.Also remove the special logic around
if TestHelper.ExternalPrometheus()in the helm-related tests because we know we're using the embedded linkerd prometheus instance in those tests.