You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Shamik Bandopadhyay <sh...@gmail.com> on 2022/06/08 23:06:46 UTC

Core Admin API - rename core issue on 8.11

Hi,

  After upgrading from 7.5 to 8.11, the core admin API for renaming core
has stopped working. For e.g. when I try to run this,

https://internal-kp-stage.test.com/solr/admin/cores?action=RENAME&core=knowledge_shard1_replica_n1&other=knowledge

It throws the following error.

{
  "responseHeader": {
    "status": 400,
    "QTime": 140
  },
  "error": {
    "metadata": [
      "error-class",
      "org.apache.solr.common.SolrException",
      "root-error-class",
      "org.apache.solr.common.SolrException"
    ],
    "msg": "Not supported in SolrCloud",
    "code": 400
  }
}

This call works fine in 7.5 . As per the documentation, the API format
seems to be right.

https://solr.apache.org/guide/8_11/coreadmin-api.html#coreadmin-rename

Any pointers will be appreciated.

Thanks,
Shamik

Re: Core Admin API - rename core issue on 8.11

Posted by Eric Pugh <ep...@opensourceconnections.com>.
Shamik, updating the documentation to reflect what you’ve learned is a great way to get involved with the community.   I’d love to see a PR submitted that clarifies the docs and would be happy to review it.

> On Jun 8, 2022, at 7:43 PM, Shamik Bandopadhyay <sh...@gmail.com> wrote:
> 
> Hi Shawn,
> 
>  Thanks for the insight. As you've mentioned, renaming the core name in
> the core properties file does create unwanted consequences. I did give it a
> try in a test environment earlier. Renaming the core is not essential for
> us, it's just to add some convenience for a few folks using Solr UI to
> browse the data. It'll be good to have the documentation updated at
> some point to remove unsupported dthe core admin APIs.
> 
> Appreciate your help.
> 
> Thanks,
> Shamik
> 
> On Wed, Jun 8, 2022 at 4:21 PM Shawn Heisey <ap...@elyograg.org> wrote:
> 
>> On 6/8/2022 5:06 PM, Shamik Bandopadhyay wrote:
>>>     "msg": "Not supported in SolrCloud",
>> 
>> Using the CoreAdmin API when running in cloud mode is a REALLY bad
>> idea.  The CoreAdmin API cannot touch information in zookeeper. With
>> part of the information for a SolrCloud collection being in zookeeper
>> and part of it on the disk in the core.properties files, it causes
>> serious problems to try and use that API in cloud mode.
>> 
>> Don't do it.  Use the Collections API to make modifications to your
>> indexes.
>> 
>> Looks like we made it explicitly not supported at some point in 8.x, and
>> I can tell you that is a decision that will NOT be reversed.  We've seen
>> too many people break a working SolrCloud install completely by using
>> the CoreAdmin API to make changes.
>> 
>> If you are absolutely certain that the change you are wanting to make
>> will not break the collection (and I am pretty sure that renaming a core
>> would break something) then you can manually modify the core.properties
>> file and restart Solr.  You might also need to update the collection
>> information in zookeeper, which is why CoreAdmin has been disabled in
>> cloud mode.
>> 
>> Thanks,
>> Shawn
>> 
>> 

_______________________
Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467 | http://www.opensourceconnections.com <http://www.opensourceconnections.com/> | My Free/Busy <http://tinyurl.com/eric-cal>  
Co-Author: Apache Solr Enterprise Search Server, 3rd Ed <https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw>	
This e-mail and all contents, including attachments, is considered to be Company Confidential unless explicitly stated otherwise, regardless of whether attachments are marked as such.


Re: Core Admin API - rename core issue on 8.11

Posted by Shamik Bandopadhyay <sh...@gmail.com>.
Hi Shawn,

  Thanks for the insight. As you've mentioned, renaming the core name in
the core properties file does create unwanted consequences. I did give it a
try in a test environment earlier. Renaming the core is not essential for
us, it's just to add some convenience for a few folks using Solr UI to
browse the data. It'll be good to have the documentation updated at
some point to remove unsupported dthe core admin APIs.

Appreciate your help.

Thanks,
Shamik

On Wed, Jun 8, 2022 at 4:21 PM Shawn Heisey <ap...@elyograg.org> wrote:

> On 6/8/2022 5:06 PM, Shamik Bandopadhyay wrote:
> >      "msg": "Not supported in SolrCloud",
>
> Using the CoreAdmin API when running in cloud mode is a REALLY bad
> idea.  The CoreAdmin API cannot touch information in zookeeper. With
> part of the information for a SolrCloud collection being in zookeeper
> and part of it on the disk in the core.properties files, it causes
> serious problems to try and use that API in cloud mode.
>
> Don't do it.  Use the Collections API to make modifications to your
> indexes.
>
> Looks like we made it explicitly not supported at some point in 8.x, and
> I can tell you that is a decision that will NOT be reversed.  We've seen
> too many people break a working SolrCloud install completely by using
> the CoreAdmin API to make changes.
>
> If you are absolutely certain that the change you are wanting to make
> will not break the collection (and I am pretty sure that renaming a core
> would break something) then you can manually modify the core.properties
> file and restart Solr.  You might also need to update the collection
> information in zookeeper, which is why CoreAdmin has been disabled in
> cloud mode.
>
> Thanks,
> Shawn
>
>

Re: Core Admin API - rename core issue on 8.11

Posted by Shawn Heisey <ap...@elyograg.org>.
On 6/8/2022 5:06 PM, Shamik Bandopadhyay wrote:
>      "msg": "Not supported in SolrCloud",

Using the CoreAdmin API when running in cloud mode is a REALLY bad 
idea.  The CoreAdmin API cannot touch information in zookeeper. With 
part of the information for a SolrCloud collection being in zookeeper 
and part of it on the disk in the core.properties files, it causes 
serious problems to try and use that API in cloud mode.

Don't do it.  Use the Collections API to make modifications to your indexes.

Looks like we made it explicitly not supported at some point in 8.x, and 
I can tell you that is a decision that will NOT be reversed.  We've seen 
too many people break a working SolrCloud install completely by using 
the CoreAdmin API to make changes.

If you are absolutely certain that the change you are wanting to make 
will not break the collection (and I am pretty sure that renaming a core 
would break something) then you can manually modify the core.properties 
file and restart Solr.  You might also need to update the collection 
information in zookeeper, which is why CoreAdmin has been disabled in 
cloud mode.

Thanks,
Shawn