Skip to content

[Backport 8.19] Fixing nodes info response #4717

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 19 additions & 16 deletions specification/nodes/info/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { ByteSize, Name, VersionString } from '@_types/common'
import { ByteSize, Name, VersionNumber, VersionString } from '@_types/common'
import { Host, Ip, TransportAddress } from '@_types/Networking'
import { NodeRoles } from '@_types/Node'
import { integer, long } from '@_types/Numeric'
Expand All @@ -26,6 +26,7 @@ import { Duration, DurationValue, EpochTime, UnitMillis } from '@_types/Time'
import { IndexRouting } from '@indices/_types/IndexRouting'
import { AdditionalProperties } from '@spec_utils/behaviors'
import { Dictionary } from '@spec_utils/Dictionary'
import { Stringified } from '@spec_utils/Stringified'
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'

export class NodeInfo {
Expand All @@ -34,15 +35,16 @@ export class NodeInfo {
/** Short hash of the last git commit in this release. */
build_hash: string
build_type: string
component_versions: Dictionary<Name, integer>
/** The node’s host name. */
host: Host
http?: NodeInfoHttp
index_version: VersionNumber
/** The node’s IP address. */
ip: Ip
jvm?: NodeJvmInfo
/** The node's name */
name: Name
network?: NodeInfoNetwork
os?: NodeOperatingSystemInfo
plugins?: PluginStats[]
process?: NodeProcessInfo
Expand All @@ -59,11 +61,19 @@ export class NodeInfo {
transport?: NodeInfoTransport
/** Host and port where transport HTTP connections are accepted. */
transport_address: TransportAddress
transport_version: VersionNumber

/** Elasticsearch version running on this node. */
version: VersionString
modules?: PluginStats[]
ingest?: NodeInfoIngest
aggregations?: Dictionary<string, NodeInfoAggregation>
remote_cluster_server?: RemoveClusterServer
}

export class RemoveClusterServer {
bound_address: TransportAddress[]
publish_address: TransportAddress
}

export class NodeInfoSettings {
Expand Down Expand Up @@ -133,7 +143,7 @@ export class NodeInfoSettingsCluster {
name: Name
routing?: IndexRouting
election: NodeInfoSettingsClusterElection
initial_master_nodes?: string[]
initial_master_nodes?: string[] | string
/**
* @availability stack since=7.16.0
* @availability serverless
Expand Down Expand Up @@ -176,7 +186,7 @@ export class NodeInfoRepositoriesUrl {
export class NodeInfoDiscover
implements AdditionalProperties<string, UserDefinedValue>
{
seed_hosts?: string[]
seed_hosts?: string[] | string
type?: string
seed_providers?: string[]
}
Expand Down Expand Up @@ -209,6 +219,11 @@ export class NodeInfoSettingsTransport {
type: NodeInfoSettingsTransportType
'type.default'?: string // TODO this clashes with NodeInfoSettingsTransportType
features?: NodeInfoSettingsTransportFeatures
/**
* Only used in unit tests
* @availability stack visibility=private
* */
ignore_deserialization_errors?: Stringified<boolean>
}

/** @shortcut_property default */
Expand Down Expand Up @@ -333,17 +348,6 @@ export class NodeInfoMemory {
total_in_bytes: long
}

export class NodeInfoNetwork {
primary_interface: NodeInfoNetworkInterface
refresh_interval: integer
}

export class NodeInfoNetworkInterface {
address: string
mac_address: string
name: Name
}

export class NodeInfoOSCPU {
cache_size: string
cache_size_in_bytes: integer
Expand Down Expand Up @@ -371,7 +375,6 @@ export class NodeJvmInfo {
vm_name: Name
vm_vendor: string
vm_version: VersionString
/** @aliases bundled_jdk */
using_bundled_jdk: boolean
using_compressed_ordinary_object_pointers?: boolean | string
input_arguments: string[]
Expand Down