Fix SUSE guest networking - #13827
Open
ryan-ronnander wants to merge 1 commit into
Open
Conversation
Recent SUSE guests (SLE/openSUSE Leap 16, MicroOS) use NetworkManager and no longer include wicked or its ifcfg configuration files. Detect the correct location of the network configuration files, and configure the guest based on the detected location. Fixes hashicorp#12777
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.
Recent SUSE guests use NetworkManager and no longer include wicked or its ifcfg configuration files. openSUSE MicroOS has been affected since 2022 (#12777, static IPs silently fall back to DHCP). SLE and openSUSE Leap 16 removed wicked entirely, so every Leap 16 guest also fails after
vagrant up:This fix follows the approach used for RHEL 10 guests in #13625: the
network_scripts_dircapability detects the network configuration location, andconfigure_networksdispatches to the sharedVagrant::Util::GuestNetworks::LinuxNetworkManager implementation when the wicked configuration directory is absent. The wicked path is unchanged for guests and older boxes that still use it (SLE/Leap 15.x).Verified with vagrant-libvirt, using a
private_networkwith a static IP:cloud-image/opensuse-leap-16.0: With this changevagrant upcompletes, static and DHCP-typed networks come up as NetworkManager profiles, and addresses persist across reloads.opensuse/MicroOS.x86_64(the box from Setting a static IP on opensuse/MicroOS fails, uses DHCP instead #12777): the static address is applied (ipv4.method: manual) instead of silently staying on DHCP.cloud-image/opensuse-leap-15.6(wicked): behavior unchanged, ifcfg path still used.Fixes #12777
Note: current
opensuse/MicroOS.x86_64boxes ship with the interactive JeOS firstboot wizard enabled, which blocks first boot until it is answered on the VM console. That is a box packaging issue, outside the scope of this PR.