tigerquoll opened a new pull request #1558: METRON-2312 solr scripts fixup
URL: https://github.com/apache/metron/pull/1558
 
 
   ## Contributor Comments
   Issue being fixed:
   
   1. Install HDP Search 4 or greater.
   2. `source /etc/defaults/metron`
   3. `$METRON_HOME/bin/add-collection bro`
   
   The command returns 
   ```
   Node does not exist: /live_nodes
   curl: (6) Could not resolve host: WatchedEvent state:SyncConnected type:None 
path; Unknown error
   curl: (6) Could not resolve host: WatchedEvent state:SyncConnected type:None 
path; Unknown error
   ```
   and the SOLR collection is not created.
   
   The readme in Metron-solr-common notes that the scripts do not work outside 
of Ambari by default if SOLR is using chroot zookeeper addressing and that you 
need to manually tweak $ZOOKEEPER environment variable to include the chrooted 
Zookeeper addresses that SOLR is storing its information at.
   
   The fix:
   1. Test the return value of zkcli command that pools SOLR Cloud 
configuration information for Zookeeper.
   a. If zkcli did not return a SOLR Cloud node, return 1.
   b. if zkcli did not return a SOLR Cloud node, and $ZOOKEEPER does not end in 
'/solr', make a suggestion to the user that it should.
   
   Testing:
   ```
   echo $ZOOKEEPER
   localhost:2181
   [root@node1 bin]# ./delete_collection.sh bro
   Node does not exist: /live_nodes
   Error occurred while attempting to read SOLR Cloud configuration data from 
Zookeeper.
   Warning! Environment variable ZOOKEEPER=localhost:2181 does not contain a 
chrooted zookeeper ensemble address - are you sure you do not mean 
ZOOKEEPER=localhost:2181/solr?
   ```
   
   ```
   [root@y134 bin]# export ZOOKEEPER=hdpsearchHost:2181/solr
   [root@y134 bin]# ./delete_collection.sh foo . 
   {
     "responseHeader":{
       "status":400,
       "QTime":90},
     "Operation delete caused 
exception:":"org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
 Could not find collection : foo",
     "exception":{
       "msg":"Could not find collection : foo",
       "rspCode":400},
     "error":{
       "metadata":[
         "error-class","org.apache.solr.common.SolrException",
         "root-error-class","org.apache.solr.common.SolrException"],
       "msg":"Could not find collection : foo",
       "code":400}}
   {
     "responseHeader":{
       "status":400,
       "QTime":31},
     "Operation delete caused 
exception:":"org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
 ConfigSet does not exist to delete: foo",
     "exception":{
       "msg":"ConfigSet does not exist to delete: foo",
       "rspCode":400},
     "error":{
       "metadata":[
         "error-class","org.apache.solr.common.SolrException",
         "root-error-class","org.apache.solr.common.SolrException"],
       "msg":"ConfigSet does not exist to delete: foo",
       "code":400}}
   ```
   
   ## Pull Request Checklist
   
   Thank you for submitting a contribution to Apache Metron.  
   Please refer to our [Development 
Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235)
 for the complete guide to follow for contributions.  
   Please refer also to our [Build Verification 
Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview)
 for complete smoke testing guides.  
   
   In order to streamline the review of the contribution we ask you follow 
these guidelines and ask you to double check the following:
   
   ### For all changes:
   - [x] Is there a JIRA ticket associated with this PR? If not one needs to be 
created at [Metron 
Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel).
   - [x] Does your PR title start with METRON-XXXX where XXXX is the JIRA 
number you are trying to resolve? Pay particular attention to the hyphen "-" 
character.
   - [x] Has your PR been rebased against the latest commit within the target 
branch (typically master)?
   
   ### For code changes:
   - [x] Have you included steps to reproduce the behavior or problem that is 
being changed or addressed?
   - [x] Have you included steps or a guide to how the change may be verified 
and tested manually?
   
   #### Note:
   Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.
   It is also recommended that [travis-ci](https://travis-ci.org) is set up for 
your personal repository such that your branches are built there before 
submitting a pull request.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to