Delaying allocation when a node leaves

Hello All,

How to update the index.unassigned.node_left.delayed_timeout dynamic setting in opensearch. like in elasticsearch Delaying allocation when a node leaves | Elasticsearch Guide [7.17] | Elastic.

I have tried in many ways but no luck. Could anyone please help me out.

[opensearch@observability-opensearch ~]$ curl -X PUT "https://localhost:9200/_all/_settings?pretty" -k -u admin -H 'Content-Type: application/json' -d'
{
  "settings": {
    "index.unassigned.node_left.delayed_timeout": "5m"
  }
}
'
Enter host password for user 'admin':
{
  "error" : {
    "root_cause" : [
      {
        "type" : "security_exception",
        "reason" : "no permissions for [] and User [name=admin, backend_roles=[admin], requestedTenant=null]"
      }
    ],
    "type" : "security_exception",
    "reason" : "no permissions for [] and User [name=admin, backend_roles=[admin], requestedTenant=null]"
  },
  "status" : 403
}
[opensearch@observability-opensearch ~]$ curl -X PUT "https://localhost:9200/_all/_settings?pretty" -k -u admin -H 'Content-Type: application/json' -d'
{
  "persistent": {
    "index.unassigned.node_left.delayed_timeout": "5m"
  }
}
'
Enter host password for user 'admin':
{
  "error" : {
    "root_cause" : [
      {
        "type" : "security_exception",
        "reason" : "no permissions for [] and User [name=admin, backend_roles=[admin], requestedTenant=null]"
      }
    ],
    "type" : "security_exception",
    "reason" : "no permissions for [] and User [name=admin, backend_roles=[admin], requestedTenant=null]"
  },
  "status" : 403
}

Thanks,
Kishore

Also where I can find this settings… Didn’t find it under _all/_settings and _cluster/settings

Hi,

The first command should be right. The error sounds like a permissions issue.

You wouldn’t see the option under _settings endpoints because it’s not set by default.

Hello Radu,

Thanks for your response. Yes, opensearch doesn’t allow to make any changes on opendistro* indexes… Although I have tried with admin cacert and key but no luck.

However I was able to manage all the indexes except opensearch inbuilt indexes.

Regards,
Kishore

1 Like

hi.
Did you find a fix for this? I also wish to amend ‘index.unassigned.node_left.delayed_timeout’ but failing when trying with admin.

Sorry for delay in response. As stated above we can’t change for security indexes, except security indexes it works for all.

@kksaha @radu.gheorghe @coredump17

Just some explanation on the initially reported error.
The observed error is expected. As you’ve already noticed the _all option applies to all indices including .opendistro_security.

This index is not accessible by any of the internal users, including the admin user.

The only way to read and update that index is by using the admin certificate defined in admin_dn in opensearch.yml and the curl command.

curl --insecure --cert ./config/kirk.pem --key ./config/kirk-key.pem --cacert ./config/root-ca.pem -H "Content-Type:application/json" -XPUT https://localhost:9200/_all/_settings -d '{"settings":{"index.unassigned.node_left.delayed_timeout": "0"}}'

image

3 Likes