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

Reconciler loop when trigger does not have broker #2103

Closed zhongduo closed 3 years ago

zhongduo commented 3 years ago

Describe the bug When a trigger does not have broker, the following error logs will be running forever.

controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.090010886Z","logger":"controller.event-broadcaster","caller":"record/event.go:278","message":"Event(v1.ObjectReference{Kind:\"Trigger\", Namespace:\"events-system-example\", Name:\"goodbye-display\", UID:\"26786e6d-ba63-4b8f-8b00-9f31163461f3\", APIVersion:\"eventing.knative.dev/v1beta1\", ResourceVersion:\"50625278\", FieldPath:\"\"}): type: 'Normal' reason: 'TriggerFinalized' Trigger finalized: \"events-system-example/goodbye-display\"","commit":"9e31468"}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.129568948Z","logger":"controller","caller":"trigger/reconciler.go:289","message":"Returned an event","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.trigger.Reconciler","knative.dev/kind":"eventing.knative.dev.Trigger","knative.dev/traceid":"9d9fc2aa-72cc-4ce9-9b93-e7ad1173da01","knative.dev/key":"events-system-example/goodbye-display","targetMethod":"ReconcileKind","event":"Trigger finalized: \"events-system-example/goodbye-display\""}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.12965812Z","logger":"controller","caller":"controller/controller.go:530","message":"Reconcile succeeded","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.trigger.Reconciler","knative.dev/kind":"eventing.knative.dev.Trigger","knative.dev/traceid":"9d9fc2aa-72cc-4ce9-9b93-e7ad1173da01","knative.dev/key":"events-system-example/goodbye-display","duration":"40.166085ms"}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.129943625Z","logger":"controller.event-broadcaster","caller":"record/event.go:278","message":"Event(v1.ObjectReference{Kind:\"Trigger\", Namespace:\"events-system-example\", Name:\"goodbye-display\", UID:\"26786e6d-ba63-4b8f-8b00-9f31163461f3\", APIVersion:\"eventing.knative.dev/v1beta1\", ResourceVersion:\"50625324\", FieldPath:\"\"}): type: 'Normal' reason: 'TriggerFinalized' Trigger finalized: \"events-system-example/goodbye-display\"","commit":"9e31468"}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.167167219Z","logger":"controller","caller":"controller/controller.go:530","message":"Reconcile succeeded","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.brokercell.Reconciler","knative.dev/kind":"internal.events.cloud.google.com.BrokerCell","knative.dev/traceid":"02a7a379-d30c-4882-a8c6-fef5c583f930","knative.dev/key":"events-system/default","duration":"40.163µs"}
controller-7846bb5cc4-672tg controller {"severity":"ERROR","timestamp":"2021-01-28T19:02:02.167329938Z","logger":"controller","caller":"trigger/trigger.go:106","message":"Trigger does not have broker","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.trigger.Reconciler","knative.dev/kind":"eventing.knative.dev.Trigger","knative.dev/traceid":"4be510ab-bbbd-478f-82c7-974059651ed7","knative.dev/key":"events-system-example/goodbye-display","namespace":"events-system-example","trigger":"goodbye-display","broker":"test-broker","stacktrace":"github.com/google/knative-gcp/pkg/reconciler/trigger.(*Reconciler).ReconcileKind\n\tgithub.com/google/knative-gcp/pkg/reconciler/trigger/trigger.go:106\ngithub.com/google/knative-gcp/pkg/client/injection/reconciler/broker/v1beta1/trigger.(*reconcilerImpl).Reconcile\n\tgithub.com/google/knative-gcp/pkg/client/injection/reconciler/broker/v1beta1/trigger/reconciler.go:241\nknative.dev/pkg/controller.(*Impl).processNextWorkItem\n\tknative.dev/pkg@v0.0.0-20210124203454-7101e9d4f6c6/controller/controller.go:522\nknative.dev/pkg/controller.(*Impl).RunContext.func3\n\tknative.dev/pkg@v0.0.0-20210124203454-7101e9d4f6c6/controller/controller.go:460"}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.167929311Z","logger":"controller","caller":"trigger/reconciler.go:289","message":"Returned an event","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.trigger.Reconciler","knative.dev/kind":"eventing.knative.dev.Trigger","knative.dev/traceid":"e166b288-93be-4993-b415-7c8545b627e0","knative.dev/key":"events-system-example/hello-display","targetMethod":"ReconcileKind","event":"Trigger finalized: \"events-system-example/hello-display\""}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.16797571Z","logger":"controller","caller":"controller/controller.go:530","message":"Reconcile succeeded","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.trigger.Reconciler","knative.dev/kind":"eventing.knative.dev.Trigger","knative.dev/traceid":"e166b288-93be-4993-b415-7c8545b627e0","knative.dev/key":"events-system-example/hello-display","duration":"111.446072ms"}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.168262085Z","logger":"controller.event-broadcaster","caller":"record/event.go:278","message":"Event(v1.ObjectReference{Kind:\"Trigger\", Namespace:\"events-system-example\", Name:\"hello-display\", UID:\"91d7bd37-c4bb-443e-9e48-01bec26d486c\", APIVersion:\"eventing.knative.dev/v1beta1\", ResourceVersion:\"50625323\", FieldPath:\"\"}): type: 'Normal' reason: 'TriggerFinalized' Trigger finalized: \"events-system-example/hello-display\"","commit":"9e31468"}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.172555092Z","logger":"controller","caller":"controller/controller.go:530","message":"Reconcile succeeded","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.brokercell.Reconciler","knative.dev/kind":"internal.events.cloud.google.com.BrokerCell","knative.dev/traceid":"32cf7428-dd2c-4035-a511-e42324785adf","knative.dev/key":"events-system/default","duration":"34.558µs"}
controller-7846bb5cc4-672tg controller {"severity":"ERROR","timestamp":"2021-01-28T19:02:02.172687396Z","logger":"controller","caller":"trigger/trigger.go:106","message":"Trigger does not have broker","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.trigger.Reconciler","knative.dev/kind":"eventing.knative.dev.Trigger","knative.dev/traceid":"08dfa435-5210-4232-9720-407f93961066","knative.dev/key":"events-system-example/hello-display","namespace":"events-system-example","trigger":"hello-display","broker":"test-broker","stacktrace":"github.com/google/knative-gcp/pkg/reconciler/trigger.(*Reconciler).ReconcileKind\n\tgithub.com/google/knative-gcp/pkg/reconciler/trigger/trigger.go:106\ngithub.com/google/knative-gcp/pkg/client/injection/reconciler/broker/v1beta1/trigger.(*reconcilerImpl).Reconcile\n\tgithub.com/google/knative-gcp/pkg/client/injection/reconciler/broker/v1beta1/trigger/reconciler.go:241\nknative.dev/pkg/controller.(*Impl).processNextWorkItem\n\tknative.dev/pkg@v0.0.0-20210124203454-7101e9d4f6c6/controller/controller.go:522\nknative.dev/pkg/controller.(*Impl).RunContext.func3\n\tknative.dev/pkg@v0.0.0-20210124203454-7101e9d4f6c6/controller/controller.go:460"}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.178313831Z","logger":"controller","caller":"trigger/reconciler.go:289","message":"Returned an event","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.trigger.Reconciler","knative.dev/kind":"eventing.knative.dev.Trigger","knative.dev/traceid":"08dfa435-5210-4232-9720-407f93961066","knative.dev/key":"events-system-example/hello-display","targetMethod":"ReconcileKind","event":"Trigger finalized: \"events-system-example/hello-display\""}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.178383038Z","logger":"controller","caller":"controller/controller.go:530","message":"Reconcile succeeded","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.trigger.Reconciler","knative.dev/kind":"eventing.knative.dev.Trigger","knative.dev/traceid":"08dfa435-5210-4232-9720-407f93961066","knative.dev/key":"events-system-example/hello-display","duration":"5.74118ms"}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.178652448Z","logger":"controller.event-broadcaster","caller":"record/event.go:278","message":"Event(v1.ObjectReference{Kind:\"Trigger\", Namespace:\"events-system-example\", Name:\"hello-display\", UID:\"91d7bd37-c4bb-443e-9e48-01bec26d486c\", APIVersion:\"eventing.knative.dev/v1beta1\", ResourceVersion:\"50625326\", FieldPath:\"\"}): type: 'Normal' reason: 'TriggerFinalized' Trigger finalized: \"events-system-example/hello-display\"","commit":"9e31468"}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.276773258Z","logger":"controller","caller":"controller/controller.go:530","message":"Reconcile succeeded","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.brokercell.Reconciler","knative.dev/kind":"internal.events.cloud.google.com.BrokerCell","knative.dev/traceid":"7b7345e0-1415-497f-bfe6-fcd3aecabfc4","knative.dev/key":"events-system/default","duration":"44.181µs"}
controller-7846bb5cc4-672tg controller {"severity":"ERROR","timestamp":"2021-01-28T19:02:02.27699925Z","logger":"controller","caller":"trigger/trigger.go:106","message":"Trigger does not have broker","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.trigger.Reconciler","knative.dev/kind":"eventing.knative.dev.Trigger","knative.dev/traceid":"ec1f92ac-1fd5-4d65-b0eb-735c7f4d2521","knative.dev/key":"events-system-example/hello-display","namespace":"events-system-example","trigger":"hello-display","broker":"test-broker","stacktrace":"github.com/google/knative-gcp/pkg/reconciler/trigger.(*Reconciler).ReconcileKind\n\tgithub.com/google/knative-gcp/pkg/reconciler/trigger/trigger.go:106\ngithub.com/google/knative-gcp/pkg/client/injection/reconciler/broker/v1beta1/trigger.(*reconcilerImpl).Reconcile\n\tgithub.com/google/knative-gcp/pkg/client/injection/reconciler/broker/v1beta1/trigger/reconciler.go:241\nknative.dev/pkg/controller.(*Impl).processNextWorkItem\n\tknative.dev/pkg@v0.0.0-20210124203454-7101e9d4f6c6/controller/controller.go:522\nknative.dev/pkg/controller.(*Impl).RunContext.func3\n\tknative.dev/pkg@v0.0.0-20210124203454-7101e9d4f6c6/controller/controller.go:460"}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.287638776Z","logger":"controller","caller":"controller/controller.go:530","message":"Reconcile succeeded","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.brokercell.Reconciler","knative.dev/kind":"internal.events.cloud.google.com.BrokerCell","knative.dev/traceid":"bebebc12-5fee-4999-aa42-a73fc434d79c","knative.dev/key":"events-system/default","duration":"28.48µs"}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.290217881Z","logger":"controller","caller":"trigger/reconciler.go:289","message":"Returned an event","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.trigger.Reconciler","knative.dev/kind":"eventing.knative.dev.Trigger","knative.dev/traceid":"4be510ab-bbbd-478f-82c7-974059651ed7","knative.dev/key":"events-system-example/goodbye-display","targetMethod":"ReconcileKind","event":"Trigger finalized: \"events-system-example/goodbye-display\""}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.290287314Z","logger":"controller","caller":"controller/controller.go:530","message":"Reconcile succeeded","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.trigger.Reconciler","knative.dev/kind":"eventing.knative.dev.Trigger","knative.dev/traceid":"4be510ab-bbbd-478f-82c7-974059651ed7","knative.dev/key":"events-system-example/goodbye-display","duration":"123.016533ms"}
controller-7846bb5cc4-672tg controller {"severity":"ERROR","timestamp":"2021-01-28T19:02:02.290393704Z","logger":"controller","caller":"trigger/trigger.go:106","message":"Trigger does not have broker","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.trigger.Reconciler","knative.dev/kind":"eventing.knative.dev.Trigger","knative.dev/traceid":"3b747e20-8e41-4b99-bb91-890cd4cf2b02","knative.dev/key":"events-system-example/goodbye-display","namespace":"events-system-example","trigger":"goodbye-display","broker":"test-broker","stacktrace":"github.com/google/knative-gcp/pkg/reconciler/trigger.(*Reconciler).ReconcileKind\n\tgithub.com/google/knative-gcp/pkg/reconciler/trigger/trigger.go:106\ngithub.com/google/knative-gcp/pkg/client/injection/reconciler/broker/v1beta1/trigger.(*reconcilerImpl).Reconcile\n\tgithub.com/google/knative-gcp/pkg/client/injection/reconciler/broker/v1beta1/trigger/reconciler.go:241\nknative.dev/pkg/controller.(*Impl).processNextWorkItem\n\tknative.dev/pkg@v0.0.0-20210124203454-7101e9d4f6c6/controller/controller.go:522\nknative.dev/pkg/controller.(*Impl).RunContext.func3\n\tknative.dev/pkg@v0.0.0-20210124203454-7101e9d4f6c6/controller/controller.go:460"}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.290868596Z","logger":"controller.event-broadcaster","caller":"record/event.go:278","message":"Event(v1.ObjectReference{Kind:\"Trigger\", Namespace:\"events-system-example\", Name:\"goodbye-display\", UID:\"26786e6d-ba63-4b8f-8b00-9f31163461f3\", APIVersion:\"eventing.knative.dev/v1beta1\", ResourceVersion:\"50625325\", FieldPath:\"\"}): type: 'Normal' reason: 'TriggerFinalized' Trigger finalized: \"events-system-example/goodbye-display\"","commit":"9e31468"}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.371675878Z","logger":"controller","caller":"controller/controller.go:530","message":"Reconcile succeeded","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.brokercell.Reconciler","knative.dev/kind":"internal.events.cloud.google.com.BrokerCell","knative.dev/traceid":"0b04784d-77cf-47e1-8160-a397e3414ea9","knative.dev/key":"events-system/default","duration":"38.396µs"}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.381507351Z","logger":"controller","caller":"controller/controller.go:530","message":"Reconcile succeeded","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.brokercell.Reconciler","knative.dev/kind":"internal.events.cloud.google.com.BrokerCell","knative.dev/traceid":"67b14c56-e72d-43a5-b010-05b2d73387a7","knative.dev/key":"events-system/default","duration":"38.909µs"}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.383557365Z","logger":"controller","caller":"trigger/reconciler.go:289","message":"Returned an event","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.trigger.Reconciler","knative.dev/kind":"eventing.knative.dev.Trigger","knative.dev/traceid":"ec1f92ac-1fd5-4d65-b0eb-735c7f4d2521","knative.dev/key":"events-system-example/hello-display","targetMethod":"ReconcileKind","event":"Trigger finalized: \"events-system-example/hello-display\""}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.383624713Z","logger":"controller","caller":"controller/controller.go:530","message":"Reconcile succeeded","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.trigger.Reconciler","knative.dev/kind":"eventing.knative.dev.Trigger","knative.dev/traceid":"ec1f92ac-1fd5-4d65-b0eb-735c7f4d2521","knative.dev/key":"events-system-example/hello-display","duration":"106.678217ms"}
controller-7846bb5cc4-672tg controller {"severity":"ERROR","timestamp":"2021-01-28T19:02:02.383727821Z","logger":"controller","caller":"trigger/trigger.go:106","message":"Trigger does not have broker","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.trigger.Reconciler","knative.dev/kind":"eventing.knative.dev.Trigger","knative.dev/traceid":"1a3bc8f8-a397-497f-91d3-f092dac0dd3e","knative.dev/key":"events-system-example/hello-display","namespace":"events-system-example","trigger":"hello-display","broker":"test-broker","stacktrace":"github.com/google/knative-gcp/pkg/reconciler/trigger.(*Reconciler).ReconcileKind\n\tgithub.com/google/knative-gcp/pkg/reconciler/trigger/trigger.go:106\ngithub.com/google/knative-gcp/pkg/client/injection/reconciler/broker/v1beta1/trigger.(*reconcilerImpl).Reconcile\n\tgithub.com/google/knative-gcp/pkg/client/injection/reconciler/broker/v1beta1/trigger/reconciler.go:241\nknative.dev/pkg/controller.(*Impl).processNextWorkItem\n\tknative.dev/pkg@v0.0.0-20210124203454-7101e9d4f6c6/controller/controller.go:522\nknative.dev/pkg/controller.(*Impl).RunContext.func3\n\tknative.dev/pkg@v0.0.0-20210124203454-7101e9d4f6c6/controller/controller.go:460"}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.38423478Z","logger":"controller.event-broadcaster","caller":"record/event.go:278","message":"Event(v1.ObjectReference{Kind:\"Trigger\", Namespace:\"events-system-example\", Name:\"hello-display\", UID:\"91d7bd37-c4bb-443e-9e48-01bec26d486c\", APIVersion:\"eventing.knative.dev/v1beta1\", ResourceVersion:\"50625333\", FieldPath:\"\"}): type: 'Normal' reason: 'TriggerFinalized' Trigger finalized: \"events-system-example/hello-display\"","commit":"9e31468"}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.394931303Z","logger":"controller","caller":"trigger/reconciler.go:289","message":"Returned an event","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.trigger.Reconciler","knative.dev/kind":"eventing.knative.dev.Trigger","knative.dev/traceid":"1a3bc8f8-a397-497f-91d3-f092dac0dd3e","knative.dev/key":"events-system-example/hello-display","targetMethod":"ReconcileKind","event":"Trigger finalized: \"events-system-example/hello-display\""}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.395013711Z","logger":"controller","caller":"controller/controller.go:530","message":"Reconcile succeeded","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.trigger.Reconciler","knative.dev/kind":"eventing.knative.dev.Trigger","knative.dev/traceid":"1a3bc8f8-a397-497f-91d3-f092dac0dd3e","knative.dev/key":"events-system-example/hello-display","duration":"11.346513ms"}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.39540714Z","logger":"controller.event-broadcaster","caller":"record/event.go:278","message":"Event(v1.ObjectReference{Kind:\"Trigger\", Namespace:\"events-system-example\", Name:\"hello-display\", UID:\"91d7bd37-c4bb-443e-9e48-01bec26d486c\", APIVersion:\"eventing.knative.dev/v1beta1\", ResourceVersion:\"50625339\", FieldPath:\"\"}): type: 'Normal' reason: 'TriggerFinalized' Trigger finalized: \"events-system-example/hello-display\"","commit":"9e31468"}
controller-7846bb5cc4-672tg controller {"severity":"INFO","timestamp":"2021-01-28T19:02:02.41241229Z","logger":"controller","caller":"controller/controller.go:530","message":"Reconcile succeeded","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.brokercell.Reconciler","knative.dev/kind":"internal.events.cloud.google.com.BrokerCell","knative.dev/traceid":"35bf5df8-a199-4235-ad00-e5e2481ece05","knative.dev/key":"events-system/default","duration":"37.812µs"}
controller-7846bb5cc4-672tg controller {"severity":"ERROR","timestamp":"2021-01-28T19:02:02.412590922Z","logger":"controller","caller":"trigger/trigger.go:106","message":"Trigger does not have broker","commit":"9e31468","knative.dev/controller":"github.com.google.knative-gcp.pkg.reconciler.trigger.Reconciler","knative.dev/kind":"eventing.knative.dev.Trigger","knative.dev/traceid":"9ebccbf7-3338-4165-9014-edf038731002","knative.dev/key":"events-system-example/hello-display","namespace":"events-system-example","trigger":"hello-display","broker":"test-broker","stacktrace":"github.com/google/knative-gcp/pkg/reconciler/trigger.(*Reconciler).ReconcileKind\n\tgithub.com/google/knative-gcp/pkg/reconciler/trigger/trigger.go:106\ngithub.com/google/knative-gcp/pkg/client/injection/reconciler/broker/v1beta1/trigger.(*reconcilerImpl).Reconcile\n\tgithub.com/google/knative-gcp/pkg/client/injection/reconciler/broker/v1beta1/trigger/reconciler.go:241\nknative.dev/pkg/controller.(*Impl).processNextWorkItem\n\tknative.dev/pkg@v0.0.0-20210124203454-7101e9d4f6c6/controller/controller.go:522\nknative.dev/pkg/controller.(*Impl).RunContext.func3\n\tknative.dev/pkg@v0.0.0-20210124203454-7101e9d4f6c6/controller/controller.go:460"}

Expected behavior

The log should happen every resync period, which is 5 seconds.

To Reproduce Deploy the example without the broker and check the controller log.

zhongduo commented 3 years ago

This is caused by both gcp broker and knative brokers such as mtbroker are trying to reconcile the Triggers without associated broker. The trigger status will be updated constantly, which causes more reconciliation. After removing the MT broker controller, it is working as expected.

I think the problem is larger than knative-gcp, the root cause is all the brokers might want to reconcile triggers without a broker, but if no one reconcile it, it can not have the right "BrokerDoesNotExist" status. So I think the proper way is to 1) have a set of predefined error status in knative eventing which can be called by any brokers multiple times without really changing the status, eg don't commit the same error. Or this logic can be just in knative eventing controller. 2) when the trigger does not have associated broker, no broker-specific status can be set