Search code examples
solrapache-zookeeperfusionlucidworks

Change "Solr Cluster" in Lucidworks Fusion 4


I am running Fusion 4.2.4 with external Zookeeper (3.5.6) and Solr (7.7.2). I have been running a local set of servers and am trying to move to AWS instances. All of the configuration from my local Zookeepers has been duplicated to the AWS instances so they should be functionally equivalent.

I am to the point where I want to shut down the old (local) Zookeeper instances and just use the ones running in AWS. I have changed the configuration for Solr and Fusion (fusion.properties) so that they only use the AWS instances.

The problem I have is that Fusion's solr cluster (System->Solr Clusters) associated with all of my collections is still set to the old Zookeepers :9983,:9983,:9983 so if I turn off all of the old instances of Zookeeper my queries through Fusion's Query API no longer work. When I try to change the "Connect String" for that cluster it fails because the cluster is currently in use by collections. I am able to create a new cluster but there is no way that I can see to associate the new cluster with any of my collections. In a test environment set up similar to production, I have changed the searchClusterId for a specific collection using Fusion's Collections API however after doing so the queries still fail when I turn off all of the "old" Zookeeper instances. It seems like this is the way to go so I'm surprised that it doesn't seem to work.

So far, Lucidworks's support has not been able to provide a solution - I am open to suggestions.


Solution

  • This is what I came up with to solve this problem.

    I created a test environment with an AWS Fusion UI/API/etc., local Solr, AWS Solr, local ZK, and AWS ZK.

      1. Configure Fusion and Solr to only have the AWS ZK configured
      2. Configure the two ZKs to be an ensemble
      3. Create a new Solr Cluster in Fusion containing only the AWS ZK
      4. For each collection in Solr
          a. GET the json from <fusion_url>:8764/api/collections/<collection>
          b. Edit the json to change “searchClusterId” to the new cluster defined in Fusion
          c. PUT the new json to <fusion_url>:8764/api/collections/<collection>
    

    After doing all of this, I was able to change the “default” Solr cluster in the Fusion Admin UI to confirm that no collections were using it (I wasn’t sure if anything would use the ‘default’ cluster so I thought it would be wise to not take the chance). I was able to then stop the local ZK, put the AWS ZK in standalone mode, and restart Fusion. Everything seems to have started without issues.

    I am not sure that this is the best way to do it, but it solved the problem as far as I could determine.