-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
source.Channel gets shutdown almost immediately and never processes any events #1343
Comments
I was too quick to celebrate with the above comment. It was just a lucky coincidence with timing. I think I found the root cause now: controller-runtime/pkg/internal/controller/controller.go Lines 163 to 171 in 3c5b358
The context created in line 166 is cancelled almost immediately by the controller-runtime/pkg/source/source.go Lines 270 to 281 in 3c5b358
If I understand the issue that resulted in this change (#1219) correctly, I think that the timeout context should only be used with |
Bump controller-runtime dependency to include a fix for the Channel Source which was preventing events from being enqueued. (see kubernetes-sigs/controller-runtime#1343)
Bump controller-runtime dependency to include a fix for the Channel Source which was preventing events from being enqueued. (see kubernetes-sigs/controller-runtime#1343) Signed-off-by: Nick Hale <njohnhale@gmail.com>
Bump controller-runtime dependency to include a fix for the Channel Source which was preventing events from being enqueued. (see kubernetes-sigs/controller-runtime#1343) Signed-off-by: Nick Hale <njohnhale@gmail.com>
Bump controller-runtime dependency to include a fix for the Channel Source which was preventing events from being enqueued. (see kubernetes-sigs/controller-runtime#1343) Signed-off-by: Nick Hale <njohnhale@gmail.com> (cherry picked from commit f7e9584916df34a3b26807f640a4aa89f0d59333)
Bump controller-runtime dependency to include a fix for the Channel Source which was preventing events from being enqueued. (see kubernetes-sigs/controller-runtime#1343) Signed-off-by: Nick Hale <njohnhale@gmail.com> (cherry picked from commit f7e9584916df34a3b26807f640a4aa89f0d59333)
Bump controller-runtime dependency to include a fix for the Channel Source which was preventing events from being enqueued. (see kubernetes-sigs/controller-runtime#1343) Signed-off-by: Nick Hale <njohnhale@gmail.com> Upstream-repository: operator-lifecycle-manager Upstream-commit: f7e9584916df34a3b26807f640a4aa89f0d59333
Bump controller-runtime dependency to include a fix for the Channel Source which was preventing events from being enqueued. (see kubernetes-sigs/controller-runtime#1343) Signed-off-by: Nick Hale <njohnhale@gmail.com> Upstream-repository: operator-lifecycle-manager Upstream-commit: f7e9584916df34a3b26807f640a4aa89f0d59333
Bump controller-runtime dependency to include a fix for the Channel Source which was preventing events from being enqueued. (see kubernetes-sigs/controller-runtime#1343) Signed-off-by: Nick Hale <njohnhale@gmail.com> Upstream-repository: operator-lifecycle-manager Upstream-commit: f7e9584916df34a3b26807f640a4aa89f0d59333
Bump controller-runtime dependency to include a fix for the Channel Source which was preventing events from being enqueued. (see kubernetes-sigs/controller-runtime#1343) Signed-off-by: Nick Hale <njohnhale@gmail.com> Upstream-repository: operator-lifecycle-manager Upstream-commit: f7e9584916df34a3b26807f640a4aa89f0d59333
After upgrading to controller-runtime 0.8.0, I discovered that our external event source implemented using
source.Channel
is not generating any events. Looking at the code, one odd thing that stood out to me was the useless lock here:controller-runtime/pkg/source/source.go
Lines 241 to 244 in 818a2ce
It used to protect the append to the
dest
array, but now the append has moved further up as a fix to #942. After fixing the lock in the code, the event source started working again so I think there must be a race somewhere. The odd thing is that this unprotected append was present in 0.7.0 as well and that didn't affect us. So I am not sure whether my hypothesis is entirely correct.Either way, I'll be happy to submit a patch to fix the lock unless there are any objections.
The text was updated successfully, but these errors were encountered: