Skip to content

GET /_nodes/http,settings?flat_settings returns path.data as an array of strings #27805

@russcam

Description

@russcam

Elasticsearch version (bin/elasticsearch --version): 6.1.0

Plugins installed: []

JVM version (java -version):

java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

OS version (uname -a if on a Unix-like system): Windows 10

Description of the problem including expected versus actual behavior:

The .NET client (as well as other clients) uses

GET /_nodes/http,settings?flat_settings

to sniff the state of the cluster. With Elasticsearch 6.0.1, the response looks like

{
    "_nodes": {
        "total": 1,
        "successful": 1,
        "failed": 0
    },
    "cluster_name": "sniffroledetection-cluster-2ba8fa",
    "nodes": {
        "U_ztq5UiS2e8xyOjL_evlA": {
            "name": "sniffroledetection-node-2ba8fa",
            "transport_address": "127.0.0.1:9300",
            "host": "127.0.0.1",
            "ip": "127.0.0.1",
            "version": "6.0.1",
            "build_hash": "601be4a",
            "roles": ["master", "ingest"],
            "attributes": {
                "testingcluster": "true",
                "ml.max_open_jobs": "10",
                "rack_id": "rack_one",
                "ml.enabled": "true",
                "gateway": "true"
            },
            "settings": {
                "client.type": "node",
                "cluster.name": "sniffroledetection-cluster-2ba8fa",
                "http.port": "9200",
                "http.type.default": "netty4",
                "node.attr.gateway": "true",
                "node.attr.ml.enabled": "true",
                "node.attr.ml.max_open_jobs": "10",
                "node.attr.rack_id": "rack_one",
                "node.attr.testingcluster": "true",
                "node.data": "false",
                "node.master": "true",
                "node.name": "sniffroledetection-node-2ba8fa",
                "path.data.0": "C:\\Users\\User\\AppData\\Roaming\\NEST\\6.0.1\\elasticsearch-6.0.1\\data\\sniffroledetection-cluster-2ba8fa",
                "path.home": "C:\\Users\\User\\AppData\\Roaming\\NEST\\6.0.1\\elasticsearch-6.0.1",
                "path.logs": "C:\\Users\\User\\AppData\\Roaming\\NEST\\6.0.1\\elasticsearch-6.0.1\\logs",
                "path.repo": "C:\\Users\\User\\AppData\\Roaming\\NEST\\6.0.1\\repositories",
                "script.allowed_types": "inline,stored",
                "script.max_compilations_rate": "10000/1m",
                "search.remote.connect": "true",
                "transport.type.default": "netty4",
                "xpack.notification.hipchat.account.notify-monitoring.profile": "user",
                "xpack.notification.hipchat.account.notify-monitoring.user": "[email protected]",
                "xpack.security.authc.realms.file1.order": "0",
                "xpack.security.authc.realms.file1.type": "file",
                "xpack.security.authc.realms.pki1.enabled": "false",
                "xpack.security.authc.realms.pki1.order": "1",
                "xpack.security.authc.realms.pki1.type": "pki",
                "xpack.security.enabled": "false",
                "xpack.security.http.ssl.enabled": "false"
            },
            "http": {
                "bound_address": ["127.0.0.1:9200", "[::1]:9200"],
                "publish_address": "127.0.0.1:9200",
                "max_content_length_in_bytes": 104857600
            }
        }
    }
}

where path.data are flattened into individual key/value string pairs.

With Elasticsearch 6.1.0 however, the response is

{
  "_nodes": {
    "total": 1,
    "successful": 1,
    "failed": 0
  },
  "cluster_name": "sniffroledetection-cluster-4fc5bf",
  "nodes": {
    "VNm0VsLrT1WgF29TePLTgQ": {
      "name": "sniffroledetection-node-4fc5bf",
      "transport_address": "127.0.0.1:9300",
      "host": "127.0.0.1",
      "ip": "127.0.0.1",
      "version": "6.1.0",
      "build_hash": "c0c1ba0",
      "roles": ["master", "ingest"],
      "attributes": {
        "testingcluster": "true",
        "rack_id": "rack_one",
        "ml.machine_memory": "16944017408",
        "ml.max_open_jobs": "20",
        "ml.enabled": "true",
        "gateway": "true"
      },
      "settings": {
        "client.type": "node",
        "cluster.name": "sniffroledetection-cluster-4fc5bf",
        "http.port": "9200",
        "http.type.default": "netty4",
        "node.attr.gateway": "true",
        "node.attr.ml.enabled": "true",
        "node.attr.ml.machine_memory": "16944017408",
        "node.attr.ml.max_open_jobs": "20",
        "node.attr.rack_id": "rack_one",
        "node.attr.testingcluster": "true",
        "node.data": "false",
        "node.master": "true",
        "node.name": "sniffroledetection-node-4fc5bf",
        "path.data": ["C:\\Users\\russc\\AppData\\Roaming\\NEST\\6.1.0\\elasticsearch-6.1.0\\data\\sniffroledetection-cluster-4fc5bf"],
        "path.home": "C:\\Users\\russc\\AppData\\Roaming\\NEST\\6.1.0\\elasticsearch-6.1.0",
        "path.logs": "C:\\Users\\russc\\AppData\\Roaming\\NEST\\6.1.0\\elasticsearch-6.1.0\\logs",
        "path.repo": "C:\\Users\\russc\\AppData\\Roaming\\NEST\\6.1.0\\repositories",
        "script.allowed_types": "inline,stored",
        "script.max_compilations_rate": "10000/1m",
        "search.remote.connect": "true",
        "transport.type.default": "netty4",
        "xpack.notification.hipchat.account.notify-monitoring.profile": "user",
        "xpack.notification.hipchat.account.notify-monitoring.user": "[email protected]",
        "xpack.security.authc.realms.file1.order": "0",
        "xpack.security.authc.realms.file1.type": "file",
        "xpack.security.authc.realms.pki1.enabled": "false",
        "xpack.security.authc.realms.pki1.order": "1",
        "xpack.security.authc.realms.pki1.type": "pki",
        "xpack.security.enabled": "false",
        "xpack.security.http.ssl.enabled": "false"
      },
      "http": {
        "bound_address": ["127.0.0.1:9200", "[::1]:9200"],
        "publish_address": "127.0.0.1:9200",
        "max_content_length_in_bytes": 104857600
      }
    }
  }
}

Where path.data is returned as an array. This breaks the deserialization of the response, but also does not adhere to the flat_settings parameter.

Steps to reproduce:

Please include a minimal but complete recreation of the problem, including
(e.g.) index creation, mappings, settings, query etc. The easier you make for
us to reproduce it, the more likely that somebody will take the time to look at it.

  1. Specify path.data when starting Elasticsearch
  2. Execute a request against GET /_nodes/http,settings?flat_settings

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions