Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion roles/kafka_broker/tasks/get_meta_properties.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
register: uuid_broker

- name: Format Storage Directory
shell: "{{ binary_base_path }}/bin/kafka-storage format -t={{ clusterid }} -c {{ kafka_broker.config_file }} --ignore-formatted"
shell: "{{ binary_base_path }}/bin/kafka-storage format -t={{ clusterid }} -c {{ kafka_broker.config_file }} --ignore-formatted"
register: format_meta
changed_when: format_meta.stdout_lines is not search('already formatted', multiline=true)
vars:
clusterid: "{{ (uuid_broker['content'] | b64decode).partition('cluster.id=')[2].partition('\n')[0] }}"
2 changes: 2 additions & 0 deletions roles/kafka_controller/tasks/get_meta_properties.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
shell: "{{ binary_base_path }}/bin/kafka-storage info -c {{ kafka_controller.config_file }}"
ignore_errors: true
failed_when: false
changed_when: false
register: formatted

- name: Get ClusterId
shell: "{{ binary_base_path }}/bin/kafka-storage random-uuid"
environment:
KAFKA_OPTS: "-Xlog:all=error -XX:+IgnoreUnrecognizedVMOptions"
changed_when: false
register: uuid_key
run_once: true
when: not kraft_migration|bool
Expand Down