Skip to content

Commit

Permalink
docs(jbod): using cc to reassign partitions on jbod disks (#10837)
Browse files Browse the repository at this point in the history
Signed-off-by: prmellor <pmellor@redhat.com>
  • Loading branch information
PaulRMellor authored Nov 28, 2024
1 parent 7b06cc6 commit 46d9124
Show file tree
Hide file tree
Showing 7 changed files with 365 additions and 31 deletions.
2 changes: 2 additions & 0 deletions documentation/deploying/deploying.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ include::assemblies/configuring/assembly-scaling-kafka-clusters.adoc[leveloffset
include::assemblies/cruise-control/assembly-cruise-control-concepts.adoc[leveloffset=+1]
//Using Cruise Control for changing topic replication factor
include::modules/cruise-control/proc-cruise-control-topic-replication.adoc[leveloffset=+1]
//Using Cruise Control to move data on jbod disks
include::modules/cruise-control/proc-cruise-control-moving-data.adoc[leveloffset=+1]
//Using the reassign tool to change topic replicas
include::assemblies/configuring/assembly-reassign-tool.adoc[leveloffset=+1]
//Introduce metrics and monitoring to your deployment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ Load Monitor:: Load Monitor collects the metrics and analyzes cluster workload d
Analyzer:: Analyzer generates optimization proposals based on collected data and configured goals.
Anomaly Detector:: Anomaly Detector identifies and reports irregularities in cluster behavior.
Executor:: Executor applies approved optimization proposals to the cluster.

Cruise Control also provides a REST API for client interactions, which Strimzi uses to support these features:

REST API:: Cruise Control provides a REST API for client interactions, which Strimzi uses to support these features:
+
* Generating optimization proposals from optimization goals
* Rebalancing a Kafka cluster based on an optimization proposal
* Changing topic replication factor
* Reassigning partitions between JBOD disks

NOTE: Other Cruise Control features are not currently supported, including self healing, notifications, and write-your-own goals.

Expand Down Expand Up @@ -235,7 +235,7 @@ The performance of the cluster during the rebalance is affected by the number an
[id='con-optimization-proposals-modes-{context}']
=== Rebalancing modes

Proposals for rebalances can be generated in three modes, which are specified using the `spec.mode` property of the `KafkaRebalance` custom resource.
Proposals for rebalances can be generated in four modes, which are specified using the `spec.mode` property of the `KafkaRebalance` custom resource.

`full` mode:: The `full` mode runs a full rebalance by moving replicas across all the brokers in the cluster.
This is the default mode if the `spec.mode` property is not defined in the `KafkaRebalance` custom resource.
Expand All @@ -251,6 +251,9 @@ The `remove-brokers` mode moves replicas off the brokers that are going to be re
When these brokers are not hosting replicas anymore, you can safely run the scaling down operation.
You specify the brokers you're removing as a list in the `spec.brokers` property in the `KafkaRebalance` custom resource.

`remove-disks` mode:: The `remove-disks` mode is used specifically to reassign partitions between JBOD disks used for storage on the same broker.
You specify a list of broker IDs with corresponding volume IDs for partition reassignment.

NOTE: Brokers are shut down even if they host replicas when xref:con-skipping-scale-down-checks-{context}[checks are skipped on scale-down operations].

In general, use the `full` rebalance mode to rebalance a Kafka cluster by spreading the load across brokers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,16 @@ Cruise Control will then apply the optimization proposal to the Kafka cluster, r
Perform these steps for the optimization proposal that you want to approve.

. Unless the optimization proposal is newly generated, check that it is based on current information about the state of the Kafka cluster.
To do so, refresh the optimization proposal to make sure it uses the latest cluster metrics:

.. Annotate the `KafkaRebalance` resource in Kubernetes with `strimzi.io/rebalance=refresh`:
To do so, annotate the `KafkaRebalance` resource to refresh the optimization proposal and make sure it uses the latest cluster metrics:
+
[source,shell,subs="+quotes"]
[source,shell]
----
kubectl annotate kafkarebalance <kafka_rebalance_resource_name> strimzi.io/rebalance="refresh"
----

. Wait for the status of the optimization proposal to change to `ProposalReady`:
+
[source,shell,subs="+quotes"]
[source,shell]
----
kubectl get kafkarebalance -o wide -w -n <namespace>
----
Expand All @@ -51,22 +49,20 @@ kubectl get kafkarebalance -o wide -w -n <namespace>
+
When the status changes to `ProposalReady`, the optimization proposal is ready to approve.

. Approve the optimization proposal that you want Cruise Control to apply.
+
Annotate the `KafkaRebalance` resource in Kubernetes with `strimzi.io/rebalance=approve`:
. Annotate the `KafkaRebalance` resource to approve the optimization proposal:
+
[source,shell,subs="+quotes"]
[source,shell]
----
kubectl annotate kafkarebalance _<kafka_rebalance_resource_name>_ strimzi.io/rebalance="approve"
kubectl annotate kafkarebalance <kafka_rebalance_resource_name> strimzi.io/rebalance="approve"
----

. The Cluster Operator detects the annotated resource and instructs Cruise Control to rebalance the Kafka cluster.

. Wait for the status of the optimization proposal to change to `Ready`:
+
[source,shell,subs="+quotes"]
[source,shell]
----
kubectl get kafkarebalance -o wide -w -n _<namespace>_
kubectl get kafkarebalance -o wide -w -n <namespace>
----
+
--
Expand Down
Loading

0 comments on commit 46d9124

Please sign in to comment.