Skip to content

Conversation

@alourie
Copy link
Contributor

@alourie alourie commented Apr 10, 2017

What is this PR for?

The Cassandra Interpreter does not support talking to clusters that use SSL/client to node encryption. It does not have the properties needed to configure the SSL Context. This PR adds the properties to the driver config and sets up the SSL options when they are requested.

What type of PR is it?

Feature

What is the Jira issue?

ZEPPELIN-1501

How should this be tested?

Using Cassandra/CQL interpreter connect to a Cassandra cluster that uses a client to node encryption, i.e:

%cassandra
describe keyspaces;

Questions:

  • Does the licenses files need update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? Yes.
    The new SSL-related properties should be added to the list (cassandra.ssl.enabled, cassandra.ssl.truststore.path and cassandra.ssl.truststore.password).

@Leemoonsoo
Copy link
Member

Thanks @alourie for the contribution
Could you configure CI? Following message from Jekins might help.

Looks like travis-ci is not configured for your fork.
Please setup by swich on 'zeppelin' repository at https://travis-ci.org/profile and travis-ci.
And then make sure 'Build branch updates' option is enabled in the settings https://travis-ci.org/instaclustr/zeppelin/settings.

To trigger CI after setup, you will need ammend your last commit with
git commit --amend
git push your-remote HEAD --force

See http://zeppelin.apache.org/contribution/contributions.html#continuous-integration.
Build step 'Execute shell' marked build as failure

Let me know if you have any problem on setting up CI.

@alourie
Copy link
Contributor Author

alourie commented Apr 22, 2017

Hi @Leemoonsoo! I have it in my task list, will get to it probably next week.

Thanks!

@instaclustr-oss
Copy link

Hi @Leemoonsoo

Sorry for taking awhile to setup the CI. Now that I have, I see some jobs fail. What should I do about it?

Thanks!

@Leemoonsoo
Copy link
Member

They might be flaky tests. Could you retry failed jobs and see if it goes green?

@alourie
Copy link
Contributor Author

alourie commented Jul 13, 2017

@Leemoonsoo I've tried to rerun them few times. Only one now fails - build #4; fails with NPE in C* setup/tearDown:

org.apache.zeppelin.cassandra.CassandraInterpreterTest  Time elapsed: 40.218 sec  <<< ERROR!
java.lang.NullPointerException: null
	at org.apache.zeppelin.cassandra.CassandraInterpreter.open(CassandraInterpreter.java:200)
	at org.apache.zeppelin.cassandra.CassandraInterpreterTest.setUp(CassandraInterpreterTest.java:115)
org.apache.zeppelin.cassandra.CassandraInterpreterTest  Time elapsed: 40.219 sec  <<< ERROR!
java.lang.NullPointerException: null
	at org.apache.zeppelin.cassandra.CassandraInterpreter.close(CassandraInterpreter.java:235)
	at org.apache.zeppelin.cassandra.CassandraInterpreterTest.tearDown(CassandraInterpreterTest.java:120)

https://travis-ci.org/instaclustr/zeppelin/builds/252649615

There's no much more information beyond that. Anything else I could do to move this forward?

Thanks!

@Leemoonsoo
Copy link
Member

Looks like code need to handle null return of getProperty(CASSANDRA_WITH_SSL) at org.apache.zeppelin.cassandra.CassandraInterpreter.open(CassandraInterpreter.java:200)

@alourie
Copy link
Contributor Author

alourie commented Jul 13, 2017

@Leemoonsoo oh wow, who knew. So now it works. All checks passed :-)

Thanks for the help!

@Leemoonsoo
Copy link
Member

LGTM. Merge this PR to master if no further discussions.

@alourie Could you let me know your JIRA id? i'd like to mark https://issues.apache.org/jira/browse/ZEPPELIN-1501 resolved with your id as assignee.

@alourie
Copy link
Contributor Author

alourie commented Jul 14, 2017

@Leemoonsoo my Jira ID is alourie, but please assign it to Rob Marshall, who opened the ticket. He did all the development, I just helped with the PR/CI :-)

asfgit pushed a commit that referenced this pull request Jul 15, 2017
### What is this PR for?
The Cassandra Interpreter does not support talking to clusters that use SSL/client to node encryption. It does not have the properties needed to configure the SSL Context. This PR adds the properties to the driver config and sets up the SSL options when they are requested.

### What type of PR is it?
Feature

### What is the Jira issue?
[ZEPPELIN-1501](https://issues.apache.org/jira/browse/ZEPPELIN-1501)

### How should this be tested?
Using Cassandra/CQL interpreter connect to a Cassandra cluster that uses a client to node encryption, i.e:

```
%cassandra
describe keyspaces;
```
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? Yes.
    The new SSL-related properties should be added to the list (cassandra.ssl.enabled, cassandra.ssl.truststore.path and cassandra.ssl.truststore.password).

Author: Alex Lourie <[email protected]>
Author: Robert Marshall <[email protected]>

Closes #2238 from alourie/0.7.1-withSSL and squashes the following commits:

2a6eee6 [Alex Lourie] Handle potential NPE in properties parsing
e9b4769 [Alex Lourie] Fix formatting for CI to pass
521b2d9 [Robert Marshall] Add SSL support to Cassandra interpreter
@asfgit asfgit closed this in 3a57fc2 Jul 15, 2017
@Leemoonsoo
Copy link
Member

Leemoonsoo commented Jul 15, 2017

Thanks @alourie and Rob Marshall.
This PR has merged. but @asfgit didn't automatically closed it. @alourie Could you close this PR manually?

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.

3 participants