[jira] [Updated] (KAFKA-2234) Partition reassignment of a nonexistent topic prevents future reassignments
[ https://issues.apache.org/jira/browse/KAFKA-2234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bob Halley updated KAFKA-2234: -- Summary: Partition reassignment of a nonexistent topic prevents future reassignments (was: Partition reassignment of an empty topic prevents future reassignments) Partition reassignment of a nonexistent topic prevents future reassignments --- Key: KAFKA-2234 URL: https://issues.apache.org/jira/browse/KAFKA-2234 Project: Kafka Issue Type: Bug Affects Versions: 0.8.2.1 Reporter: Bob Halley Priority: Blocker The results of this bug are like those of KAFKA-822. If I erroneously list a non-existent topic in a partition reassignment request, then it will never complete and it becomes impossible to do reassignments until the admin/reassign-partitions node is deleted by hand from zookeeper. Note too the incoherent messaging in the bad command. First it says ERROR what I'm trying to do is bad, and then it says it has successfully started it (which indeed it has, at least in the sense of writing an empty list to to zookeeper :)). # reassignment.json is bad, it refers to the non-existent topic bad-foo $ cat reassignment.json {partitions: [{topic: bad-foo, partition: 0, replicas: [2] }], version:1 } $ kafka-reassign-partitions.sh --reassignment-json-file reassignment.json --zookeeper localhost:2181/kafka --execute Current partition replica assignment {version:1,partitions:[]} Save this to use as the --reassignment-json-file option during rollback [2015-06-01 06:34:26,275] ERROR Skipping reassignment of partition [bad-foo,0] since it doesn't exist (kafka.admin.ReassignPartitionsCommand) Successfully started reassignment of partitions {version:1,partitions:[{topic:bad-foo,partition:0,replicas:[2]}]} $ zkCli Connecting to localhost:2181 Welcome to ZooKeeper! JLine support is enabled WATCHER:: WatchedEvent state:SyncConnected type:None path:null [zk: localhost:2181(CONNECTED) 2] get /kafka/admin/reassign_partitions {version:1,partitions:[]} cZxid = 0x5d ctime = Mon Jun 01 06:34:26 PDT 2015 mZxid = 0x5d mtime = Mon Jun 01 06:34:26 PDT 2015 pZxid = 0x5d cversion = 0 dataVersion = 0 aclVersion = 0 ephemeralOwner = 0x0 dataLength = 29 numChildren = 0 ^C # Fix reassignment.json $kafka-reassign-partitions.sh --reassignment-json-file reassignment.json --zookeeper localhost:2181/kafka --executetions Current partition replica assignment {version:1,partitions:[{topic:good-foo,partition:0,replicas:[2]}]} Save this to use as the --reassignment-json-file option during rollback Partitions reassignment failed due to Partition reassignment currently in progress for Map(). Aborting operation kafka.common.AdminCommandFailedException: Partition reassignment currently in progress for Map(). Aborting operation at kafka.admin.ReassignPartitionsCommand.reassignPartitions(ReassignPartitionsCommand.scala:216) at kafka.admin.ReassignPartitionsCommand$.executeAssignment(ReassignPartitionsCommand.scala:133) at kafka.admin.ReassignPartitionsCommand$.main(ReassignPartitionsCommand.scala:47) at kafka.admin.ReassignPartitionsCommand.main(ReassignPartitionsCommand.scala) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (KAFKA-2234) Partition reassignment of an empty topic prevents future reassignments
Bob Halley created KAFKA-2234: - Summary: Partition reassignment of an empty topic prevents future reassignments Key: KAFKA-2234 URL: https://issues.apache.org/jira/browse/KAFKA-2234 Project: Kafka Issue Type: Bug Affects Versions: 0.8.2.1 Reporter: Bob Halley Priority: Blocker The results of this bug are like those of KAFKA-822. If I erroneously list a non-existent topic in a partition reassignment request, then it will never complete and it becomes impossible to do reassignments until the admin/reassign-partitions node is deleted by hand from zookeeper. Note too the incoherent messaging in the bad command. First it says ERROR what I'm trying to do is bad, and then it says it has successfully started it (which indeed it has, at least in the sense of writing an empty list to to zookeeper :)). # reassignment.json is bad, it refers to the non-existent topic bad-foo $ cat reassignment.json {partitions: [{topic: bad-foo, partition: 0, replicas: [2] }], version:1 } $ kafka-reassign-partitions.sh --reassignment-json-file reassignment.json --zookeeper localhost:2181/kafka --execute Current partition replica assignment {version:1,partitions:[]} Save this to use as the --reassignment-json-file option during rollback [2015-06-01 06:34:26,275] ERROR Skipping reassignment of partition [bad-foo,0] since it doesn't exist (kafka.admin.ReassignPartitionsCommand) Successfully started reassignment of partitions {version:1,partitions:[{topic:bad-foo,partition:0,replicas:[2]}]} $ zkCli Connecting to localhost:2181 Welcome to ZooKeeper! JLine support is enabled WATCHER:: WatchedEvent state:SyncConnected type:None path:null [zk: localhost:2181(CONNECTED) 2] get /kafka/admin/reassign_partitions {version:1,partitions:[]} cZxid = 0x5d ctime = Mon Jun 01 06:34:26 PDT 2015 mZxid = 0x5d mtime = Mon Jun 01 06:34:26 PDT 2015 pZxid = 0x5d cversion = 0 dataVersion = 0 aclVersion = 0 ephemeralOwner = 0x0 dataLength = 29 numChildren = 0 ^C # Fix reassignment.json $kafka-reassign-partitions.sh --reassignment-json-file reassignment.json --zookeeper localhost:2181/kafka --executetions Current partition replica assignment {version:1,partitions:[{topic:good-foo,partition:0,replicas:[2]}]} Save this to use as the --reassignment-json-file option during rollback Partitions reassignment failed due to Partition reassignment currently in progress for Map(). Aborting operation kafka.common.AdminCommandFailedException: Partition reassignment currently in progress for Map(). Aborting operation at kafka.admin.ReassignPartitionsCommand.reassignPartitions(ReassignPartitionsCommand.scala:216) at kafka.admin.ReassignPartitionsCommand$.executeAssignment(ReassignPartitionsCommand.scala:133) at kafka.admin.ReassignPartitionsCommand$.main(ReassignPartitionsCommand.scala:47) at kafka.admin.ReassignPartitionsCommand.main(ReassignPartitionsCommand.scala) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2198) kafka-topics.sh exits with 0 status on failures
[ https://issues.apache.org/jira/browse/KAFKA-2198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14550352#comment-14550352 ] Bob Halley commented on KAFKA-2198: --- I realize that the chroot path is optional, but it's still a bug that the command does nothing. The request is to alter an existing topic, but there is no such topic. It makes no changes to zookeeper and exits with status 0. A better error would be no Kafka configuration in directory / or topic 'foo' not found in '/config/topics'. kafka-topics.sh exits with 0 status on failures --- Key: KAFKA-2198 URL: https://issues.apache.org/jira/browse/KAFKA-2198 Project: Kafka Issue Type: Bug Components: admin Affects Versions: 0.8.2.1 Reporter: Bob Halley Assignee: Manikumar Reddy Attachments: KAFKA-2198.patch In the two failure cases below, kafka-topics.sh exits with status 0. You shouldn't need to parse output from the command to know if it failed or not. Case 1: Forgetting to add Kafka zookeeper chroot path to zookeeper spec $ kafka-topics.sh --alter --topic foo --config min.insync.replicas=2 --zookeeper 10.0.0.1 echo succeeded succeeded Case 2: Bad config option. (Also, do we really need the java backtrace? It's a lot of noise most of the time.) $ kafka-topics.sh --alter --topic foo --config min.insync.replicasTYPO=2 --zookeeper 10.0.0.1/kafka echo succeeded Error while executing topic command requirement failed: Unknown configuration min.insync.replicasTYPO. java.lang.IllegalArgumentException: requirement failed: Unknown configuration min.insync.replicasTYPO. at scala.Predef$.require(Predef.scala:233) at kafka.log.LogConfig$$anonfun$validateNames$1.apply(LogConfig.scala:183) at kafka.log.LogConfig$$anonfun$validateNames$1.apply(LogConfig.scala:182) at scala.collection.Iterator$class.foreach(Iterator.scala:727) at scala.collection.AbstractIterator.foreach(Iterator.scala:1157) at kafka.log.LogConfig$.validateNames(LogConfig.scala:182) at kafka.log.LogConfig$.validate(LogConfig.scala:190) at kafka.admin.TopicCommand$.parseTopicConfigsToBeAdded(TopicCommand.scala:205) at kafka.admin.TopicCommand$$anonfun$alterTopic$1.apply(TopicCommand.scala:103) at kafka.admin.TopicCommand$$anonfun$alterTopic$1.apply(TopicCommand.scala:100) at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47) at kafka.admin.TopicCommand$.alterTopic(TopicCommand.scala:100) at kafka.admin.TopicCommand$.main(TopicCommand.scala:57) at kafka.admin.TopicCommand.main(TopicCommand.scala) succeeded -- This message was sent by Atlassian JIRA (v6.3.4#6332)