[
https://issues.apache.org/jira/browse/CASSANDRA-16280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexander Dejanovski updated CASSANDRA-16280:
---------------------------------------------
Test and Documentation Plan:
Regression test added under {{LoaderOptionsTest.testEncryptionSettings}},
invoking {{LoaderOptions.builder().parseArgs()}} with all the encryption
options.
Failure with the current trunk:
{code:java}
test:
[echo] Number of test runners: 3
[mkdir] Created dir:
/Users/adejanovski/projets/cassandra/thelastpickle/cassandra/build/test/cassandra
[mkdir] Created dir:
/Users/adejanovski/projets/cassandra/thelastpickle/cassandra/build/test/output
[junit-timeout] Testsuite: org.apache.cassandra.tools.LoaderOptionsTest
[junit-timeout] Testsuite: org.apache.cassandra.tools.LoaderOptionsTest Tests
run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0,824 sec
[junit-timeout]
[junit-timeout] Testcase:
testEncryptionSettings(org.apache.cassandra.tools.LoaderOptionsTest): Caused an
ERROR
[junit-timeout] EncryptionOptions cannot be changed after configuration applied
[junit-timeout] java.lang.IllegalStateException: EncryptionOptions cannot be
changed after configuration applied
[junit-timeout] at
org.apache.cassandra.config.EncryptionOptions.ensureConfigNotApplied(EncryptionOptions.java:162)
[junit-timeout] at
org.apache.cassandra.config.EncryptionOptions.applyConfig(EncryptionOptions.java:130)
[junit-timeout] at
org.apache.cassandra.tools.LoaderOptions$Builder.parseArgs(LoaderOptions.java:478)
[junit-timeout] at
org.apache.cassandra.tools.LoaderOptionsTest.testEncryptionSettings(LoaderOptionsTest.java:55)
[junit-timeout]
[junit-timeout]
[junit-timeout] Test org.apache.cassandra.tools.LoaderOptionsTest FAILED
{code}
The test passes with the patch:
{code:java}
test:
[echo] Number of test runners: 3
[junit-timeout] Testsuite: org.apache.cassandra.tools.LoaderOptionsTest
[junit-timeout] Testsuite: org.apache.cassandra.tools.LoaderOptionsTest Tests
run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0,5 sec
BUILD SUCCESSFUL
{code}
Status: Patch Available (was: In Progress)
Here's the patch:
* [branch|https://github.com/thelastpickle/cassandra/tree/CASSANDRA-16280]
*
[commit|https://github.com/thelastpickle/cassandra/commit/dbce40a06d89c415cbe172e4726b6c4bb38fe4c9]
I'm waiting for the build to go through in CircleCI.
> SSTableLoader will fail if encryption parameters are used due to
> CASSANDRA-16144
> --------------------------------------------------------------------------------
>
> Key: CASSANDRA-16280
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16280
> Project: Cassandra
> Issue Type: Bug
> Components: Tool/bulk load
> Reporter: Alexander Dejanovski
> Assignee: Alexander Dejanovski
> Priority: Normal
> Fix For: 4.0-beta
>
>
> CASSANDRA-16144 recently introduced [repeated calls
> |https://github.com/apache/cassandra/compare/trunk...dcapwell:commit_remote_branch/CASSANDRA-16144-trunk-209E2350-3A50-457E-A466-F2661CD0D4D1#diff-b87acacbdc34464d327446f7a7e64718dbf843d70f5fbc9e5ddcd1bafca0f441R478]to
> _clientEncOptions.applyConfig()_ for each encryption parameter passed to the
> sstableloader command line.
> This consistently fails because _applyConfig()_ can be called only once due
> to the _ensureConfigNotApplied()_ check at the beginning of the method.
> This call is not necessary since the _with...()_ methods will invoke
> _applyConfig()_ each time:
> {code:java}
> public EncryptionOptions withTrustStore(String truststore)
> {
> return new EncryptionOptions(keystore, keystore_password, truststore,
> truststore_password, cipher_suites,
> protocol, algorithm, store_type,
> require_client_auth, require_endpoint_verification,
> enabled, optional).applyConfig();
> }
> {code}
> I'll build a patch for this with the appropriate unit test.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]