You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

This page is meant as a template for writing a KIP. To create a KIP choose Tools->Copy on this page and modify with your content and replace the heading with the next KIP number and a description of your issue. Replace anything in italics with your own description.

Status

Current stateUnder Discussion

Discussion thread: https://confluent.slack.com/archives/C021W3ULE2X/p1690905387380699 

JIRA: KMETA-1086

Motivation

Some users run controllers and brokers on the same machine (not containerized, but through tarballs, etc) and with ZooKeeper, they can independently start/stop the ZooKeeper controller and Kafka broker since there were specific shell scripts for each.

However in KRaft mode, they can't start and stop the KRaft controller independently from the Kafka broker. We need to provide a way for users to kill either controllers or brokers.

Public Interfaces

The command line for killing controllers/brokers will change.

Instead of simply running 

./bin/kafka-server-stop.sh

The proposed change include adding an extra optional field "process-role", which specify the specific process the user want to kill, i.e, controller/broker. For example, the new command line to kill broker only will look like:

./bin/kafka-server-stop.sh --process-role broker

The output will indicate the process(es) that was(were) killed, and the process(es) that was(were) not killed, with the process PID. For example:

Killed broker with PID 69194
Skip killing controller with PID 69039

When a process-role field is not provided, the command line killed both controllers and brokers.

Proposed Changes

I'm changing the "kafka-server-stop.sh" file to accept an optional field process role. When the user specify a process role, I will retrieve the absolute path to the configuration file, and search for the value of "process role". If the process role from the configuration file matches the process role the user provided, that process will be killed, otherwise it will be skipped.

NOTE: If users want to use the feature, they have to provide an absolute path to the configuration file when starting a controller/broker process. Also, the configuration file has to be provided as the last argument

Compatibility, Deprecation, and Migration Plan

Existing users won't need to change any behavior if they want to continue killing both controller/broker processes. Otherwise if they want to either broker/controller, they'll need to provide a process role field in the script language. 

Test Plan

The change can be tested through command line. 


  • No labels