Skip to content

Conversation

@oc
Copy link

@oc oc commented Jan 23, 2025

Description

Support for bumping metadata.version using cp-ansible when running Kraft mode.

Play activated when new variable: kafka_broker_metadata_version is specified and cluster running in kraft_mode.

kafka_broker_metadata_version should hold the desired metadata.version. It should in most cases track the major.minor of the underlying Apache Kafka version, like: 3.7, 3.8, etc

See for instance: https://kafka.apache.org/documentation/#upgrade_380_kraft

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Needs some more testing - have only tested it in our own development clusters (see checklist)

Checklist:

  • Any variable/code changes have been validated to be backwards compatible (doesn't break upgrade)
  • I have added tests that prove my fix is effective or that my feature works
  • If required, I have ensured the changes can be discovered by cp-ansible discovery codebase
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@oc oc requested a review from a team as a code owner January 23, 2025 13:15
@oc oc force-pushed the feat-update-kafka-broker-metadata-version branch from ae13b09 to da67016 Compare January 23, 2025 14:06
metadata_versions: >-
{{
dict(current_features.stdout
| regex_search('Feature: metadata.version.*$')
Copy link

Choose a reason for hiding this comment

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

Suggested change
| regex_search('Feature: metadata.version.*$')
| regex_search('Feature: metadata.version.*$', multiline=true)

Needed for CP 8, where the line we are looking for is no longer the last line in the output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants