google / knative-gcp

GCP event implementations to use with Knative Eventing.
https://github.com/knative/eventing
Apache License 2.0
160 stars 74 forks source link

Fanout trying to create handler goroutine for knative eventing broker/trigger #2094

Closed zhongduo closed 3 years ago

zhongduo commented 3 years ago

Describe the bug When the cluster has knative eventing broker and trigger, the broker fanout pod will try to create handler goroutine for the knative eventing trigger, which will result in the following error in stackdriver log.

{
insertId: "d224dig4e75pew"
jsonPayload: {
logger: "broker-fanout"
message: "handler for broker has stopped with error"
commit: "5e6049b"
knative.dev/pod: "default-brokercell-fanout-7cc748475c-f69cz"
caller: "handler/fanout.go:180"
logging.googleapis.com/sourceLocation: {3}
timestamp: "2021-01-26T15:11:24.507992023Z"
broker: "BROKER:event-example//default"
error: "rpc error: code = NotFound desc = Resource not found (resource=cre-bkr_event-example_default_3ac6629b-e9aa-4f78-b2e6-4233102b2a99)."
stacktrace: "github.com/google/knative-gcp/pkg/broker/handler.(*FanoutPool).SyncOnce.func2.1
    github.com/google/knative-gcp/pkg/broker/handler/fanout.go:180
github.com/google/knative-gcp/pkg/broker/handler.(*Handler).Start.func1
    github.com/google/knative-gcp/pkg/broker/handler/handler.go:76"
}
resource: {2}
timestamp: "2021-01-26T15:11:24.508537436Z"
severity: "ERROR"
labels: {5}
logName: "projects/jimmy-knative-dev/logs/stderr"
receiveTimestamp: "2021-01-26T15:11:25.014272940Z"
}

Expected behavior Fanout will not try to create the handler for knative eventing triggers.

To Reproduce After installing both knative eventing and knative gcp, follow https://knative.dev/docs/eventing/getting-started/ to create eventing broker and trigger. Then check the log in stackdriver.