From 10a902e4fe51cd903acc3deaeae41435ed5dbe74 Mon Sep 17 00:00:00 2001 From: dprotaso Date: Fri, 10 Mar 2023 10:31:30 -0500 Subject: [PATCH 1/6] json log access --- third_party/istio-latest/istio-ci-mesh.yaml | 2 ++ third_party/istio-latest/istio-ci-mesh/istio.yaml | 2 ++ third_party/istio-latest/istio-ci-no-mesh.yaml | 2 ++ third_party/istio-latest/istio-ci-no-mesh/istio.yaml | 2 ++ third_party/istio-latest/istio-kind-no-mesh.yaml | 2 ++ third_party/istio-latest/istio-kind-no-mesh/istio.yaml | 2 ++ 6 files changed, 12 insertions(+) diff --git a/third_party/istio-latest/istio-ci-mesh.yaml b/third_party/istio-latest/istio-ci-mesh.yaml index b7de5c517d..c9dbc1443d 100644 --- a/third_party/istio-latest/istio-ci-mesh.yaml +++ b/third_party/istio-latest/istio-ci-mesh.yaml @@ -29,6 +29,8 @@ spec: autoscaleEnabled: false meshConfig: + accessLogFile: /dev/stdout + accessLogEncoding: JSON defaultConfig: terminationDrainDuration: "20s" diff --git a/third_party/istio-latest/istio-ci-mesh/istio.yaml b/third_party/istio-latest/istio-ci-mesh/istio.yaml index 5dba3baba7..1dc60a70be 100644 --- a/third_party/istio-latest/istio-ci-mesh/istio.yaml +++ b/third_party/istio-latest/istio-ci-mesh/istio.yaml @@ -7691,6 +7691,8 @@ metadata: data: meshNetworks: 'networks: {}' mesh: |- + accessLogEncoding: JSON + accessLogFile: /dev/stdout defaultConfig: discoveryAddress: istiod.istio-system.svc:15012 proxyMetadata: {} diff --git a/third_party/istio-latest/istio-ci-no-mesh.yaml b/third_party/istio-latest/istio-ci-no-mesh.yaml index 4209366901..b1dfcf2d3d 100644 --- a/third_party/istio-latest/istio-ci-no-mesh.yaml +++ b/third_party/istio-latest/istio-ci-no-mesh.yaml @@ -26,6 +26,8 @@ spec: autoscaleEnabled: false meshConfig: + accessLogFile: /dev/stdout + accessLogEncoding: JSON defaultConfig: terminationDrainDuration: "20s" diff --git a/third_party/istio-latest/istio-ci-no-mesh/istio.yaml b/third_party/istio-latest/istio-ci-no-mesh/istio.yaml index 15daa8bce3..0b022047c9 100644 --- a/third_party/istio-latest/istio-ci-no-mesh/istio.yaml +++ b/third_party/istio-latest/istio-ci-no-mesh/istio.yaml @@ -7691,6 +7691,8 @@ metadata: data: meshNetworks: 'networks: {}' mesh: |- + accessLogEncoding: JSON + accessLogFile: /dev/stdout defaultConfig: discoveryAddress: istiod.istio-system.svc:15012 proxyMetadata: {} diff --git a/third_party/istio-latest/istio-kind-no-mesh.yaml b/third_party/istio-latest/istio-kind-no-mesh.yaml index 812015fedc..bb1d879b4b 100644 --- a/third_party/istio-latest/istio-kind-no-mesh.yaml +++ b/third_party/istio-latest/istio-kind-no-mesh.yaml @@ -30,6 +30,8 @@ spec: type: NodePort meshConfig: + accessLogFile: /dev/stdout + accessLogEncoding: JSON defaultConfig: terminationDrainDuration: "20s" diff --git a/third_party/istio-latest/istio-kind-no-mesh/istio.yaml b/third_party/istio-latest/istio-kind-no-mesh/istio.yaml index 8d9049ee7c..bf840f22ee 100644 --- a/third_party/istio-latest/istio-kind-no-mesh/istio.yaml +++ b/third_party/istio-latest/istio-kind-no-mesh/istio.yaml @@ -7691,6 +7691,8 @@ metadata: data: meshNetworks: 'networks: {}' mesh: |- + accessLogEncoding: JSON + accessLogFile: /dev/stdout defaultConfig: discoveryAddress: istiod.istio-system.svc:15012 proxyMetadata: {} From 8fa534b9077b258a1b879914cec3785ebe52f04a Mon Sep 17 00:00:00 2001 From: dprotaso Date: Fri, 17 Mar 2023 16:36:14 -0400 Subject: [PATCH 2/6] change proxy debug levels --- third_party/istio-latest/istio-ci-mesh.yaml | 1 + third_party/istio-latest/istio-ci-mesh/istio.yaml | 4 ++-- third_party/istio-latest/istio-ci-no-mesh.yaml | 3 +++ third_party/istio-latest/istio-ci-no-mesh/istio.yaml | 4 ++-- third_party/istio-latest/istio-kind-no-mesh.yaml | 1 + third_party/istio-latest/istio-kind-no-mesh/istio.yaml | 4 ++-- vendor/k8s.io/code-generator/generate-groups.sh | 0 vendor/knative.dev/pkg/hack/generate-knative.sh | 0 8 files changed, 11 insertions(+), 6 deletions(-) mode change 100755 => 100644 vendor/k8s.io/code-generator/generate-groups.sh mode change 100755 => 100644 vendor/knative.dev/pkg/hack/generate-knative.sh diff --git a/third_party/istio-latest/istio-ci-mesh.yaml b/third_party/istio-latest/istio-ci-mesh.yaml index c9dbc1443d..5ce51963a5 100644 --- a/third_party/istio-latest/istio-ci-mesh.yaml +++ b/third_party/istio-latest/istio-ci-mesh.yaml @@ -18,6 +18,7 @@ spec: values: global: proxy: + logLevel: debug autoInject: enabled pilot: autoscaleMin: 3 diff --git a/third_party/istio-latest/istio-ci-mesh/istio.yaml b/third_party/istio-latest/istio-ci-mesh/istio.yaml index 1dc60a70be..69180a94f3 100644 --- a/third_party/istio-latest/istio-ci-mesh/istio.yaml +++ b/third_party/istio-latest/istio-ci-mesh/istio.yaml @@ -7774,7 +7774,7 @@ data: "includeIPRanges": "*", "includeInboundPorts": "*", "includeOutboundPorts": "", - "logLevel": "warning", + "logLevel": "debug", "privileged": false, "readinessFailureThreshold": 30, "readinessInitialDelaySeconds": 1, @@ -9049,7 +9049,7 @@ spec: - router - --domain - $(POD_NAMESPACE).svc.cluster.local - - --proxyLogLevel=warning + - --proxyLogLevel=debug - --proxyComponentLogLevel=misc:error - --log_output_level=default:info env: diff --git a/third_party/istio-latest/istio-ci-no-mesh.yaml b/third_party/istio-latest/istio-ci-no-mesh.yaml index b1dfcf2d3d..6ac426fa98 100644 --- a/third_party/istio-latest/istio-ci-no-mesh.yaml +++ b/third_party/istio-latest/istio-ci-no-mesh.yaml @@ -16,6 +16,9 @@ apiVersion: install.istio.io/v1alpha1 kind: IstioOperator spec: values: + global: + proxy: + logLevel: debug pilot: autoscaleMin: 3 autoscaleMax: 10 diff --git a/third_party/istio-latest/istio-ci-no-mesh/istio.yaml b/third_party/istio-latest/istio-ci-no-mesh/istio.yaml index 0b022047c9..7acef1c21e 100644 --- a/third_party/istio-latest/istio-ci-no-mesh/istio.yaml +++ b/third_party/istio-latest/istio-ci-no-mesh/istio.yaml @@ -7774,7 +7774,7 @@ data: "includeIPRanges": "*", "includeInboundPorts": "*", "includeOutboundPorts": "", - "logLevel": "warning", + "logLevel": "debug", "privileged": false, "readinessFailureThreshold": 30, "readinessInitialDelaySeconds": 1, @@ -9049,7 +9049,7 @@ spec: - router - --domain - $(POD_NAMESPACE).svc.cluster.local - - --proxyLogLevel=warning + - --proxyLogLevel=debug - --proxyComponentLogLevel=misc:error - --log_output_level=default:info env: diff --git a/third_party/istio-latest/istio-kind-no-mesh.yaml b/third_party/istio-latest/istio-kind-no-mesh.yaml index bb1d879b4b..5d320bb009 100644 --- a/third_party/istio-latest/istio-kind-no-mesh.yaml +++ b/third_party/istio-latest/istio-kind-no-mesh.yaml @@ -18,6 +18,7 @@ spec: values: global: proxy: + logLevel: debug clusterDomain: cluster.local pilot: autoscaleMin: 1 diff --git a/third_party/istio-latest/istio-kind-no-mesh/istio.yaml b/third_party/istio-latest/istio-kind-no-mesh/istio.yaml index bf840f22ee..b795b3b24d 100644 --- a/third_party/istio-latest/istio-kind-no-mesh/istio.yaml +++ b/third_party/istio-latest/istio-kind-no-mesh/istio.yaml @@ -7774,7 +7774,7 @@ data: "includeIPRanges": "*", "includeInboundPorts": "*", "includeOutboundPorts": "", - "logLevel": "warning", + "logLevel": "debug", "privileged": false, "readinessFailureThreshold": 30, "readinessInitialDelaySeconds": 1, @@ -9049,7 +9049,7 @@ spec: - router - --domain - $(POD_NAMESPACE).svc.cluster.local - - --proxyLogLevel=warning + - --proxyLogLevel=debug - --proxyComponentLogLevel=misc:error - --log_output_level=default:info env: diff --git a/vendor/k8s.io/code-generator/generate-groups.sh b/vendor/k8s.io/code-generator/generate-groups.sh old mode 100755 new mode 100644 diff --git a/vendor/knative.dev/pkg/hack/generate-knative.sh b/vendor/knative.dev/pkg/hack/generate-knative.sh old mode 100755 new mode 100644 From 296ce46815d7800e05b677c56803bcff5e7f9cfa Mon Sep 17 00:00:00 2001 From: dprotaso Date: Sun, 19 Mar 2023 10:41:09 -0400 Subject: [PATCH 3/6] log probes --- .../test/test_images/runtime/handlers/handler.go | 8 ++++---- .../networking/test/test_images/runtime/main.go | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/vendor/knative.dev/networking/test/test_images/runtime/handlers/handler.go b/vendor/knative.dev/networking/test/test_images/runtime/handlers/handler.go index 9c96b9eded..c56151f6af 100644 --- a/vendor/knative.dev/networking/test/test_images/runtime/handlers/handler.go +++ b/vendor/knative.dev/networking/test/test_images/runtime/handlers/handler.go @@ -30,14 +30,14 @@ import ( // InitHandlers initializes all handlers. func InitHandlers(mux *http.ServeMux) { - mux.HandleFunc("/", withHeaders(withRequestLog(runtimeHandler))) + mux.HandleFunc("/", withHeaders(runtimeHandler)) - h := probe.NewHandler(withRequestLog(withKubeletProbeHeaderCheck)) + h := probe.NewHandler(http.HandlerFunc(withKubeletProbeHeaderCheck)) mux.HandleFunc(nethttp.HealthCheckPath, h.ServeHTTP) } // withRequestLog logs each request before handling it. -func withRequestLog(next http.HandlerFunc) http.HandlerFunc { +func WithRequestLog(next http.HandlerFunc) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { reqDump, err := httputil.DumpRequest(r, true) if err != nil { @@ -73,6 +73,6 @@ func withHeaders(next http.HandlerFunc) http.HandlerFunc { func writeJSON(w http.ResponseWriter, o interface{}) { w.WriteHeader(http.StatusOK) e := json.NewEncoder(w) - e.SetIndent("", "\t") + // e.SetIndent("", "\t") e.Encode(o) } diff --git a/vendor/knative.dev/networking/test/test_images/runtime/main.go b/vendor/knative.dev/networking/test/test_images/runtime/main.go index b860e7ea75..c3b81eb6f3 100644 --- a/vendor/knative.dev/networking/test/test_images/runtime/main.go +++ b/vendor/knative.dev/networking/test/test_images/runtime/main.go @@ -48,11 +48,13 @@ func main() { mux := http.NewServeMux() handlers.InitHandlers(mux) + handler := handlers.WithRequestLog(mux.ServeHTTP) + if cert, key := os.Getenv("CERT"), os.Getenv("KEY"); cert != "" && key != "" { log.Print("Server starting on port with TLS ", port) - test.ListenAndServeTLSGracefullyWithHandler(cert, key, ":"+port, mux) + test.ListenAndServeTLSGracefullyWithHandler(cert, key, ":"+port, handler) } else { log.Print("Server starting on port ", port) - test.ListenAndServeGracefullyWithHandler(":"+port, mux) + test.ListenAndServeGracefullyWithHandler(":"+port, handler) } } From 285b81c685d7f0bdc8f656d345badca114489a86 Mon Sep 17 00:00:00 2001 From: dprotaso Date: Sun, 19 Mar 2023 10:47:38 -0400 Subject: [PATCH 4/6] moare --- .../knative.dev/networking/test/conformance/ingress/util.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vendor/knative.dev/networking/test/conformance/ingress/util.go b/vendor/knative.dev/networking/test/conformance/ingress/util.go index 039e134057..7e9b201287 100644 --- a/vendor/knative.dev/networking/test/conformance/ingress/util.go +++ b/vendor/knative.dev/networking/test/conformance/ingress/util.go @@ -1128,6 +1128,8 @@ func RuntimeRequestWithExpectations(ctx context.Context, t *testing.T, client *h opt(req) } + id := rand.Int() + req.Header.Set("id", strconv.Itoa(id)) resp, err := client.Do(req) if err != nil { @@ -1141,7 +1143,7 @@ func RuntimeRequestWithExpectations(ctx context.Context, t *testing.T, client *h for _, e := range responseExpectations { if err := e(resp); err != nil { - t.Error("Error meeting response expectations:", err) + t.Errorf("[%d] Error meeting response expectations: %v", id, err) DumpResponse(ctx, t, resp) return nil } @@ -1150,7 +1152,7 @@ func RuntimeRequestWithExpectations(ctx context.Context, t *testing.T, client *h if resp.StatusCode == http.StatusOK { b, err := io.ReadAll(resp.Body) if err != nil { - t.Error("Unable to read response body:", err) + t.Errorf("[%d] Unable to read response body: %v", id, err) DumpResponse(ctx, t, resp) return nil } From d415231446e5f8a6c2570bafecf0842d376e06aa Mon Sep 17 00:00:00 2001 From: dprotaso Date: Sun, 19 Mar 2023 16:14:02 -0400 Subject: [PATCH 5/6] GKE telemetry --- test/e2e-tests.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/e2e-tests.sh b/test/e2e-tests.sh index fba153a330..6ee61d6b9c 100755 --- a/test/e2e-tests.sh +++ b/test/e2e-tests.sh @@ -16,6 +16,8 @@ source $(dirname $0)/e2e-common.sh +export ENABLE_GKE_TELEMETRY=true + # Script entry point. initialize $@ --skip-istio-addon From 7462b670c8747e7a4b3a7b5d789830aa07ea78ce Mon Sep 17 00:00:00 2001 From: dprotaso Date: Sun, 19 Mar 2023 19:26:56 -0400 Subject: [PATCH 6/6] add a delay --- .../knative.dev/networking/test/conformance/ingress/run.go | 6 +++--- .../networking/test/conformance/ingress/update.go | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/vendor/knative.dev/networking/test/conformance/ingress/run.go b/vendor/knative.dev/networking/test/conformance/ingress/run.go index d914521d0a..5917caa82c 100644 --- a/vendor/knative.dev/networking/test/conformance/ingress/run.go +++ b/vendor/knative.dev/networking/test/conformance/ingress/run.go @@ -50,13 +50,13 @@ var stableTests = map[string]func(t *testing.T){ var betaTests = map[string]func(t *testing.T){ // Add your conformance test for beta features - "host-rewrite": TestRewriteHost, - "headers/tags": TestTagHeaders, + // "host-rewrite": TestRewriteHost, + // "headers/tags": TestTagHeaders, } var alphaTests = map[string]func(t *testing.T){ // Add your conformance test for alpha features - "httpoption": TestHTTPOption, + // "httpoption": TestHTTPOption, } // RunConformance will run ingress conformance tests diff --git a/vendor/knative.dev/networking/test/conformance/ingress/update.go b/vendor/knative.dev/networking/test/conformance/ingress/update.go index e58c10310d..e2e132f4ec 100644 --- a/vendor/knative.dev/networking/test/conformance/ingress/update.go +++ b/vendor/knative.dev/networking/test/conformance/ingress/update.go @@ -127,6 +127,7 @@ func TestUpdate(t *testing.T) { t.Logf("Rolling out %q w/ %q", nextName, sentinel) + time.Sleep(10 * time.Second) // Update the Ingress, and wait for it to report ready. UpdateIngressReady(ctx, t, clients, ing.Name, v1alpha1.IngressSpec{ Rules: []v1alpha1.IngressRule{{