Force index allocation for. opendistro, .opensearch index

** version 2.2.0**

Describe the issue:
I added 2 new data nodes on in my opensearch Cluster to store the logs of our API-Gateway

I dont want .opensearch* and .opendistro* indexes to be created on these 2 new nodes
So I set a rack id for my existing nodes called applicative_rack

And i created ( successfully) 2 index templates for these indexes as follow : ( to force allocating these system indexes on the applicative_rack and not on the new nodes for which rack id is different ) :
POST /_index_template/opendistro { “index_patterns”: [“.opendistro*”], “template”: { “settings”: { “index.routing.allocation.require.rack”: “applicative_rack” } }}
POST /_index_template/opensearch { “index_patterns”: [“.opensearch*”], “template”: { “settings”: { “index.routing.allocation.require.rack”: “applicative_rack” } }}

But when I started my new Opensearch data nodes :
it seems the .opendistro* and .opensearch* indexes are created on them ( the new nodes ) and the index templates are absolutely NOT applied ( issue occurs only for these system indexes, no issue with any others indexes… )

Why can t I force index allocation for : .opendistro* and .opensearch* indexes ?
( mainly:
.opendistro-job-scheduler-lock
.opendistro-ism-managed-index-history
.opendistro-alerting-config
.opensearch-notifications-config
)
Is there any other way to proceed and force allocation for these system indexes ?

Regards

@kristof.larcher Could you share the settings of these indices?

I found out the solution :slight_smile:

You cant set configuration for these system indexes aven with user ADMIN
but

if you use the admin_dn set with security plugin ( confer conf )
You can do whatever you want…

conf in opensearch.yml
plugins.security.authcz.admin_dn: CN=kirk,OU=client,O=client,L=test, C=de

and curl request to push index template fo system index ( forcing allocation to a rack )
curl -k --cert ./kirk.pem --key ./kirk-key.pem -X PUT https://localhost:9200/_index_template/opensearch -d ‘{ “index_patterns”: [“.opensearch*”], “template”: { “settings”: { “index.routing.allocation.require.rack”: “applicative_rack” }}}’ -H 'Content-Type: application/json

it s mentionned i n any documentation