Bug 1399269

Summary: Installing in a Xen HVM domU with paravirtual NIC (vif) and static IPv4 results in DHCP being used after the initial reboot
Product: [Fedora] Fedora Reporter: Robby <robbyke>
Component: NetworkManagerAssignee: Lubomir Rintel <lkundrak>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 25CC: dcbw, fgiudici, lkundrak
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-12 10:12:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Robby 2016-11-28 16:39:27 UTC
Description of problem:
Installing Fedora 25 in a Xen HVM domU with a paravirtualized NIC (vif) and configuring a static IPv4 IP, route and DNS server results in these settings being ignored and DHCP used instead upon the initial reboot.

Version-Release number of selected component (if applicable):
1.4.2-1

How reproducible:
Always

Steps to reproduce:
1. Install using Fedora-Server-netinst-x86_64-25-1.3.iso (I selected "Minimal Install")
2. Configure static IPv4
3. Begin installation
4. Reboot after the installation has finished
5. The system is using DHCP instead of the manually entered IPv4 settings during setup

Actual results:
eth0 is using DHCP instead of the manually configured IPv4 settings during setup.

Expected results:
eth0 should be using the manually configured IPv4 settings during setup.

Additional info:
The file /etc/sysconfig/network-scripts/ifcfg-eth0 exists and does in fact contain the correct IPv4 information entered during the setup.

# nmcli connection
NAME                UUID                                  TYPE            DEVICE
Wired connection 1  7bac94c9-9022-384f-897b-a0314eee14b0  802-3-ethernet  eth0   (GREEN COLORED LINE)
eth0                b8e69077-a2b4-3de4-9fd7-097eda50b7e3  802-3-ethernet  --     (WHITE COLORED LINE)

# nmcli device
DEVICE  TYPE      STATE      CONNECTION
eth0    ethernet  connected  Wired connection 1 (GREEN COLORED LINE)
lo      loopback  unmanaged  --                 (BLUEISH COLORED LINE)

Workaround:
After some trial and error of reinstalling the VM a couple of times I came up with the following workaround:
1. Verify the IP address using: ip addr show eth0
Then execute these commands:
2. nmcli connection delete "Wired connection 1"
3. nmcli connection delete "Wired connection 1"
Yes, this must be executed twice. If you do it once, it will still be set to the address received via DHCP.
4. Verify the IP again using: ip addr show eth0
It should now be using the manually configured IPv4 address that was entered during setup.

After executing the above workaround, the nmcli output has changed a little bit as follows:
# nmcli connection
NAME                UUID                                  TYPE            DEVICE
eth0                b8e69077-a2b4-3de4-9fd7-097eda50b7e3  802-3-ethernet  eth0   (GREEN COLORED LINE)
Wired connection 1  7bac94c9-9022-384f-897b-a0314eee14b0  802-3-ethernet  --     (WHITE COLORED LINE)

# nmcli device
DEVICE  TYPE      STATE      CONNECTION
eth0    ethernet  connected  eth0       (GREEN COLORED LINE)
lo      loopback  unmanaged  --         (BLUEISH COLORED LINE)

Comment 1 Robby 2016-11-28 16:51:11 UTC
Note: In the description section I meant to type gateway instead of route.

Comment 2 Robby 2016-11-30 15:07:54 UTC
A much better workaround I just found was to create an additional config file called /etc/NetworkManager/conf.d/no-auto-default.conf with this as the content of the file:
[main]
no-auto-default=*

This prevents the "Wired connection 1" from always being recreated and is much more in line to what I saw in Fedora 20, where this bug did not exist, and no "Wired connection 1" was ever created.

Another note: If I emulate a NIC instead (I tested the Intel e1000), then this bug does not occur.

Comment 3 Fedora End Of Life 2017-11-16 19:17:06 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 4 Fedora End Of Life 2017-12-12 10:12:19 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.