Opensearch-dashboards 2.11 impacted by Nodejs 17 breaking change

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
2.11.0

Describe the issue:
Opensearch-dashboards 2.11 not accessible on dual-stack Ipv6 environment, unlike older versions.

Background:
I use opensearch and opensearch-dashboards in kubernetes environment, deployed as helm charts.
My k8s lab support dual network stack i.e. IPv4 and Ipv6 addresses. The pod gets assigned both Ipv4 and Ipv6 addresses.

Using k8s configurations of .spec.ipFamily and .spec.ipFamilyPolicy for the service - one could use SingleStack Ipv4, SingleStack Ipv6 and Dual-stack Ipv6 to configure the way the service must be accessed.

Issue:
From OSD 2.11.0, when SingleStack Ipv4 is used for the service created for Opensearch-dashboards, the dashboards service is not reachable.
The REST API endpoint /api/status is not reachable on any of these addresses from inside the pod → 0.0.0.0, 127.0.0.1, Pod’s Ipv4 address, Pod’s Ipv6 address, [::]
It is reachable only at pod-hostname.

Configuration:
server.host is set to pod hostname.

Observation:
The process is picking the ipv6 address as the remoteAddress for the server instead of Ipv4.
This was not the case for older 2.9.0 releases, when used on the same lab.

Analysis:
Due to this breaking change in node.js 17,
NodeJS changed to respect the host system’s DNS resolver order by default instead of preferring IPv4 over IPv6.

I was able to resolve this issue, by setting this env → NODE_OPTIONS=–dns-result-order=ipv4first
This helps to revert to previous behaviour, of choosing Ipv4 over Ipv6.

Ask:

  1. As this breaking change impacts users of Opensearch-dashboards, it would be better if this is highlighted in breaking changes/release notes of 2.11.0.
  2. Is this workaround/solution of using --dns-result-order=ipv4first acceptable? Is there a different recommendation from the community?