[
https://issues.apache.org/jira/browse/HDDS-17138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Siyao Meng updated HDDS-17138:
------------------------------
Release Note: New setting {{ozone.om.bind.host}} (per OM under HA:
{{ozone.om.bind.host.<serviceId>.<nodeId>}}) sets the host the OM RPC server
listens on. OM still advertises {{ozone.om.address}}. Unset, behavior is
unchanged. Set it to {{::}} to accept IPv6 clients on a dual-stack OM. Whether
IPv4 is also accepted depends on the OS. Binding to {{::}} needs a JVM with
IPv6 enabled: OM fails to start if {{preferIPv4Stack=true}} is set or IPv6 is
disabled on the host.
> Add a bind-host setting for the OM RPC server so a dual-stack OM can listen
> on ::
> ---------------------------------------------------------------------------------
>
> Key: HDDS-17138
> URL: https://issues.apache.org/jira/browse/HDDS-17138
> Project: Apache Ozone
> Issue Type: Task
> Reporter: Siyao Meng
> Priority: Major
> Attachments: HDDS-17138.001.patch
>
>
> OM binds its Hadoop RPC server to the host in {{ozone.om.address}} (or
> {{ozone.om.address.<serviceId>.<nodeId>}} under HA). That property is also
> the address OM advertises to clients and peers. Unlike SCM
> ({{ozone.scm.client.bind.host}}, {{ozone.scm.block.client.bind.host}},
> {{ozone.scm.datanode.bind.host}}, {{ozone.scm.security.service.bind.host}})
> and the OM HTTP servers ({{ozone.om.http-bind-host}},
> {{ozone.om.https-bind-host}}), there is no separate bind-host setting for the
> OM RPC listener.
> Code path on master: {{OzoneManager}} takes {{OmUtils.getOmAddress(conf)}}
> and passes {{addr.getHostString()}} to {{RPC.Builder.setBindAddress}}
> ({{OzoneManager.java}} around lines 1548 and 1615).
> h3. Impact
> * *Dual-stack:* when the OM host name has both A and AAAA records,
> {{InetAddress}} resolves it to the IPv4 address by default
> ({{java.net.preferIPv6Addresses=false}}). OM RPC then listens only on that
> IPv4 address, so IPv6 clients cannot reach it.
> * *HA has no workaround:* under HA, {{ozone.om.address.<serviceId>.<nodeId>}}
> is both the listener host and the address advertised to the other OMs, and
> HDDS-16308 rejects a wildcard there. A non-HA OM can still set
> {{ozone.om.address}} to {{::}}, because the unsuffixed key is not validated
> and already defaults to {{0.0.0.0}}.
> * IPv6-only clusters are not affected, because the name resolves only to an
> IPv6 address.
> * OM's other listeners are not affected. The OM gRPC server
> ({{NettyServerBuilder.forPort}}) and the OM Ratis server (port only) already
> listen on all interfaces.
> This gap was not covered by HDDS-15778, which required bind-host support for
> the OM listeners.
> h3. Proposal
> Add {{ozone.om.bind.host}} (and the {{.<serviceId>.<nodeId>}} suffixed form
> for HA). When it is unset, OM binds to the host of {{ozone.om.address}} as
> before. Build the listener from the bind host and the RPC port, following the
> SCM pattern in {{HddsServerUtil}} / {{ScmUtils}}. Keep advertising
> {{ozone.om.address}}. Then {{::}} can be used as the bind host on a
> dual-stack OM.
> h3. Testing
> * Unit test the bind address chosen for an unset, IPv4, IPv6 and {{::}} bind
> host, in non-HA and HA configurations.
> * Test that the advertised address stays unchanged.
> * Add a dual-stack acceptance check (HDDS-15779) that reaches OM RPC over
> both IPv4 and IPv6.
> Parent epic: HDDS-15763.
> h3. Patch
> HDDS-17138.001.patch:
> * Adds {{OMConfigKeys.OZONE_OM_BIND_HOST_KEY}} and an {{ozone-default.xml}}
> entry with no default value.
> * Adds {{OmUtils.getOmRpcBindAddress(conf, omRpcAddress)}}: the bind host
> replaces the host of the RPC address, and the port is kept.
> * {{OzoneManager.getRpcServer}} starts the RPC server on that address.
> {{updateRPCListenAddress}}, the delegation token service and Kerberos login
> still use the advertised address.
> * Adds the key to {{OMHANodeDetails.genericConfigKeys}}, so
> {{ozone.om.bind.host.<serviceId>.<nodeId>}} is copied to the local node's
> config.
> * Tests: {{TestOmUtils#testGetOmRpcBindAddress}} (unset, {{::}}, {{[::]}},
> {{0.0.0.0}}) and a new {{TestOMHANodeDetails}} (the per-node bind host is
> honored and the advertised address is unchanged). The HA test fails without
> the {{OMHANodeDetails}} change.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]