lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject svn commit: r1700751 - in /lucene/dev/trunk/solr: CHANGES.txt core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
Date Wed, 02 Sep 2015 10:15:19 GMT
Author: noble
Date: Wed Sep  2 10:15:18 2015
New Revision: 1700751

URL: http://svn.apache.org/r1700751
Log:
SOLR-8000: security.json is not loaded on server start

Modified:
    lucene/dev/trunk/solr/CHANGES.txt
    lucene/dev/trunk/solr/core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java
    lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java

Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1700751&r1=1700750&r2=1700751&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Wed Sep  2 10:15:18 2015
@@ -186,6 +186,9 @@ Bug Fixes
 * SOLR-7844: Zookeeper session expiry during shard leader election can cause multiple leaders.
   (Mike Roberts, Mark Miller, Jessica Cheng)
 
+* SOLR-8000: security.json is not loaded on server start (noble)
+
+
 Optimizations
 ----------------------
 

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java?rev=1700751&r1=1700750&r2=1700751&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java
(original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java
Wed Sep  2 10:15:18 2015
@@ -35,6 +35,7 @@ import org.apache.http.message.AbstractH
 import org.apache.http.message.BasicHeader;
 import org.apache.http.util.EntityUtils;
 import org.apache.solr.client.solrj.SolrRequest;
+import org.apache.solr.client.solrj.embedded.JettySolrRunner;
 import org.apache.solr.client.solrj.impl.CloudSolrClient;
 import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.client.solrj.request.GenericSolrRequest;
@@ -64,7 +65,6 @@ public class BasicAuthIntegrationTest ex
 
   private static final Logger log = LoggerFactory.getLogger(BasicAuthIntegrationTest.class);
 
-
   @Override
   protected void doExtraTests(MiniSolrCloudCluster miniCluster, SolrZkClient zkClient, ZkStateReader
zkStateReader,
                               CloudSolrClient cloudSolrClient, String defaultCollName) throws
Exception {
@@ -73,10 +73,21 @@ public class BasicAuthIntegrationTest ex
     assertNotNull(rsp.get(CommandOperation.ERR_MSGS));
     zkClient.setData("/security.json", STD_CONF.replaceAll("'", "\"").getBytes(UTF_8), true);
     String baseUrl = getRandomReplica(zkStateReader.getClusterState().getCollection(defaultCollName),
random()).getStr(BASE_URL_PROP);
-
     HttpClient cl = cloudSolrClient.getLbClient().getHttpClient();
     verifySecurityStatus(cl, baseUrl + "/admin/authentication", "authentication/class", "solr.BasicAuthPlugin",
20);
 
+    boolean found = false;
+    for (JettySolrRunner jettySolrRunner : miniCluster.getJettySolrRunners()) {
+      if(baseUrl.contains(String.valueOf(jettySolrRunner.getLocalPort()))){
+        found = true;
+        jettySolrRunner.stop();
+        jettySolrRunner.start();
+        verifySecurityStatus(cl, baseUrl + "/admin/authentication", "authentication/class",
"solr.BasicAuthPlugin", 20);
+        break;
+      }
+    }
+    assertTrue("No server found to restart , looking for : "+baseUrl , found);
+
     String command = "{\n" +
         "'set-user': {'harry':'HarryIsCool'}\n" +
         "}";

Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java?rev=1700751&r1=1700750&r2=1700751&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java (original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java Wed
Sep  2 10:15:18 2015
@@ -374,6 +374,7 @@ public class ZkStateReader implements Cl
           securityNodeListener.run();
         }
       });
+      securityData = getSecurityProps(true);
     }
   }
 



Mime
View raw message