Repository navigation
B #411: Preserve NetworkManager connection profiles and support ETHx_ZONE - #412
Open
trukhinyuri wants to merge 1 commit into
Open
trukhinyuri wants to merge 1 commit into
trukhinyuri wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Existing profiles whose connection ID differs from the device name may be retained but ignored in favor of a new competing profile.
1 open finding
What changed in this PR
Preserves NetworkManager profiles during contextualization and adds declarative firewalld zone configuration.
Changes:
- Skips NetworkManager profile deletion and disabling for
NETCFG_TYPE=nm. - Adds
ETHx_ZONEsupport viaconnection.zone.
| File | Description |
|---|---|
netcfg-nm |
Applies the interface’s configured zone. |
functions |
Preserves NM profiles and reads ETHx_ZONE. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…port ETHx_ZONE Do not delete existing NetworkManager connection profiles or call nm_disable during the local stage in initialize_network when _cfgtype is nm, so netcfg-nm updates existing profiles in place across reboots and preserves properties such as connection.zone. In nm_connection_exist, match existing connections by connection.interface-name, rename a single non-matching connection ID to the target interface name, and delete duplicate profiles. Also support ETHx_ZONE in setup_iface_vars and apply connection.zone in netcfg-nm when specified. Signed-off-by: Iurii Trukhin <yuri@trukhin.com>
trukhinyuri
force-pushed
the
fix/nm-preserve-firewalld-zone
branch
from
October 14, 2026 16:46
3395712 to
4f09ac2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Fixes #411.
context-linux/src/etc/one-context.d/loc-10-network.d/functions, skip deleting/etc/sysconfig/network-scripts/ifcfg-${_dev}and/etc/NetworkManager/system-connections/*, and skip callingnm_disablewhen${_cfgtype}isnm. This allowsnetcfg-nm(nm_connection_exist) to update existing NetworkManager connection profiles in place across reboots instead of recreating them from scratch and resettingconnection.zone.context-linux/src/etc/one-context.d/loc-10-network.d/netcfg-nm, updatenm_connection_existto match existing profiles byconnection.interface-name, rename a single non-matchingconnection.id(e.g.System eth0) to${dev}so itsconnection.zoneis preserved, and remove any duplicate profiles for the same interface.zone=$(get_iface_var "$1" "ZONE")insetup_iface_varsand applynmcli con mod "${dev}" connection.zone "${zone}"innetcfg-nmwhenETHx_ZONEis provided in the VM context.Branches to which this PR applies