Skip to content

[kafka] Fix Debian 11 security repo and backports cleanup in Kafka init actions - #1406

Open
IshaAg wants to merge 2 commits into
GoogleCloudDataproc:mainfrom
IshaAg:fix-kafka-debian11
Open

IshaAg wants to merge 2 commits into
GoogleCloudDataproc:mainfrom
IshaAg:fix-kafka-debian11

Conversation

@IshaAg

@IshaAg IshaAg commented Oct 4, 2026 •

Copy link
Copy Markdown

Summary

Fixes kafka/kafka.sh and kafka/kafka-manager.sh for Debian 11 (Dataproc 2.1):

  • Re-enables remove_old_backports in kafka/kafka-manager.sh for Debian <= 2.1.
  • Redirects bullseye-security in /etc/apt/sources.list* to archive.debian.org (falling back to snapshot.debian.org/archive/debian-security/20260830T000000Z, the same snapshot used by Dataproc 2.1.121-debian11) and disables Acquire::Check-Valid-Until.
  • Fixes matched_files handling in remove_old_backports to tolerate no matches (|| true) and iterate over an array.
  • Runs apt-get update || true before installing gnupg2 in kafka/kafka.sh recv_keys().

Testing

Verified KafkaTest.testKafkaNonHACluster (running kafka/kafka.sh, kafka/cruise-control.sh, and kafka/kafka-manager.sh) passes end-to-end across all affected < 3.0 tracks:

  • 2.1-debian11: PASSED
  • 2.2-debian12: PASSED
  • 2.3-debian12: PASSED

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates kafka/kafka-manager.sh and kafka/kafka.sh to configure Debian security mirrors and backports, and adds an apt-get update step before installing gnupg2. The review feedback identifies a critical issue where using a future snapshot date (20260830T000000Z) will cause HTTP 404 errors and break apt-get update on Debian 11. Additionally, the reviewer points out an existing bug where double-quoting matched_files in a loop prevents proper iteration over multiple files, and suggests removing unnecessary subshell parentheses around apt-get update || true to avoid overhead.

Comment thread kafka/kafka-manager.sh Resolved
Comment thread kafka/kafka.sh Resolved
Comment thread kafka/kafka-manager.sh Resolved
Comment thread kafka/kafka.sh Resolved
Comment thread kafka/kafka.sh Resolved
@IshaAg IshaAg changed the title [kafka] Fix Debian 11 security repo and backports cleanup in Kafka in… [kafka] Fix Debian 11 security repo and backports cleanup in Kafka init actions Dec 4, 2026
@IshaAg
IshaAg marked this pull request as ready for review December 4, 2026 11:45
@IshaAg
IshaAg requested a review from vinayakumarb December 4, 2026 11:45
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.

1 participant