Skip to content

KAFKA-4580: Use sasl.jaas.config for some system tests#2323

Closed
rajinisivaram wants to merge 4 commits intoapache:trunkfrom
rajinisivaram:KAFKA-4580
Closed

KAFKA-4580: Use sasl.jaas.config for some system tests#2323
rajinisivaram wants to merge 4 commits intoapache:trunkfrom
rajinisivaram:KAFKA-4580

Conversation

@rajinisivaram
Copy link
Copy Markdown
Contributor

Switched console_consumer, verifiable_consumer and verifiable_producer to use new sasl.jaas_config property instead of static JAAS configuration file when used with SASL_PLAINTEXT.

@rajinisivaram
Copy link
Copy Markdown
Contributor Author

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 6, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.11/570/
Test PASSed (JDK 8 and Scala 2.11).

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 6, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/569/
Test PASSed (JDK 8 and Scala 2.12).

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 6, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.10/568/
Test PASSed (JDK 7 and Scala 2.10).

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 9, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.11/626/
Test PASSed (JDK 8 and Scala 2.11).

@rajinisivaram
Copy link
Copy Markdown
Contributor Author

Fixed a typo. Tests are running here: https://jenkins.confluent.io/job/system-test-kafka-branch-builder/650/

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 9, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/625/
Test FAILed (JDK 8 and Scala 2.12).

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 9, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.10/624/
Test FAILed (JDK 7 and Scala 2.10).

@rajinisivaram
Copy link
Copy Markdown
Contributor Author

System test run https://jenkins.confluent.io/job/system-test-kafka-branch-builder/650/ completed with two failures that were unrelated : ReplicationTest.test_replication_with_broker_failure reported in KAFKA-4558 and StreamsSmokeTest.test_streams reported in KAFKA-4551.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe not critical, but can we rearrange this to use the existing single client_config method? Seems like we could potentially add just the node parameter, default None. I'm a bit unclear why our existing paths all use static_jaas_conf=True but the client_config_setup path uses static_jaas_conf = self.has_sasl and self.has_ssl -- since both has_ssl and has_sasl existed before, they don't seem like the right criteria (but I also haven't really paid attention to the relevant KIPs...). If there's a good reason for the difference, I think it should probably be clearer, either in naming, arguments triggering dynamic JAAS configs, or at least comments.

Copy link
Copy Markdown
Contributor Author

@rajinisivaram rajinisivaram Jan 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a comment in client_config_setup where static_jaas_conf is set that explains why it is set to a different value. SASL_SSL is self.has_sasl and self.has_ssl. Let me know if the comment needs to be rewritten. Basically, any criteria could have been chosen to set static for some and dynamic for others. I just chose SSL/non-SSL. The intention was to use existing tests to test a new KIP without adding to the time taken for running system tests by modifying some tests to use the new dynamic jaas config.

I have switched to using a single method and expanded the comment a bit.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if it would be better, but it feels like this is the kind of tweaking of templates that should be done in the templates themselves based on forwarding parameters to the template via the class members. In other words, if there are bits that should be swapped out, maybe we should encode those as methods on this class or simply conditionals in the template instead of doing regex search & replace here.

Copy link
Copy Markdown
Contributor Author

@rajinisivaram rajinisivaram Jan 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ewencp Thank you for the review. I have updated the code.

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 16, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/912/
Test PASSed (JDK 8 and Scala 2.12).

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 16, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.11/914/
Test PASSed (JDK 8 and Scala 2.11).

Copy link
Copy Markdown
Member

@ijuma ijuma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me apart from one comment. Would be good to run the system tests branch builder once again after review comments have been addressed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intend right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ijuma Thank you for the review. I had used tab instead of space, fixed and started a new system test run: https://jenkins.confluent.io/job/system-test-kafka-branch-builder/672/

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 16, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.11/916/
Test PASSed (JDK 8 and Scala 2.11).

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 16, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.10/914/
Test FAILed (JDK 7 and Scala 2.10).

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 16, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/914/
Test FAILed (JDK 8 and Scala 2.12).

@ijuma
Copy link
Copy Markdown
Member

ijuma commented Jan 17, 2017

@rajinisivaram, there were a number of system test failures that could be related. Could you have a look? If you think it's an environmental issue, you could re-run just one of the security related tests that failed.

@rajinisivaram
Copy link
Copy Markdown
Contributor Author

@ijuma Thank you for checking (I had forgotten all about the system test run). That was my mistake, a missing space in the property. I have fixed it and started another run (https://jenkins.confluent.io/job/system-test-kafka-branch-builder/673/)

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 17, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.10/925/
Test FAILed (JDK 7 and Scala 2.10).

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 17, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/925/
Test PASSed (JDK 8 and Scala 2.12).

@ijuma
Copy link
Copy Markdown
Member

ijuma commented Jan 17, 2017

It seems like there are no conflicts, but it would probably be good to rebase this branch now that 55abe65 has been merged.

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 17, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.11/927/
Test FAILed (JDK 8 and Scala 2.11).

@rajinisivaram
Copy link
Copy Markdown
Contributor Author

@ijuma Thank you, I have rebased and started a test run of just the replication tests with the rebased code: https://jenkins.confluent.io/job/system-test-kafka-branch-builder-2/175/. The earlier run of all the tests has not yet completed, but it is looking ok so far.

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 17, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/931/
Test PASSed (JDK 8 and Scala 2.12).

@rajinisivaram
Copy link
Copy Markdown
Contributor Author

The system tests from this morning had two unrelated streams test failures (https://jenkins.confluent.io/job/system-test-kafka-branch-builder/673/), all security related tests passed. Replication tests from the rebased code passed (https://jenkins.confluent.io/job/system-test-kafka-branch-builder-2/175/)

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 17, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.10/931/
Test FAILed (JDK 7 and Scala 2.10).

Copy link
Copy Markdown
Member

@ijuma ijuma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, merging to trunk and 0.10.2 branches.

asfgit pushed a commit that referenced this pull request Jan 17, 2017
Switched console_consumer, verifiable_consumer and verifiable_producer to use new sasl.jaas_config property instead of static JAAS configuration file when used with SASL_PLAINTEXT.

Author: Rajini Sivaram <rajinisivaram@googlemail.com>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>, Ismael Juma <ismael@juma.me.uk>

Closes #2323 from rajinisivaram/KAFKA-4580

(cherry picked from commit 3f6c4f6)
Signed-off-by: Ismael Juma <ismael@juma.me.uk>
@asfgit asfgit closed this in 3f6c4f6 Jan 17, 2017
@asfbot
Copy link
Copy Markdown

asfbot commented Jan 17, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.11/933/
Test FAILed (JDK 8 and Scala 2.11).

soenkeliebau pushed a commit to soenkeliebau/kafka that referenced this pull request Feb 7, 2017
Switched console_consumer, verifiable_consumer and verifiable_producer to use new sasl.jaas_config property instead of static JAAS configuration file when used with SASL_PLAINTEXT.

Author: Rajini Sivaram <rajinisivaram@googlemail.com>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>, Ismael Juma <ismael@juma.me.uk>

Closes apache#2323 from rajinisivaram/KAFKA-4580
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.

4 participants