Skip to content

fix(cruisecontrol): match disk removal log dirs exactly - #405

Merged
amuraru merged 1 commit into
adobe:mainfrom
amuraru:fix/disk-identity
Nov 27, 2026
Merged

amuraru merged 1 commit into
adobe:mainfrom
amuraru:fix/disk-identity

Conversation

@amuraru

@amuraru amuraru commented Nov 24, 2026

Copy link
Copy Markdown

Description

Disk removal used the first online log directory whose path started with the requested mount path. For /kafka-logs1, that could schedule /kafka-logs10/kafka instead. If that operation succeeded, Koperator could mark the original volume as drained and delete its PVC.

The task controller now requires the exact Kafka log directory on the requested broker. It accepts the path Kafka reports for mounts ending in /. If the exact directory is not online, reconciliation retries without creating an operation or marking the disk as scheduled.

Cruise Control reports Before After
/kafka-logs10/kafka first, then /kafka-logs1/kafka Schedules the sibling Schedules /kafka-logs1/kafka
Only the sibling is online on the requested broker Schedules the sibling Leaves removal pending

Verification: make check passed. Controller regression tests cover both cases above and a mount with a trailing slash. Live-cluster E2E tests were not run.

Rollout: No schema change. This only affects newly scheduled operations; it does not repair targets in existing remove_disks operations.

Type of Change

  • Bug Fix

Checklist

  • I have read the contributing guidelines
  • I have verified this change is not present in other open pull requests
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass (make check, non-E2E)

@amuraru

amuraru commented Nov 26, 2026

Copy link
Copy Markdown
Author

Triage: keep and merge first

  • The prefix match can choose /kafka-logs10/kafka for /kafka-logs1. A successful drain can then leave Koperator free to delete the intended volume even though it was not drained. The exact match is a small fix that reuses the storage path helper and checks the requested broker only.
  • Keep the regression cases for the sibling match, the missing target, and the trailing slash. If the exact directory is unavailable, the operation must remain pending.
  • This fixes newly scheduled removals. It does not repair targets in existing remove_disks operations.

Build and both Kubernetes 1.35/1.37 test jobs passed. The two end-to-end jobs were still running when checked. Merge after they pass and the PR is approved.

@amuraru
amuraru merged commit 202764b into adobe:main Nov 27, 2026
12 checks passed
@amuraru
amuraru deleted the fix/disk-identity branch November 27, 2026 08:08
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