KAFKA-4580: Use sasl.jaas.config for some system tests#2323
KAFKA-4580: Use sasl.jaas.config for some system tests#2323rajinisivaram wants to merge 4 commits intoapache:trunkfrom
Conversation
|
System test run started: https://jenkins.confluent.io/job/system-test-kafka-branch-builder/649/ |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
dbe6d36 to
5622b77
Compare
|
Refer to this link for build results (access rights to CI server needed): |
|
Fixed a typo. Tests are running here: https://jenkins.confluent.io/job/system-test-kafka-branch-builder/650/ |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@ewencp Thank you for the review. I have updated the code.
efead4c to
2565004
Compare
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
ijuma
left a comment
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@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/
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
@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. |
|
@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/) |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
It seems like there are no conflicts, but it would probably be good to rebase this branch now that 55abe65 has been merged. |
|
Refer to this link for build results (access rights to CI server needed): |
366bf43 to
7c89133
Compare
|
@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. |
|
Refer to this link for build results (access rights to CI server needed): |
|
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/) |
|
Refer to this link for build results (access rights to CI server needed): |
ijuma
left a comment
There was a problem hiding this comment.
LGTM, merging to trunk and 0.10.2 branches.
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>
|
Refer to this link for build results (access rights to CI server needed): |
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
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.