-
Notifications
You must be signed in to change notification settings - Fork 225
Error: "Trigger had a different UID" #1520
Comments
After playing around with this some more, it looks like I can't delete and then re-publish another trigger with the same name. The broker filter never forgets the original, and never updates it with the new one. It's probably relevant to mention that I was managing my K service with helm. And as I was doing a lot of testing and debugging, I was doing a lot of |
@MPeyrard86 thanks for the report and sorry you're having trouble. Have you tried reproducing this with a more recent version than 0.14.1? |
Not yet. We plan on upgrading in the near future when we upgrade our version of Kubernetes. |
@MPeyrard86 would you be willing to provide a bit more yaml so that we could more easily reproduce your setup? Have you tried eventing release v0.14.2? An alternative might be to try running the conformance tests on your currently setup broker, which can be done by running in a similar manner to e2e tests: |
@lberk When I run this command, it tells me that there are no tests to run. I assume I did something wrong.
We will likely upgrade to the latest knative version once we upgrade our version of Kubernetes. I've also done some more digging, and it seems like deleting triggers is very problematic. Even when I delete them via
Rebooting the broker pods does not resolve this issue. Furthermore, physically rebooting the hardware that Kubernetes is running on also did not resolve this issue. It still thinks these triggers exist. Very confusing. I'm going to continue investigating, but as of right now, it would appear that once I've deleted a trigger, events no longer propagate within the system, and we start seeing errors in the broker's filter logs. I currently cannot say if it's a single delete or a series of deletes (maybe something with a random chance of happening?), but we end up in this state where nothing in knative eventing works anymore, and we need to restore snapshots of our k8s images and re-install everything. |
If it persists across reboots, it must be in etcd. This suggests to me that the issue is related to some resource that's not being cleaned up properly. Just to reduce the size of the uncertainty cone, can you tell us which broker class you're using? An easy way to tell is by checking for an annotation on the Broker like Something to try in the meantime:
If deleting the trigger in 2 didn't correctly revert the changes you observed in 1, that's likely related to the issue. |
We are currently using the
|
I assume the deleted Trigger is the one corresponding to the Subscription with UID Here's a 3rd debugging step: Create the trigger again with the same name. What changes in the Channel spec? |
I confirmed that the
To summarize: It shows four subscribers in the channel spec, when in fact there are only two. Those that are on |
@grantr So it sounds like a |
@MPeyrard86 yes please! |
Seems like a KafkaChannel-specific error, or possibly a Subscription controller error. The Broker seems to be operating correctly but something in the KafkaChannel controller or the Subscription controller is not working properly. |
@slinkydeveloper Can you move this issue to eventing-contrib (or whatever repo Kafka Channel lives in these days)? @vaikas you might try reproing this with IMC to check if it's a subscription controller issue. |
Ok, so I've been playing with this from the head with the following set up: Broker:
PingSource:
And two functions:
and:
And by creating an initial trigger like this:
Then I've done things like:
So, the TL;DR I can't seem to be able to repro this (or I'm trying to repro it incorrectly). Of course this is from the head, so maybe something was fixed along the way and it was broken in the version you are running. If it's not a huge pain, @MPeyrard86 could you try running with IMC instead of Kafka channel or alternatively, @slinkydeveloper could you try to repro with Kafka channels from the head to see if it's a bug? |
Thanks for looking into it! Yeah, I'll give it a try with IMC. And yes, I think it's probably a KafkaChannel issue. We've been seeing some stability issues with the Kafka Channel. Since logging the bug, we've also seen this issue coincide with the |
superduper, thanks much and sorry for the troubles :( |
Just checking if you have had any luck trying to repro this. @slinkydeveloper any luck on kafka? Is there an issue we could link from here? |
Hi @vaikas After adding and deleting a trigger using the in-memory channel, I see this:
As you can see, the subscription is still there, with I created the broker like this:
And the trigger like this:
Could this somehow be a problem that's specific to my cluster? I'm not sure how... |
Hey people, I'm going to give look at this soon /assign |
@MPeyrard86 which version of eventing are you using? eventing 0.14 is quite old and some things changed since then 😄 |
@slinkydeveloper We are still using 0.14. But we're probably due for another upgrade. |
Possibly related to #1560 |
Ok, so tried to repro this from the head with those steps and I couldn't:
So, I wonder if something was fixed along the way. When are you planning on ugprading? Also, FYI, there was an issue with some of the releases when going from .16 to .17, but it should have been fixed in the later dot releases. @Harwayne which is the one that has been fixed? |
I have put in a request to get our Kubernetes version upgraded, as that is blocking us from upgrading Knative. As soon as that happens, I will be upgrading Knative and trying this again. |
ok, thanks and sorry about the trouble :( |
No worries. This isn't affecting production or anything. We're using Knative to develop a new feature that hasn't shipped yet. |
Quick update: We're finally getting our Kubernetes upgraded to version 1.18. Should happen in the next week or two. I'll be upgrading Knative to 0.18 as soon as that's done and update this bug with the results. |
I also met exactly same issue with @mpeyrard . |
@pandagodyyy when you say it's easy to reproduce, if you can reliably reproduce it that would be great? I think both @slinkydeveloper and I tried to repro this and couldn't. I'll try to see if I can do it from .19 today and report back. But in the meantime if you have an easy repro (esp. with IMC) that would be great to share :) |
@vaikas, I left message and went to bed yesterday, and when I wakes up today, I found the triggers works as expected. It seem it took several hours for recovering.
apiVersion: eventing.knative.dev/v1
|
I did not enable local cluster gateway (I do not know if it is necessary, event seems can work without local cluster gateway). |
I have not yet tried with a higher version, because I'm still waiting for my DevOps team to upgrade our version of Kubernetes. I've since noticed that it does not happen 100% of the time. Work-around seems to be to re-install the broker. |
This issue is stale because it has been open for 90 days with no |
Describe the bug
I have configured two Knative Services to communicate with each other via Knative Eventing. Our system manually creates the broker via yaml files (as opposed to installing the broker via annotation), as well as the trigger. The broker is backed by the Kafka Channel that is provided under Knative contrib. The service that produces the event does an HTTP POST to the broker address, which accepts the event with a 202 code. Using Kafka Tools, we have been able to confirm that the Cloud Event is deposited into the appropriate Kafka topic. However, the endpoint on the target service is never invoked. We have checked and re-checked that the
CE-type
attribute on the event matches the filter in the trigger. We have also double-checked that the endpoint on the target service is reachable by manually hitting it using postman.Upon investigating the logs in the broker filter logs, we find the error message:
I am not currently certain if this is a bug or some kind of misconfiguration on my end. However, if we assume that it is the latter, then this error message has not been very helpful in figuring out what is wrong.
Since it seems to be complaining about my Trigger specifically, I'll copy it here:
Expected behavior
We expected the Cloud Events to arrive at the configured destination.
To Reproduce
With the current state of my project, this is what I'm doing to reproduce it:
detector
and the other is calledrouter
. The detector looks at sensor data and sends Cloud Events to the router via the broker when a pattern is found. But I would expect simple placeholder services to suffice.CE-type
of the detection event, with therouter
service as the target.detector
that causes it to trigger a detection event.As stated above, the cloud event finds its way into the Kafka Channel's kafka topic for the broker, but no further. Furthermore, errors appear in the brokers' filter pod logs complaining about "trigger had a different UID".
Knative release version
0.14.1
The text was updated successfully, but these errors were encountered: