[
https://issues.apache.org/jira/browse/RATIS-2754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Siyao Meng updated RATIS-2754:
------------------------------
Description:
Follow up of RATIS-2082. As discussed in
[https://github.com/apache/ratis/pull/1630], setConfiguration only records an
address only change without rebinding or reconnecting, so a startup option is
preferred.
h3. Problem
Peer addresses are persisted in raft-meta.conf and in the configuration entries
of the Raft log. When peer addresses change (e.g. migrating IPv4 literal
addresses to IPv6, or correcting a wrong address), the stale addresses are
recovered on restart even if the server is started with the correct peers. The
only fix today is the offline ratis-shell {{local raftMetaConf}} command, which
drops listeners and priorities and requires replacing raft-meta.conf by hand on
every server.
Use case: Apache Ozone SCM HA migrating IPv4 literal Ratis peer addresses to
IPv6 (HDDS-16136, under the Ozone IPv6 umbrella HDDS-15763). OM HA connections
already follow its configured peers, but its stored peer addresses stay stale
without this option.
h3. Proposal
Add a server config {{raft.server.startup.refresh-peer-addresses.enabled}}
(default false). When it is enabled and a group is started with a non-empty
list of peers:
* The addresses (address, admin, client and data stream) of the startup peers
replace the addresses of the peers with the same ids in every configuration set
on the server: the persisted conf, the confs replayed from the log, the confs
received from the leader and the confs appended by itself as the leader.
Membership, roles, priorities and log indices are unchanged.
* The replayed log entries must be covered, otherwise a conf entry beyond
raft-meta.conf restores the old addresses.
* raft-meta.conf is not rewritten at startup. The new addresses are persisted
when a leader started with this option appends its startup conf entry, so a
rolling restart of all the servers converges.
* A startup peer not in the configuration is ignored with a warning. Membership
changes still go through setConfiguration.
* setConfiguration is unaffected for membership, roles and priorities. For a
startup peer, a server keeps the startup addresses even if a later
configuration (e.g. from setConfiguration) carries different addresses, with a
warning.
Changing peer addresses then becomes: update the startup peers, enable the
option and do a rolling restart.
was:
Follow up of RATIS-2082. As discussed in
[https://github.com/apache/ratis/pull/1630], setConfiguration only records an
address only change without rebinding or reconnecting, so a startup option is
preferred.
h3. Problem
Peer addresses are persisted in raft-meta.conf and in the configuration entries
of the Raft log. When peer addresses change (e.g. migrating IPv4 literal
addresses to IPv6, or correcting a wrong address), the stale addresses are
recovered on restart even if the server is started with the correct peers. The
only fix today is the offline ratis-shell {{local raftMetaConf}} command, which
drops listeners and priorities and requires replacing raft-meta.conf by hand on
every server.
Use case: Apache Ozone OM and SCM HA migrating peer addresses from IPv4 to IPv6.
h3. Proposal
Add a server config {{raft.server.startup.refresh-peer-addresses.enabled}}
(default false). When it is enabled and a group is started with a non-empty
list of peers:
* The addresses (address, admin, client and data stream) of the startup peers
replace the addresses of the peers with the same ids in every configuration set
on the server: the persisted conf, the confs replayed from the log, the confs
received from the leader and the confs appended by itself as the leader.
Membership, roles, priorities and log indices are unchanged.
* The replayed log entries must be covered, otherwise a conf entry beyond
raft-meta.conf restores the old addresses.
* raft-meta.conf is not rewritten at startup. The new addresses are persisted
when a leader started with this option appends its startup conf entry, so a
rolling restart of all the servers converges.
* A startup peer not in the configuration is ignored with a warning. Membership
changes still go through setConfiguration.
* setConfiguration is unaffected for membership, roles and priorities. For a
startup peer, a server keeps the startup addresses even if a later
configuration (e.g. from setConfiguration) carries different addresses, with a
warning.
Changing peer addresses then becomes: update the startup peers, enable the
option and do a rolling restart.
> Add a startup option to refresh peer addresses in the Raft configuration
> ------------------------------------------------------------------------
>
> Key: RATIS-2754
> URL: https://issues.apache.org/jira/browse/RATIS-2754
> Project: Ratis
> Issue Type: Improvement
> Reporter: Siyao Meng
> Priority: Major
>
> Follow up of RATIS-2082. As discussed in
> [https://github.com/apache/ratis/pull/1630], setConfiguration only records an
> address only change without rebinding or reconnecting, so a startup option is
> preferred.
> h3. Problem
> Peer addresses are persisted in raft-meta.conf and in the configuration
> entries of the Raft log. When peer addresses change (e.g. migrating IPv4
> literal addresses to IPv6, or correcting a wrong address), the stale
> addresses are recovered on restart even if the server is started with the
> correct peers. The only fix today is the offline ratis-shell {{local
> raftMetaConf}} command, which drops listeners and priorities and requires
> replacing raft-meta.conf by hand on every server.
> Use case: Apache Ozone SCM HA migrating IPv4 literal Ratis peer addresses to
> IPv6 (HDDS-16136, under the Ozone IPv6 umbrella HDDS-15763). OM HA
> connections already follow its configured peers, but its stored peer
> addresses stay stale without this option.
> h3. Proposal
> Add a server config {{raft.server.startup.refresh-peer-addresses.enabled}}
> (default false). When it is enabled and a group is started with a non-empty
> list of peers:
> * The addresses (address, admin, client and data stream) of the startup peers
> replace the addresses of the peers with the same ids in every configuration
> set on the server: the persisted conf, the confs replayed from the log, the
> confs received from the leader and the confs appended by itself as the
> leader. Membership, roles, priorities and log indices are unchanged.
> * The replayed log entries must be covered, otherwise a conf entry beyond
> raft-meta.conf restores the old addresses.
> * raft-meta.conf is not rewritten at startup. The new addresses are persisted
> when a leader started with this option appends its startup conf entry, so a
> rolling restart of all the servers converges.
> * A startup peer not in the configuration is ignored with a warning.
> Membership changes still go through setConfiguration.
> * setConfiguration is unaffected for membership, roles and priorities. For a
> startup peer, a server keeps the startup addresses even if a later
> configuration (e.g. from setConfiguration) carries different addresses, with
> a warning.
> Changing peer addresses then becomes: update the startup peers, enable the
> option and do a rolling restart.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)