fix: use connection UUID in bridge slave setup in NetworkManager#7562
Merged
Obihoernchen merged 1 commit intoMay 7, 2026
Merged
Conversation
… profile names NetworkManager can auto-generate connection names with spaces (e.g. "Wired connection 2"). The bridge slave setup in create_bridge_interface_nmcli stored this name in a variable that was later expanded unquoted in nmcli commands, breaking both the initial con mod and all downstream operations (con up, con delete on rollback). Resolve the connection to its UUID before use, which is space-safe and valid for all nmcli operations. Closes: xcat2#7483
Obihoernchen
approved these changes
May 7, 2026
viniciusferrao
added a commit
to VersatusHPC/xcat-core
that referenced
this pull request
May 7, 2026
NetworkManager auto-generates connection names that can contain spaces (e.g. "Wired connection 2"). Multiple devices can also share the same auto-generated name. Both cases cause failures when names are passed to nmcli in bridge and bond setup paths. Resolve active connection UUID via nmcli device show (GENERAL.CON-UUID) instead of by name, which avoids both word-splitting on spaces and ambiguity when multiple connections share the same name. Changes: - Bridge slave setup: resolve UUID via device show instead of by name - Bond slave setup: same UUID-via-device approach for con down/mod - Bridge rollback: preserve original xcat-prefixed connection name so rollback paths restore the correct name instead of a UUID - Utility functions: quote connection name arguments in is_nmcli_connection_exist, is_connection_activate_intime, and wait_nic_connect_intime for defensive correctness - Add -F flag to grep in is_nmcli_connection_exist for literal matching - Log both human-readable name and UUID when reusing existing connections Tested on EL10 host with duplicate "Ethernet connection 1/2" profiles across multiple NICs — UUID resolution via device returns exactly one UUID per device regardless of name collisions. Follows up on xcat2#7562 and xcat2#7483.
viniciusferrao
added a commit
to VersatusHPC/xcat-core
that referenced
this pull request
May 7, 2026
NetworkManager auto-generates connection names that can contain spaces (e.g. "Wired connection 2"). Multiple devices can also share the same auto-generated name. Both cases cause failures when names are passed to nmcli in bridge and bond setup paths. Resolve active connection UUID via nmcli device show (GENERAL.CON-UUID) instead of by name, which avoids both word-splitting on spaces and ambiguity when multiple connections share the same name. Changes: - Bridge slave setup: resolve UUID via device show instead of by name - Bond slave setup: same UUID-via-device approach for con down/mod - Bridge rollback: preserve original xcat-prefixed connection name so rollback paths restore the correct name instead of a UUID - Utility functions: quote connection name arguments in is_nmcli_connection_exist, is_connection_activate_intime, and wait_nic_connect_intime for defensive correctness - Add -F flag to grep in is_nmcli_connection_exist for literal matching - Log both human-readable name and UUID when reusing existing connections Tested on EL10 host with duplicate "Ethernet connection 1/2" profiles across multiple NICs — UUID resolution via device returns exactly one UUID per device regardless of name collisions. Follows up on xcat2#7562 and xcat2#7483. Co-authored-by: OliverTUBAF <86062666+OliverTUBAF@users.noreply.github.com>
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.
This PR fixes the behaviour that NetworkManager can auto-generate connection names with spaces (e.g. "Wired connection 2"). The bridge slave setup in
create_bridge_interface_nmclistored this name in a variable that was later expanded unquoted innmclicommands, breaking both the initialcon modand all downstream operations. The right way here is to use UUIDs, because they are unique and easier to work with.This is probably a broader issue, however we will fix scoped this time.
Closes: #7483