Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-4204

KafkaService.verify_reassign_partitions is a no-op

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.10.0.1
    • None
    • core
    • None

    Description

      In the 'verify_reassign_partitions' method of the KafkaService class in the system tests, we execute the kafka-reassign-partitions command and then do a regular expression match on the tools output to verify that the reassignment succeeded.

      In particular, we search for the pattern 'is in progress' in the output string. If the pattern exists, it means that the reassignment is still in progress.

      As it stands, this mechanism is broken because the tool outputs 'is still in progress' for each reassignment which hasn't completed. Further, the tool outputs a multi-line string, but the regex does not factor this in.

      In general, depending on a specific pattern on stdout to determine success or failure of an operation like reassignment is very fragile.

      The right thing to do would be for the tool to output a well defined data structure, which can be accurately interpreted by the test or any other program which needs that information.

      This JIRA is going to track the discussion and progress for implementing the latter.

      Attachments

        Activity

          People

            apurva Apurva Mehta
            apurva Apurva Mehta
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: