knative / eventing

Event-driven application platform for Kubernetes
https://knative.dev/docs/eventing
Apache License 2.0
1.42k stars 595 forks source link

Triggers fail with "PhysicalChannelSyncFailed" #2962

Closed trisberg closed 4 years ago

trisberg commented 4 years ago

Describe the bug When creating a trigger it fails with "PhysicalChannelSyncFailed". I'm using in-memory channel as default. I also see 'PhysicalChannelSyncFailed' Failed to synchronize to channel \"default-kne-trigger\": admission webhook \"webhook.eventing.knative.dev\" denied the request: mutation failed: cannot decode incoming new object: json: unknown field \"subscribers\"" in the controller logs.

Expected behavior That the trigger gets created with a READY status

To Reproduce Create a knative service

apiVersion: serving.knative.dev/v1
kind: Service
metadata:
  name: spring-demo
  namespace: default
spec:
  template:
    spec:
      containers:
        - image: trisberg/spring-demo:latest

Then create a trigger using:

apiVersion: eventing.knative.dev/v1beta1
kind: Trigger
metadata:
  name: spring-demo-event
spec:
  broker: default
  filter:
    attributes:
      type: com.example.springevent
  subscriber:
    ref:
      apiVersion: serving.knative.dev/v1
      kind: Service
      name: spring-demo
    uri: event

The status end up being:

$ kubectl get triggers
NAME                READY   REASON                      BROKER    SUBSCRIBER_URI                                       AGE
spring-demo-event   False   PhysicalChannelSyncFailed   default   http://spring-demo.default.svc.cluster.local/event   2m22s

Knative release version 0.13.5 and nightly from 2020-04-07

Additional context The same manifest worked fine with 0.13.0 version of eventing. Kubernetes version is v1.15.11-gke.5

n3wscott commented 4 years ago

What version of the in-memory-channel controller do you have running?

trisberg commented 4 years ago

Hmmm, tried again with Eventing 0.13.5 and a new cluster, couldn't reproduce the issue. Maybe I had some old version resource left on the cluster last time I tried this new version. Closing this issue for now.

n3wscott commented 4 years ago

I can confirm this is happening with eventing nightly release. which is annotated eventing.knative.dev/release: v0.13.6

n3wscott commented 4 years ago

I am going to try with eventing master now.

n3wscott commented 4 years ago

Ok on master it works, I clean installed from current master.

I think this is related to the mid-migration that was happening for IMC last week.

ukclivecox commented 4 years ago

@n3wscott I hit this with istio 1.3.1 and knative 0.14.0. Cluster 1.15.11-gke.3

ukclivecox commented 4 years ago

I'm even getting this on a fresh cluster with 0.13.1 installed. I create a trigger:

apiVersion: eventing.knative.dev/v1alpha1
kind: Trigger
metadata:
  name: vaeoutlier-trigger
  namespace: default
spec:
  filter:
    sourceAndType:
      type: io.seldon.serving.inference.request
  subscriber:
    ref:
      apiVersion: serving.knative.dev/v1alpha1
      kind: Service
      name: vae-outlier

All is fine until the first event hits it: then

Status:                                                                                                                                                                                                                          │
│  Conditions:                                                                                                                                                                                                                    │
│    Last Transition Time:  2020-04-30T14:54:29Z                                                                                                                                                                                  │
│    Status:                True                                                                                                                                                                                                  │
│    Type:                  BrokerReady                                                                                                                                                                                           │
│    Last Transition Time:  2020-04-30T14:54:29Z                                                                                                                                                                                  │
│    Status:                True                                                                                                                                                                                                  │
│    Type:                  DependencyReady                                                                                                                                                                                       │
│    Last Transition Time:  2020-04-30T14:54:29Z                                                                                                                                                                                  │
│    Message:               Failed to sync physical Channel: admission webhook "webhook.eventing.knative.dev" denied the request: mutation failed: cannot decode incoming new object: json: unknown field "subscribers"           │
│    Reason:                PhysicalChannelSyncFailed                                                                                                                                                                             │
│    Status:                False                                                                                                                                                                                                 │
│    Type:                  Ready                                                                                                                                                                                                 │
│    Last Transition Time:  2020-04-30T14:54:29Z                                                                                                                                                                                  │
│    Message:               Failed to sync physical Channel: admission webhook "webhook.eventing.knative.dev" denied the request: mutation failed: cannot decode incoming new object: json: unknown field "subscribers"           │
│    Reason:                PhysicalChannelSyncFailed                                                                                                                                                                             │
│    Status:                False                                                                                                                                                                                                 │
│    Type:                  Subscribed                                                                                                                                                                                            │
│    Last Transition Time:  2020-04-30T14:54:29Z                                                   
matzew commented 4 years ago

it was fixed on HEAD and ported to 0.14:

https://github.com/knative/eventing/commit/4a7a081cccd98468545985445249b557d01ec89f

we can release a 0.14.x "soon" :tm:

ukclivecox commented 4 years ago

Thanks @matzew Any reason I should hit this in a 0.13.1 fresh installed when previously I had not hit this?

matzew commented 4 years ago

all I say is with the upcoming 0.14.2 it is fixed

I dont think we cherry pick it to 0.13.x 🤔

On Thu 30. Apr 2020 at 18:27, cliveseldon notifications@github.com wrote:

Thanks @matzew https://github.com/matzew Any reason I should hit this in a 0.13.1 fresh installed when previously I had not hit this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/knative/eventing/issues/2962#issuecomment-621960886, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABGPTSKJ7TRCZLWICZ4IHTRPGRGFANCNFSM4MFRYYMQ .

-- Sent from Gmail Mobile

Harwayne commented 4 years ago

0.14.2 has been cut and should include the fix.

ukclivecox commented 4 years ago

Thanks @Harwayne . Tested and works for me with 0.14.2.