Modify network configuration on an existing machine¶
TechPreview
Caution
Modification of L2 templates in use is only allowed with a
mandatory validation step from the infrastructure operator to prevent
accidental cluster failures due to unsafe changes. The list of risks posed
by modifying L2 templates includes:
Services running on hosts cannot reconfigure automatically to switch to
the new IP addresses and/or interfaces.
Connections between services are interrupted unexpectedly, which can cause
data loss.
Incorrect configurations on hosts can lead to irrevocable loss of
connectivity between services and unexpected cluster partition or
disassembly.
Warning
Netplan does not handle arbitrary configuration changes. For
details, see Netplan documentation.
To modify network configuration of an existing machine, you need to
create a new L2 template and change the assignment of the template for that
particular machine.
Warning
When a new network configuration is being applied on nodes,
sequential draining of corresponding nodes and re-running of LCM on them
occurs the same way as it is done during cluster update.
The following fields of the ipamHost status are renamed since
MOSK 23.1 in the scope of the L2Template and IpamHost objects
refactoring:
netconfigV2 to netconfigCandidate
netconfigV2state to netconfigCandidateState
netconfigFilesState to netconfigFilesStates (per file)
No user actions are required after renaming.
The format of netconfigFilesState changed after renaming. The
netconfigFilesStates field contains a dictionary of statuses of network
configuration files stored in netconfigFiles. The dictionary contains
the keys that are file paths and values that have the same meaning for each
file that netconfigFilesState had:
For a successfully rendered configuration file:
OK:<timestamp><sha256-hash-of-rendered-file>, where a timestamp
is in the RFC 3339 format.
For a failed rendering: ERR:<error-message>.
If the configuration is valid:
The netconfigCandidate field contains the Netplan configuration
file candidate rendered using the modified objects
The netconfigCandidateState and netconfigFilesStates fields
have the OK status
The netconfigFilesStates field contains the old date and checksum
meaning that the effective Netplan configuration is still based on the
previous versions of the modified objects
The messages field may contain some warnings but no errors
If the L2 template rendering fails, the candidate for Netplan
configuration is empty and its netconfigCandidateState status contains
an error message. A broken candidate for Netplan configuration cannot be
approved and become the effective Netplan configuration.
Warning
Do not proceed to the next step until you make sure that the
netconfigCandidate field contains the valid configuration and this
configuration meets your expectations.
Approve the new network configuration for the related IpamHost objects:
Once applied, the new configuration is copied to the netconfigFiles
field of the effective Netplan configuration, then copied to the
corresponding LCMMachine objects.
Verify the statuses of the updated IpamHost objects:
The following fields of the ipamHost status are renamed since
MOSK 23.1 in the scope of the L2Template and IpamHost objects
refactoring:
netconfigV2 to netconfigCandidate
netconfigV2state to netconfigCandidateState
netconfigFilesState to netconfigFilesStates (per file)
No user actions are required after renaming.
The format of netconfigFilesState changed after renaming. The
netconfigFilesStates field contains a dictionary of statuses of network
configuration files stored in netconfigFiles. The dictionary contains
the keys that are file paths and values that have the same meaning for each
file that netconfigFilesState had:
For a successfully rendered configuration file:
OK:<timestamp><sha256-hash-of-rendered-file>, where a timestamp
is in the RFC 3339 format.
For a failed rendering: ERR:<error-message>.
The new configuration is copied to the effective Netplan configuration and
both configurations are valid when:
The netconfigCandidateState and netconfigFilesStates fields have
the OK status and the same checksum
In the output of the above command, hash sums contained in the
bm_ipam_netconfig_files values must match those in the
IpamHost.status.netconfigFilesStates output. If so, the new
configuration is copied to LCMMachine objects.
Monitor the update operations that start on nodes. For details, see
Verify machine status.