Skip to content

HTTP2 outbound traffic be converted to HTTP1 incorrectly when using egressgateway #6872

@crowfrog

Description

@crowfrog

Describe the bug
I create egressgateway/serviceentry/virtualservice for HTTP2 outbound traffic.

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: istio-egressgateway
spec:
  selector:
    istio: egressgateway
  servers:
  - port:
      number: 80
      name: http2
      protocol: HTTP2
    hosts:
    - "*.mytest.com"
---
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
  name: httpbin-ext
spec:
  hosts:
  - "*.mytest.com"
  location: MESH_EXTERNAL
  ports:
  - number: 31490
    name: http2-port
    protocol: HTTP2
  resolution: DNS
  endpoints:
  - address: 150.132.165.169
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: httpbin-ext
spec:
  hosts:
  - "*.mytest.com"
  gateways:
  - istio-egressgateway
  - mesh
  http:
  - match:
    - gateways:
      - mesh
      port: 80
    route:
    - destination:
        host: istio-egressgateway.istio-system.svc.cluster.local
        port:
          number: 80
  - match:
    - gateways:
      - istio-egressgateway
      port: 80
    route:
    - destination:
        host: "*.mytest.com"
        port:
          number: 31490

When I send a HTTP2 GET request to "www.mytest.com:31490", I found the traffic is HTTP1 between test POD and egressgateway POD by wireshark capturing.
And the traffic between egressgateway POD and "www.mytest.com" is tcp stream and can be decoded as HTTP2.

ps: "www.mytest.com:31490" is my test service out of k8s kluster

Expected behavior
all traffic should be keep as HTTP2

Steps to reproduce the bug
see above

Version
Minikube 0.25.0

$ istioctl version
Version: 0.8.0
GitRevision: 6f9f420
User: root@48d5ddfd72da
Hub: docker.io/istio
GolangVersion: go1.10.1
BuildStatus: Clean

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.2", GitCommit:"5fa2db2bd46ac79e5e00a4e6ed24191080aa463b", GitTreeState:"clean", BuildDate:"2018-01-18T10:09:24Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"", Minor:"", GitVersion:"v1.9.0", GitCommit:"925c127ec6b946659ad0fd596fa959be43f0cc05", GitTreeState:"clean", BuildDate:"2018-01-26T19:04:38Z", GoVersion:"go1.9.1", Compiler:"gc", Platform:"linux/amd64"}

Is Istio Auth enabled or not?
Not

Environment
NA

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions