reassign verify, features update --release-version - #80
Merged
Merged
Conversation
kcl reassign verify takes the plan alter took and prints one row per partition: in-progress when ListPartitionReassignments still lists it, complete when the metadata replicas equal the target as a set, differs otherwise, and an unknown STATUS with the error in ERROR and MESSAGE when the metadata or the list answers the partition with an error. The command exits 1 unless every row is complete, so a script can loop on it. When every row is complete, the throttle alter --throttle set is deleted the way kafka-reassign-partitions.sh --verify deletes it: both rates on every broker in the union of current and target replicas, and both replica lists on every topic in the plan, one IncrementalAlterConfigs with a DELETE per config. Text names what was cleared on stderr; JSON carries it under throttles_cleared. A delete that fails is the command's error after the table prints, and the resources that did clear are still reported. out.FormattedTable gains SetField for the top-level JSON key. alter --throttle's help and stderr line now point at verify rather than at a hand-typed config alter.
kcl cluster features update --release-version 4.4 expands to one update per feature the release finalizes, from kversion's table, in place of the FEATURE=VERSION arguments; both together is a usage error, as is a release kversion does not know, which names the newest it does. Both forms now print FROM and TO: FROM is the level the cluster has finalized, read from one ApiVersions request first, 0 for a feature it has not finalized and unknown when the broker's finalized epoch is -1; TO is the level requested. The walkthrough runs the dry run form and pins the new header and keys.
verify printed its table and then, when deleting a throttle config failed, returned the error, which under --format json wrote a second JSON object after the first. The failure is now throttles_cleared.error in the one document, a stderr line in text, and the command exits 1. BrokerErr put the broker's message after a second colon, behind the kerr description's own period: "invalid.: downgrade not allowed". The message is in parentheses now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
kcl reassign verifytakes the plankcl reassign altertook and prints one row per partition:in-progresswhen ListPartitionReassignments still lists it,completewhen the replicas in the metadata equal the target as a set (order is not compared), anddiffersotherwise. A partition the metadata or the list answers with an error has an unknown STATUS with the error in ERROR and MESSAGE. The command exits 1 unless every row is complete, sountil kcl reassign verify 'foo:0->2,3'; do sleep 10; donewaits for the move. When every row is complete it clears the throttlealter --throttleset, the waykafka-reassign-partitions.sh --verifydoes: both rates are deleted on every broker in the union of current and target replicas, and both replica lists on every topic in the plan, in one IncrementalAlterConfigs. Text names what was cleared on stderr; JSON carriesthrottles_cleared: {brokers, topics, error}, the arrays empty when nothing was cleared. A delete that fails lands inthrottles_cleared.error(one JSON object, never a second error object after the table), a stderr line in text, and the command exits 1.alter --throttle's help and stderr line now point atverifyinstead of a hand-typed config alter.kcl cluster features update --release-version 4.4updates every feature to the level a new 4.4 cluster is formatted with, from kversion's table, in place of theFEATURE=VERSIONarguments; giving both is a usage error, and so is a release kversion does not know, which names the newest it does. Both forms now print FROM and TO: FROM is the level the cluster has finalized today, read from one ApiVersions request before the update, 0 for a feature the cluster has not finalized and unknown when the broker's finalized epoch is -1; TO is the level requested. The walkthrough now runs--release-version 4.4 --dry-runand pins the header and keys.Changelog
NEW
kcl reassign verify 'TOPIC:P->R,R'...prints whether each partition of a plan is in-progress, complete, or differs, exits 1 until all complete, and clears the throttlealter --throttleset.kcl cluster features update --release-version 4.4updates every feature to its level for that Kafka release, in place ofFEATURE=VERSIONarguments.CHANGED
kcl cluster features updaterows carry FROM and TO, the cluster's finalized level and the requested one: awk columnsFEATURE FROM TO ERROR MESSAGE, JSON keysfromandto.kcl reassign alter --throttlehelp and stderr point atkcl reassign verifyfor clearing the throttle.CHANGED
INVALID_UPDATE_VERSION: The given update version was invalid. (downgrade not allowed)); it followed a second colon.