[jira] [Updated] (KAFKA-2214) kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet
[ https://issues.apache.org/jira/browse/KAFKA-2214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Manikumar Reddy updated KAFKA-2214: --- Attachment: KAFKA-2214_2015-08-05_20:47:17.patch kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet -- Key: KAFKA-2214 URL: https://issues.apache.org/jira/browse/KAFKA-2214 Project: Kafka Issue Type: Improvement Components: admin Affects Versions: 0.8.1.1, 0.8.2.0 Reporter: Michael Noll Assignee: Manikumar Reddy Priority: Minor Attachments: KAFKA-2214.patch, KAFKA-2214_2015-07-10_21:56:04.patch, KAFKA-2214_2015-07-13_21:10:58.patch, KAFKA-2214_2015-07-14_15:31:12.patch, KAFKA-2214_2015-07-14_15:40:49.patch, KAFKA-2214_2015-08-05_20:47:17.patch h4. Background The admin script {{kafka-reassign-partitions.sh}} should integrate better with automation tools such as Ansible, which rely on scripts adhering to Unix best practices such as appropriate exit codes on success/failure. h4. Current behavior (incorrect) When reassignments are still in progress {{kafka-reassign-partitions.sh}} prints {{ERROR}} messages but returns an exit code of zero, which indicates success. This behavior makes it a bit cumbersome to integrate the script into automation tools such as Ansible. {code} $ kafka-reassign-partitions.sh --zookeeper zookeeper1:2181 --reassignment-json-file partitions-to-move.json --verify Status of partition reassignment: ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] Reassignment of partition [mytopic,0] completed successfully Reassignment of partition [myothertopic,1] completed successfully Reassignment of partition [myothertopic,3] completed successfully ... $ echo $? 0 # But preferably the exit code in the presence of ERRORs should be, say, 1. {code} h3. How to improve I'd suggest that, using the above as the running example, if there are any {{ERROR}} entries in the output (i.e. if there are any assignments remaining that don't match the desired assignments), then the {{kafka-reassign-partitions.sh}} should return a non-zero exit code. h3. Notes In Kafka 0.8.2 the output is a bit different: The ERROR messages are now phrased differently. Before: {code} ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] {code} Now: {code} Reassignment of partition [mytopic,2] is still in progress {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (KAFKA-2214) kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet
[ https://issues.apache.org/jira/browse/KAFKA-2214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Manikumar Reddy updated KAFKA-2214: --- Status: Patch Available (was: In Progress) kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet -- Key: KAFKA-2214 URL: https://issues.apache.org/jira/browse/KAFKA-2214 Project: Kafka Issue Type: Improvement Components: admin Affects Versions: 0.8.1.1, 0.8.2.0 Reporter: Michael Noll Assignee: Manikumar Reddy Priority: Minor Attachments: KAFKA-2214.patch, KAFKA-2214_2015-07-10_21:56:04.patch, KAFKA-2214_2015-07-13_21:10:58.patch, KAFKA-2214_2015-07-14_15:31:12.patch, KAFKA-2214_2015-07-14_15:40:49.patch, KAFKA-2214_2015-08-05_20:47:17.patch h4. Background The admin script {{kafka-reassign-partitions.sh}} should integrate better with automation tools such as Ansible, which rely on scripts adhering to Unix best practices such as appropriate exit codes on success/failure. h4. Current behavior (incorrect) When reassignments are still in progress {{kafka-reassign-partitions.sh}} prints {{ERROR}} messages but returns an exit code of zero, which indicates success. This behavior makes it a bit cumbersome to integrate the script into automation tools such as Ansible. {code} $ kafka-reassign-partitions.sh --zookeeper zookeeper1:2181 --reassignment-json-file partitions-to-move.json --verify Status of partition reassignment: ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] Reassignment of partition [mytopic,0] completed successfully Reassignment of partition [myothertopic,1] completed successfully Reassignment of partition [myothertopic,3] completed successfully ... $ echo $? 0 # But preferably the exit code in the presence of ERRORs should be, say, 1. {code} h3. How to improve I'd suggest that, using the above as the running example, if there are any {{ERROR}} entries in the output (i.e. if there are any assignments remaining that don't match the desired assignments), then the {{kafka-reassign-partitions.sh}} should return a non-zero exit code. h3. Notes In Kafka 0.8.2 the output is a bit different: The ERROR messages are now phrased differently. Before: {code} ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] {code} Now: {code} Reassignment of partition [mytopic,2] is still in progress {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (KAFKA-2214) kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet
[ https://issues.apache.org/jira/browse/KAFKA-2214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gwen Shapira updated KAFKA-2214: Status: In Progress (was: Patch Available) Moved back to in progress since there are unaddressed review comments. kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet -- Key: KAFKA-2214 URL: https://issues.apache.org/jira/browse/KAFKA-2214 Project: Kafka Issue Type: Improvement Components: admin Affects Versions: 0.8.2.0, 0.8.1.1 Reporter: Michael Noll Assignee: Manikumar Reddy Priority: Minor Attachments: KAFKA-2214.patch, KAFKA-2214_2015-07-10_21:56:04.patch, KAFKA-2214_2015-07-13_21:10:58.patch, KAFKA-2214_2015-07-14_15:31:12.patch, KAFKA-2214_2015-07-14_15:40:49.patch h4. Background The admin script {{kafka-reassign-partitions.sh}} should integrate better with automation tools such as Ansible, which rely on scripts adhering to Unix best practices such as appropriate exit codes on success/failure. h4. Current behavior (incorrect) When reassignments are still in progress {{kafka-reassign-partitions.sh}} prints {{ERROR}} messages but returns an exit code of zero, which indicates success. This behavior makes it a bit cumbersome to integrate the script into automation tools such as Ansible. {code} $ kafka-reassign-partitions.sh --zookeeper zookeeper1:2181 --reassignment-json-file partitions-to-move.json --verify Status of partition reassignment: ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] Reassignment of partition [mytopic,0] completed successfully Reassignment of partition [myothertopic,1] completed successfully Reassignment of partition [myothertopic,3] completed successfully ... $ echo $? 0 # But preferably the exit code in the presence of ERRORs should be, say, 1. {code} h3. How to improve I'd suggest that, using the above as the running example, if there are any {{ERROR}} entries in the output (i.e. if there are any assignments remaining that don't match the desired assignments), then the {{kafka-reassign-partitions.sh}} should return a non-zero exit code. h3. Notes In Kafka 0.8.2 the output is a bit different: The ERROR messages are now phrased differently. Before: {code} ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] {code} Now: {code} Reassignment of partition [mytopic,2] is still in progress {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (KAFKA-2214) kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet
[ https://issues.apache.org/jira/browse/KAFKA-2214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Manikumar Reddy updated KAFKA-2214: --- Attachment: KAFKA-2214_2015-07-14_15:40:49.patch kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet -- Key: KAFKA-2214 URL: https://issues.apache.org/jira/browse/KAFKA-2214 Project: Kafka Issue Type: Improvement Components: admin Affects Versions: 0.8.1.1, 0.8.2.0 Reporter: Michael Noll Assignee: Manikumar Reddy Priority: Minor Attachments: KAFKA-2214.patch, KAFKA-2214_2015-07-10_21:56:04.patch, KAFKA-2214_2015-07-13_21:10:58.patch, KAFKA-2214_2015-07-14_15:31:12.patch, KAFKA-2214_2015-07-14_15:40:49.patch h4. Background The admin script {{kafka-reassign-partitions.sh}} should integrate better with automation tools such as Ansible, which rely on scripts adhering to Unix best practices such as appropriate exit codes on success/failure. h4. Current behavior (incorrect) When reassignments are still in progress {{kafka-reassign-partitions.sh}} prints {{ERROR}} messages but returns an exit code of zero, which indicates success. This behavior makes it a bit cumbersome to integrate the script into automation tools such as Ansible. {code} $ kafka-reassign-partitions.sh --zookeeper zookeeper1:2181 --reassignment-json-file partitions-to-move.json --verify Status of partition reassignment: ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] Reassignment of partition [mytopic,0] completed successfully Reassignment of partition [myothertopic,1] completed successfully Reassignment of partition [myothertopic,3] completed successfully ... $ echo $? 0 # But preferably the exit code in the presence of ERRORs should be, say, 1. {code} h3. How to improve I'd suggest that, using the above as the running example, if there are any {{ERROR}} entries in the output (i.e. if there are any assignments remaining that don't match the desired assignments), then the {{kafka-reassign-partitions.sh}} should return a non-zero exit code. h3. Notes In Kafka 0.8.2 the output is a bit different: The ERROR messages are now phrased differently. Before: {code} ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] {code} Now: {code} Reassignment of partition [mytopic,2] is still in progress {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (KAFKA-2214) kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet
[ https://issues.apache.org/jira/browse/KAFKA-2214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Manikumar Reddy updated KAFKA-2214: --- Attachment: KAFKA-2214_2015-07-14_15:31:12.patch kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet -- Key: KAFKA-2214 URL: https://issues.apache.org/jira/browse/KAFKA-2214 Project: Kafka Issue Type: Improvement Components: admin Affects Versions: 0.8.1.1, 0.8.2.0 Reporter: Michael Noll Assignee: Manikumar Reddy Priority: Minor Attachments: KAFKA-2214.patch, KAFKA-2214_2015-07-10_21:56:04.patch, KAFKA-2214_2015-07-13_21:10:58.patch, KAFKA-2214_2015-07-14_15:31:12.patch h4. Background The admin script {{kafka-reassign-partitions.sh}} should integrate better with automation tools such as Ansible, which rely on scripts adhering to Unix best practices such as appropriate exit codes on success/failure. h4. Current behavior (incorrect) When reassignments are still in progress {{kafka-reassign-partitions.sh}} prints {{ERROR}} messages but returns an exit code of zero, which indicates success. This behavior makes it a bit cumbersome to integrate the script into automation tools such as Ansible. {code} $ kafka-reassign-partitions.sh --zookeeper zookeeper1:2181 --reassignment-json-file partitions-to-move.json --verify Status of partition reassignment: ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] Reassignment of partition [mytopic,0] completed successfully Reassignment of partition [myothertopic,1] completed successfully Reassignment of partition [myothertopic,3] completed successfully ... $ echo $? 0 # But preferably the exit code in the presence of ERRORs should be, say, 1. {code} h3. How to improve I'd suggest that, using the above as the running example, if there are any {{ERROR}} entries in the output (i.e. if there are any assignments remaining that don't match the desired assignments), then the {{kafka-reassign-partitions.sh}} should return a non-zero exit code. h3. Notes In Kafka 0.8.2 the output is a bit different: The ERROR messages are now phrased differently. Before: {code} ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] {code} Now: {code} Reassignment of partition [mytopic,2] is still in progress {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (KAFKA-2214) kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet
[ https://issues.apache.org/jira/browse/KAFKA-2214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Manikumar Reddy updated KAFKA-2214: --- Attachment: KAFKA-2214_2015-07-13_21:10:58.patch kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet -- Key: KAFKA-2214 URL: https://issues.apache.org/jira/browse/KAFKA-2214 Project: Kafka Issue Type: Improvement Components: admin Affects Versions: 0.8.1.1, 0.8.2.0 Reporter: Michael Noll Assignee: Manikumar Reddy Priority: Minor Attachments: KAFKA-2214.patch, KAFKA-2214_2015-07-10_21:56:04.patch, KAFKA-2214_2015-07-13_21:10:58.patch h4. Background The admin script {{kafka-reassign-partitions.sh}} should integrate better with automation tools such as Ansible, which rely on scripts adhering to Unix best practices such as appropriate exit codes on success/failure. h4. Current behavior (incorrect) When reassignments are still in progress {{kafka-reassign-partitions.sh}} prints {{ERROR}} messages but returns an exit code of zero, which indicates success. This behavior makes it a bit cumbersome to integrate the script into automation tools such as Ansible. {code} $ kafka-reassign-partitions.sh --zookeeper zookeeper1:2181 --reassignment-json-file partitions-to-move.json --verify Status of partition reassignment: ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] Reassignment of partition [mytopic,0] completed successfully Reassignment of partition [myothertopic,1] completed successfully Reassignment of partition [myothertopic,3] completed successfully ... $ echo $? 0 # But preferably the exit code in the presence of ERRORs should be, say, 1. {code} h3. How to improve I'd suggest that, using the above as the running example, if there are any {{ERROR}} entries in the output (i.e. if there are any assignments remaining that don't match the desired assignments), then the {{kafka-reassign-partitions.sh}} should return a non-zero exit code. h3. Notes In Kafka 0.8.2 the output is a bit different: The ERROR messages are now phrased differently. Before: {code} ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] {code} Now: {code} Reassignment of partition [mytopic,2] is still in progress {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (KAFKA-2214) kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet
[ https://issues.apache.org/jira/browse/KAFKA-2214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Manikumar Reddy updated KAFKA-2214: --- Attachment: KAFKA-2214_2015-07-10_21:56:04.patch kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet -- Key: KAFKA-2214 URL: https://issues.apache.org/jira/browse/KAFKA-2214 Project: Kafka Issue Type: Improvement Components: admin Affects Versions: 0.8.1.1, 0.8.2.0 Reporter: Michael Noll Assignee: Manikumar Reddy Priority: Minor Attachments: KAFKA-2214.patch, KAFKA-2214_2015-07-10_21:56:04.patch h4. Background The admin script {{kafka-reassign-partitions.sh}} should integrate better with automation tools such as Ansible, which rely on scripts adhering to Unix best practices such as appropriate exit codes on success/failure. h4. Current behavior (incorrect) When reassignments are still in progress {{kafka-reassign-partitions.sh}} prints {{ERROR}} messages but returns an exit code of zero, which indicates success. This behavior makes it a bit cumbersome to integrate the script into automation tools such as Ansible. {code} $ kafka-reassign-partitions.sh --zookeeper zookeeper1:2181 --reassignment-json-file partitions-to-move.json --verify Status of partition reassignment: ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] Reassignment of partition [mytopic,0] completed successfully Reassignment of partition [myothertopic,1] completed successfully Reassignment of partition [myothertopic,3] completed successfully ... $ echo $? 0 # But preferably the exit code in the presence of ERRORs should be, say, 1. {code} h3. How to improve I'd suggest that, using the above as the running example, if there are any {{ERROR}} entries in the output (i.e. if there are any assignments remaining that don't match the desired assignments), then the {{kafka-reassign-partitions.sh}} should return a non-zero exit code. h3. Notes In Kafka 0.8.2 the output is a bit different: The ERROR messages are now phrased differently. Before: {code} ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] {code} Now: {code} Reassignment of partition [mytopic,2] is still in progress {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (KAFKA-2214) kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet
[ https://issues.apache.org/jira/browse/KAFKA-2214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gwen Shapira updated KAFKA-2214: Reviewer: Gwen Shapira (was: Neha Narkhede) kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet -- Key: KAFKA-2214 URL: https://issues.apache.org/jira/browse/KAFKA-2214 Project: Kafka Issue Type: Improvement Components: admin Affects Versions: 0.8.1.1, 0.8.2.0 Reporter: Michael Noll Assignee: Manikumar Reddy Priority: Minor Attachments: KAFKA-2214.patch, KAFKA-2214_2015-07-10_21:56:04.patch h4. Background The admin script {{kafka-reassign-partitions.sh}} should integrate better with automation tools such as Ansible, which rely on scripts adhering to Unix best practices such as appropriate exit codes on success/failure. h4. Current behavior (incorrect) When reassignments are still in progress {{kafka-reassign-partitions.sh}} prints {{ERROR}} messages but returns an exit code of zero, which indicates success. This behavior makes it a bit cumbersome to integrate the script into automation tools such as Ansible. {code} $ kafka-reassign-partitions.sh --zookeeper zookeeper1:2181 --reassignment-json-file partitions-to-move.json --verify Status of partition reassignment: ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] Reassignment of partition [mytopic,0] completed successfully Reassignment of partition [myothertopic,1] completed successfully Reassignment of partition [myothertopic,3] completed successfully ... $ echo $? 0 # But preferably the exit code in the presence of ERRORs should be, say, 1. {code} h3. How to improve I'd suggest that, using the above as the running example, if there are any {{ERROR}} entries in the output (i.e. if there are any assignments remaining that don't match the desired assignments), then the {{kafka-reassign-partitions.sh}} should return a non-zero exit code. h3. Notes In Kafka 0.8.2 the output is a bit different: The ERROR messages are now phrased differently. Before: {code} ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] {code} Now: {code} Reassignment of partition [mytopic,2] is still in progress {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (KAFKA-2214) kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet
[ https://issues.apache.org/jira/browse/KAFKA-2214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jun Rao updated KAFKA-2214: --- Reviewer: Neha Narkhede kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet -- Key: KAFKA-2214 URL: https://issues.apache.org/jira/browse/KAFKA-2214 Project: Kafka Issue Type: Improvement Components: admin Affects Versions: 0.8.1.1, 0.8.2.0 Reporter: Michael Noll Assignee: Manikumar Reddy Priority: Minor Attachments: KAFKA-2214.patch h4. Background The admin script {{kafka-reassign-partitions.sh}} should integrate better with automation tools such as Ansible, which rely on scripts adhering to Unix best practices such as appropriate exit codes on success/failure. h4. Current behavior (incorrect) When reassignments are still in progress {{kafka-reassign-partitions.sh}} prints {{ERROR}} messages but returns an exit code of zero, which indicates success. This behavior makes it a bit cumbersome to integrate the script into automation tools such as Ansible. {code} $ kafka-reassign-partitions.sh --zookeeper zookeeper1:2181 --reassignment-json-file partitions-to-move.json --verify Status of partition reassignment: ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] Reassignment of partition [mytopic,0] completed successfully Reassignment of partition [myothertopic,1] completed successfully Reassignment of partition [myothertopic,3] completed successfully ... $ echo $? 0 # But preferably the exit code in the presence of ERRORs should be, say, 1. {code} h3. How to improve I'd suggest that, using the above as the running example, if there are any {{ERROR}} entries in the output (i.e. if there are any assignments remaining that don't match the desired assignments), then the {{kafka-reassign-partitions.sh}} should return a non-zero exit code. h3. Notes In Kafka 0.8.2 the output is a bit different: The ERROR messages are now phrased differently. Before: {code} ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] {code} Now: {code} Reassignment of partition [mytopic,2] is still in progress {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (KAFKA-2214) kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet
[ https://issues.apache.org/jira/browse/KAFKA-2214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Manikumar Reddy updated KAFKA-2214: --- Assignee: Manikumar Reddy Status: Patch Available (was: Open) kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet -- Key: KAFKA-2214 URL: https://issues.apache.org/jira/browse/KAFKA-2214 Project: Kafka Issue Type: Improvement Components: admin Affects Versions: 0.8.1.1, 0.8.2.0 Reporter: Michael Noll Assignee: Manikumar Reddy Priority: Minor Attachments: KAFKA-2214.patch h4. Background The admin script {{kafka-reassign-partitions.sh}} should integrate better with automation tools such as Ansible, which rely on scripts adhering to Unix best practices such as appropriate exit codes on success/failure. h4. Current behavior (incorrect) When reassignments are still in progress {{kafka-reassign-partitions.sh}} prints {{ERROR}} messages but returns an exit code of zero, which indicates success. This behavior makes it a bit cumbersome to integrate the script into automation tools such as Ansible. {code} $ kafka-reassign-partitions.sh --zookeeper zookeeper1:2181 --reassignment-json-file partitions-to-move.json --verify Status of partition reassignment: ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] Reassignment of partition [mytopic,0] completed successfully Reassignment of partition [myothertopic,1] completed successfully Reassignment of partition [myothertopic,3] completed successfully ... $ echo $? 0 # But preferably the exit code in the presence of ERRORs should be, say, 1. {code} h3. How to improve I'd suggest that, using the above as the running example, if there are any {{ERROR}} entries in the output (i.e. if there are any assignments remaining that don't match the desired assignments), then the {{kafka-reassign-partitions.sh}} should return a non-zero exit code. h3. Notes In Kafka 0.8.2 the output is a bit different: The ERROR messages are now phrased differently. Before: {code} ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] {code} Now: {code} Reassignment of partition [mytopic,2] is still in progress {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (KAFKA-2214) kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet
[ https://issues.apache.org/jira/browse/KAFKA-2214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Manikumar Reddy updated KAFKA-2214: --- Attachment: KAFKA-2214.patch kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet -- Key: KAFKA-2214 URL: https://issues.apache.org/jira/browse/KAFKA-2214 Project: Kafka Issue Type: Improvement Components: admin Affects Versions: 0.8.1.1, 0.8.2.0 Reporter: Michael Noll Priority: Minor Attachments: KAFKA-2214.patch h4. Background The admin script {{kafka-reassign-partitions.sh}} should integrate better with automation tools such as Ansible, which rely on scripts adhering to Unix best practices such as appropriate exit codes on success/failure. h4. Current behavior (incorrect) When reassignments are still in progress {{kafka-reassign-partitions.sh}} prints {{ERROR}} messages but returns an exit code of zero, which indicates success. This behavior makes it a bit cumbersome to integrate the script into automation tools such as Ansible. {code} $ kafka-reassign-partitions.sh --zookeeper zookeeper1:2181 --reassignment-json-file partitions-to-move.json --verify Status of partition reassignment: ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] Reassignment of partition [mytopic,0] completed successfully Reassignment of partition [myothertopic,1] completed successfully Reassignment of partition [myothertopic,3] completed successfully ... $ echo $? 0 # But preferably the exit code in the presence of ERRORs should be, say, 1. {code} h3. How to improve I'd suggest that, using the above as the running example, if there are any {{ERROR}} entries in the output (i.e. if there are any assignments remaining that don't match the desired assignments), then the {{kafka-reassign-partitions.sh}} should return a non-zero exit code. h3. Notes In Kafka 0.8.2 the output is a bit different: The ERROR messages are now phrased differently. Before: {code} ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] {code} Now: {code} Reassignment of partition [mytopic,2] is still in progress {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (KAFKA-2214) kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet
[ https://issues.apache.org/jira/browse/KAFKA-2214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Noll updated KAFKA-2214: Description: h4. Background The admin script {{kafka-reassign-partitions.sh}} should integrate better with automation tools such as Ansible, which rely on scripts adhering to Unix best practices such as appropriate exit codes on success/failure. h4. Current behavior (incorrect) When reassignments are still in progress {{kafka-reassign-partitions.sh}} prints {{ERROR}} messages but returns an exit code of zero, which indicates success. This behavior makes it a bit cumbersome to integrate the script into automation tools such as Ansible. {code} $ kafka-reassign-partitions.sh --zookeeper zookeeper1:2181 --reassignment-json-file partitions-to-move.json --verify Status of partition reassignment: ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] Reassignment of partition [mytopic,0] completed successfully Reassignment of partition [myothertopic,1] completed successfully Reassignment of partition [myothertopic,3] completed successfully ... $ echo $? 0 # But preferably the exit code in the presence of ERRORs should be, say, 1. {code} h3. How to improve I'd suggest that, using the above as the running example, if there are any {{ERROR}} entries in the output (i.e. if there are any assignments remaining that don't match the desired assignments), then the {{kafka-reassign-partitions.sh}} should return a non-zero exit code. h3. Notes In Kafka 0.8.2 the output is a bit different: The ERROR messages are now phrased differently. Before: {code} ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] {code} Now: {code} Reassignment of partition [mytopic,2] is still in progress {code} was: h4. Background The admin script {{kafka-reassign-partitions.sh}} should integrate better with automation tools such as Ansible, which rely on scripts adhering to Unix best practices such as appropriate exit codes on success/failure. h4. Current behavior (incorrect) When reassignments are still in progress {{kafka-reassign-partitions.sh}} prints {{ERROR}} messages but returns an exit code of zero, which indicates success. This behavior makes it a bit cumbersome to integrate the script into automation tools such as Ansible. {code} $ kafka-reassign-partitions.sh --zookeeper zookeeper1:2181 --reassignment-json-file partitions-to-move.json --verify Status of partition reassignment: ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] Reassignment of partition [mytopic,0] completed successfully Reassignment of partition [myothertopic,1] completed successfully Reassignment of partition [myothertopic,3] completed successfully ... $ echo $? 0 # But preferably the exit code in the presence of ERRORs should be, say, 1. {code} h3. How to improve I'd suggest that, using the above as the running example, if there are any {{ERROR}} entries in the output (i.e. if there are any assignments remaining that don't match the desired assignments), then the {{kafka-reassign-partitions.sh}} should return a non-zero exit code. Affects Version/s: 0.8.2.0 kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet -- Key: KAFKA-2214 URL: https://issues.apache.org/jira/browse/KAFKA-2214 Project: Kafka Issue Type: Improvement Components: admin Affects Versions: 0.8.1.1, 0.8.2.0 Reporter: Michael Noll Priority: Minor h4. Background The admin script {{kafka-reassign-partitions.sh}} should integrate better with automation tools such as Ansible, which rely on scripts adhering to Unix best practices such as appropriate exit codes on success/failure. h4. Current behavior (incorrect) When reassignments are still in progress {{kafka-reassign-partitions.sh}} prints {{ERROR}} messages but returns an exit code of zero, which indicates success. This behavior makes it a bit cumbersome to integrate the script into automation tools such as Ansible. {code} $ kafka-reassign-partitions.sh --zookeeper zookeeper1:2181 --reassignment-json-file partitions-to-move.json --verify Status of partition reassignment: ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] Reassignment of partition [mytopic,0] completed successfully Reassignment of partition [myothertopic,1] completed successfully Reassignment of partition [myothertopic,3] completed successfully ... $ echo $? 0
[jira] [Updated] (KAFKA-2214) kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet
[ https://issues.apache.org/jira/browse/KAFKA-2214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Noll updated KAFKA-2214: Description: h4. Background The admin script {{kafka-reassign-partitions.sh}} should integrate better with automation tools such as Ansible, which rely on scripts adhering to Unix best practices such as appropriate exit codes on success/failure. h4. Current behavior (incorrect) When reassignments are still in progress {{kafka-reassign-partitions.sh}} prints {{ERROR}} messages but returns an exit code of zero, which indicates success. This behavior makes it a bit cumbersome to integrate the script into automation tools such as Ansible. {code} $ kafka-reassign-partitions.sh --zookeeper zookeeper1:2181 --reassignment-json-file partitions-to-move.json --verify Status of partition reassignment: ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] Reassignment of partition [mytopic,0] completed successfully Reassignment of partition [myothertopic,1] completed successfully Reassignment of partition [myothertopic,3] completed successfully ... $ echo $? 0 # But preferably the exit code in the presence of ERRORs should be, say, 1. {code} h3. How to improve I'd suggest that, using the above as the running example, if there are any {{ERROR}} entries in the output (i.e. if there are any assignments remaining that don't match the desired assignments), then the {{kafka-reassign-partitions.sh}} should return a non-zero exit code. was: h4. Background The admin script {{kafka-reassign-partitions.sh}} should integrate better with automation tools such as Ansible, which rely on scripts adhering to Unix best practices such as appropriate exit codes on success/failure. h4. Current behavior (incorrect) When reassignments are still in progress {{kafka-reassign-partitions.sh}} prints {{ERROR}} messages but returns an exit code of zero, which indicates success. This behavior makes it a bit cumbersome to integrate the script into automation tools such as Ansible. {code} $ kafka-reassign-partitions.sh --zookeeper zookeeper1:2181 --reassignment-json-file partitions-to-move.json --verify Status of partition reassignment: ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] Reassignment of partition [mytopic,0] completed successfully Reassignment of partition [myothertopic,1] completed successfully Reassignment of partition [myothertopic,3] completed successfully ... $ echo $? 0 # But preferably the exit code would be, say, 1. {code} h3. How to improve I'd suggest that, using the above as the running example, if there are any {{ERROR}} entries in the output (i.e. if there are any assignments remaining that don't match the desired assignments), then the {{kafka-reassign-partitions.sh}} should return a non-zero exit code. kafka-reassign-partitions.sh --verify should return non-zero exit codes when reassignment is not completed yet -- Key: KAFKA-2214 URL: https://issues.apache.org/jira/browse/KAFKA-2214 Project: Kafka Issue Type: Improvement Components: admin Affects Versions: 0.8.1.1 Reporter: Michael Noll Priority: Minor h4. Background The admin script {{kafka-reassign-partitions.sh}} should integrate better with automation tools such as Ansible, which rely on scripts adhering to Unix best practices such as appropriate exit codes on success/failure. h4. Current behavior (incorrect) When reassignments are still in progress {{kafka-reassign-partitions.sh}} prints {{ERROR}} messages but returns an exit code of zero, which indicates success. This behavior makes it a bit cumbersome to integrate the script into automation tools such as Ansible. {code} $ kafka-reassign-partitions.sh --zookeeper zookeeper1:2181 --reassignment-json-file partitions-to-move.json --verify Status of partition reassignment: ERROR: Assigned replicas (316,324,311) don't match the list of replicas for reassignment (316,324) for partition [mytopic,2] Reassignment of partition [mytopic,0] completed successfully Reassignment of partition [myothertopic,1] completed successfully Reassignment of partition [myothertopic,3] completed successfully ... $ echo $? 0 # But preferably the exit code in the presence of ERRORs should be, say, 1. {code} h3. How to improve I'd suggest that, using the above as the running example, if there are any {{ERROR}} entries in the output (i.e. if there are any assignments remaining that don't match the desired assignments), then the {{kafka-reassign-partitions.sh}} should return a non-zero exit code. -- This message