Uploaded image for project: 'Knative Serving'
  1. Knative Serving
  2. SRVKS-378

Connecting to cluster-local ksvc from namespaces not in knative-serving-ingress SMMR fails on "i/o timeout" to cluster-local-gateway

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 1.4.0
    • 1.3.0, 1.4.0
    • None
    • Serverless Sprint 178

      Having an inmemorychannel sinked into a knative serving Service fails with the dispatcher unable to connect to the cluster-local-gateway (in knative-serving-ingress )

      {"level":"error","ts":"2019-12-17T14:47:02.079Z","logger":"inmemorychannel_dispatcher.in-memory-channel-dispatcher","caller":"fanout/fanout_handler.go:120","msg":"Fanout had an error","knative.dev/controller":"in-memory-channel-dispatcher
      ","error":"unable to complete request to http://event-display.foobar.svc.cluster.local: Post http://event-display.foobar.svc.cluster.local: dial tcp 172.30.219.140:80: i/o timeout","stacktrace":"knative.dev/eventing/pkg/channel/fanout.(*H
      andler).dispatch\n\t/go/src/knative.dev/eventing/pkg/channel/fanout/fanout_handler.go:120\nknative.dev/eventing/pkg/channel/fanout.createReceiverFunction.func1.1\n\t/go/src/knative.dev/eventing/pkg/channel/fanout/fanout_handler.go:94"}
      

      Reproducer

      apiVersion: sources.eventing.knative.dev/v1alpha1
      kind: ContainerSource
      metadata:
        name: test-heartbeats
      spec:
        template:
          spec:
            containers:
              - image: docker.io/matzew/kube-heartbeat
                name: heartbeats
                args:
                  - --period=1
                env:
                  - name: POD_NAME
                    value: "mypod"
                  - name: POD_NAMESPACE
                    value: "event-test"
        sink:
          apiVersion: messaging.knative.dev/v1alpha1
          kind: InMemoryChannel
          name: channel
      ---
      apiVersion: serving.knative.dev/v1
      kind: Service
      metadata:
        name: event-display
      spec:
        template:
          spec:
            containers:
            - image: gcr.io/knative-releases/github.com/knative/eventing-sources/cmd/event_display
      ---
      apiVersion: messaging.knative.dev/v1alpha1
      kind: InMemoryChannel
      metadata:
        name: channel
      ---
      apiVersion: messaging.knative.dev/v1alpha1
      kind: Subscription
      metadata:
        name: subscription
      spec:
        channel:
          apiVersion: messaging.knative.dev/v1alpha1
          kind: InMemoryChannel
          name: channel
        subscriber:
          ref:
            apiVersion: serving.knative.dev/v1
            kind: Service
            name: event-display
      ---
      

      Workaround

      oc create -f - <<EOF
      apiVersion: extensions/v1beta1
      kind: NetworkPolicy
      metadata:
        name: cluster-local-gateway
        namespace: knative-serving-ingress
      spec:
        ingress:
        - from:
          - namespaceSelector: {}
        podSelector:
          matchLabels:
            istio: cluster-local-gateway
        policyTypes:
        - Ingress
      EOF
      

              sashture Savita .
              maschmid@redhat.com Marek Schmidt
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: