Skip to content

Kafka dispatcher no need for a statefulset#972

Merged
knative-prow-robot merged 2 commits into
knative:masterfrom
matzew:deployment
Apr 25, 2019
Merged

Kafka dispatcher no need for a statefulset#972
knative-prow-robot merged 2 commits into
knative:masterfrom
matzew:deployment

Conversation

@matzew
Copy link
Copy Markdown
Member

@matzew matzew commented Mar 25, 2019

The broker itself needs to be a stateful set, but the dispatcher is just a client/consumer.

hence a deployment is good.

@grantr I guess we need some release notes 😄

locally tested w/ a 0.4.0 installation and this branch (and Strimzi 0.11 release). messages are distributed from the dispatcher

Release Note

The `StatefulSet` dispatcher is replaced by a `Deployment`.  and the `StatefulSet` is scaled down to 0 replicas

Action Required: You must delete your old dispatcher, because both dispatchers will dispatch the event

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Mar 25, 2019
@knative-prow-robot knative-prow-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 25, 2019
@matzew
Copy link
Copy Markdown
Member Author

matzew commented Mar 25, 2019

@dubee @nak3 mind to review ?

Copy link
Copy Markdown
Contributor

@dubee dubee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@knative-prow-robot
Copy link
Copy Markdown
Contributor

@dubee: changing LGTM is restricted to assignees, and only knative/eventing repo collaborators may be assigned issues.

Details

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Copy Markdown
Member

@evankanderson evankanderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there is no explicit Service here to address the dispatcher. I'm assuming that is okay?

/lgtm
/approve
/hold

(Remove the hold with /hold cancel assuming that you don't need to add a Service here.)

@knative-prow-robot knative-prow-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels Mar 26, 2019
@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dubee, evankanderson, matzew

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 26, 2019
@syedriko
Copy link
Copy Markdown
Contributor

@matzew
If the dispatcher is becoming a Deployment, the README needs to change, too:

[syedriko@localhost config]$ git diff
diff --git a/contrib/kafka/config/README.md b/contrib/kafka/config/README.md
index 5a507cd3..6e28478e 100644
--- a/contrib/kafka/config/README.md
+++ b/contrib/kafka/config/README.md
@@ -80,7 +80,7 @@ kubectl get configmap -n knative-eventing kafka-channel-controller-config
 The Channel Dispatcher receives and distributes all events:
 
```shell
-kubectl get statefulset -n knative-eventing kafka-channel-dispatcher
+kubectl get deployment -n knative-eventing kafka-channel-dispatcher
 ```
 
 The Channel Dispatcher Config Map is used to send information about Channels and

@matzew
Copy link
Copy Markdown
Member Author

matzew commented Mar 27, 2019

@syedriko ah, right - thanks!

will add this ...

@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Mar 27, 2019
@matzew
Copy link
Copy Markdown
Member Author

matzew commented Mar 27, 2019

@evankanderson right. I also see no specific need.

I tested it, and also killed it (the pod), while I had a source sinking to a kafka channel, and a subscription for it. Pod got recreated, and eventually the "dumper" service, subscribed to the channel, did continue receive messages.

Perhaps @neosab has some thoughts?

@matzew
Copy link
Copy Markdown
Member Author

matzew commented Mar 27, 2019

@nak3 mind looking too ?

@nak3
Copy link
Copy Markdown
Contributor

nak3 commented Mar 27, 2019

LGTM 👍

I have tested locally with following env and operations:

  • (env) Build from 0.4.0 / Strimzi v0.11.0
  • (event source) kubernetes-event-source
  • (test) deploy, kill, scaleup/down dispatcher pod, delete/add subscription,

@grantr
Copy link
Copy Markdown
Contributor

grantr commented Mar 28, 2019

This seems fine to me given my knowledge of the behavior and guarantees of Deployments and Kafka consumers, but I'd like @neosab to weigh in on whether there was any reason to choose a stateful set in the first place.

@evankanderson
Copy link
Copy Markdown
Member

/lgtm
When you are ready, you will need to /hold cancel to get Prow to work on this.

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 28, 2019
@n3wscott
Copy link
Copy Markdown
Contributor

n3wscott commented Apr 3, 2019

Can you change the title to include Kafka?

@matzew matzew changed the title No need for a statefulset Kafka dispatcher no need for a statefulset Apr 3, 2019
@matzew
Copy link
Copy Markdown
Member Author

matzew commented Apr 3, 2019 via email

@matzew
Copy link
Copy Markdown
Member Author

matzew commented Apr 25, 2019

/hold cancel

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 25, 2019
@knative-prow-robot knative-prow-robot merged commit 739c89b into knative:master Apr 25, 2019
@akashrv
Copy link
Copy Markdown
Contributor

akashrv commented May 1, 2019

In case of an upgrade from 0.5 to 0.6 I noticed that the old kafka dispatcher stays alive and now we end up with 2 dispatchers. The old dispatcher should be deleted or some notes must be added to delete it

@grantr
Copy link
Copy Markdown
Contributor

grantr commented May 1, 2019

@matzew can you add a release note section to this PR with the words Action Required and an explanation that the old dispatcher must be deleted?

I'd also like to know what happens when both dispatchers exist. Do subscriptions get double deliveries?

@akashrv
Copy link
Copy Markdown
Contributor

akashrv commented May 1, 2019

@matzew can you add a release note section to this PR with the words Action Required and an explanation that the old dispatcher must be deleted?

I'd also like to know what happens when both dispatchers exist. Do subscriptions get double deliveries?

From what I observed both dispatchers will dispatch the event because the corresponding service selector and the pod labels are the same.

@grantr
Copy link
Copy Markdown
Contributor

grantr commented May 1, 2019

Ok, that needs to be very clearly stated in the release notes then.

matzew pushed a commit to matzew/eventing that referenced this pull request Mar 26, 2021
creydr pushed a commit to creydr/knative-eventing that referenced this pull request Dec 4, 2024
…e retries (knative#8366) (knative#972)

* MT-Broker: return appropriate status code based on the state to leverage retries

The ingress or filter deployments were returning 400 even in the case
where a given resource (like trigger, broker, subscription) wasn't
found, however, this is a common case where the lister cache
hasn't caught up with the latest state.



* Fix unit tests



---------

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants