Bug 1150044 - Offline installation causes wired interface to be disabled on boot in the installed system
Summary: Offline installation causes wired interface to be disabled on boot in the ins...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Radek Vykydal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-07 10:34 UTC by Kamil Páral
Modified: 2015-11-05 12:43 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-11-05 12:43:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
anaconda.log (18.14 KB, text/plain)
2014-10-07 10:35 UTC, Kamil Páral
no flags Details
ifcfg.log (2.76 KB, text/plain)
2014-10-07 10:35 UTC, Kamil Páral
no flags Details
journal.log (1.07 MB, text/plain)
2014-10-07 10:35 UTC, Kamil Páral
no flags Details
packaging.log (208 bytes, text/plain)
2014-10-07 10:35 UTC, Kamil Páral
no flags Details
program.log (40.86 KB, text/plain)
2014-10-07 10:35 UTC, Kamil Páral
no flags Details
storage.log (245.37 KB, text/plain)
2014-10-07 10:35 UTC, Kamil Páral
no flags Details
NM ifcfg config file created in the installed system (289 bytes, text/plain)
2014-10-07 10:36 UTC, Kamil Páral
no flags Details

Description Kamil Páral 2014-10-07 10:34:46 UTC
Description of problem:
We have fought with this bug on several occasions and it seems to regress regularly :-)

If I perform an offline installation (tested with Live image), with ethernet cable unplugged, the installed system has ONBOOT=no in the wired ethernet NM configuration file. That causes the installed system to never automatically connect to the wired network even when the cable is plugged in.

This is a big problem. I often attend events where I help students to install Fedora. Usually that's done offline. That triggers this bug. And wired internet doesn't work for these students when they come home. Since they are not familiar with Fedora, there's almost no chance that they will find "Connect automatically" checkbox to fix this. Depending on their DE, they might not even know they just need to enable the device. In their eyes, wired network simply does not work.

Together with Vratislav Podzimek we have identified the problem to be related to this code:
https://git.fedorahosted.org/cgit/anaconda.git/tree/pyanaconda/installclasses/fedora.py#n44
The device is set to autoconnect only if it has link up during installation.

And also this:
https://git.fedorahosted.org/cgit/anaconda.git/tree/pyanaconda/network.py#n250
There are two problems here:
a) The NM configuration files are created even if they are not needed. Creating the config file even when the user has not requested any changes is error-prone, because it might cause some problems in the future. Let's say some IPv6 setting default changes in the future. If there was no config file on the disk, the new default would simply apply. If there is already a config file, the user has to detect this (common users won't) and modify it manually. There is a reason why systemd is moving towards "works out of the box even without any config files" approach.
b) The code says
> For server, default auto connections will be turned off in NetworkManager.conf.
But still, the code disables autoconnect explicitly for every single interface present on the system. Why does Anaconda choose not to honor NM defaults (i.e. autoconnect on)? If server has some specific needs (like disabling autoconnect globally), that can be done in NetworkManager.conf and you don't need to do it for all devices on all products (e.g. Workstation).

So, please, make autoconnect work again, even for offline installation. I'm talking mainly about Fedora Workstation, I don't mind if Server has some specific needs and behaves differently.

My recommendation would be:
1. Do not create default NM config files for every device. If the user manually configured devices using NetworkManager prior to installation or from Anaconda itself, the config file will be automatically created by NM. Otherwise, don't touch it.
2. Do not disable autoconnect for every device. If you need a different behavior for Server, do it in NetworkManager.conf.
3. Now you can get rid of the code in FedoraBaseInstallClass.setNetworkOnbootDefault().

If that doesn't work for you for some reason, at least modify FedoraBaseInstallClass.setNetworkOnbootDefault() to automatically enable *all interfaces* on boot by default for Fedora Workstation.

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

How reproducible:
always

Steps to Reproduce:
1. unplug cable from desktop or laptop (this can't be done in a VM)
2. install Fedora Live
3. reboot into the system
4. plug the cable in
5. see that your internet doesn't work
6. Enter NetworkManager and find "Connect automatically" checkbox, it's disabled

Actual results:
wired interface is disabled by default

Expected results:
wired interface is enabled by default

Additional information:
Below I attach anaconda log files from a system installed offline.

Comment 1 Kamil Páral 2014-10-07 10:35:35 UTC
Created attachment 944525 [details]
anaconda.log

Comment 2 Kamil Páral 2014-10-07 10:35:37 UTC
Created attachment 944526 [details]
ifcfg.log

Comment 3 Kamil Páral 2014-10-07 10:35:44 UTC
Created attachment 944527 [details]
journal.log

Comment 4 Kamil Páral 2014-10-07 10:35:46 UTC
Created attachment 944528 [details]
packaging.log

Comment 5 Kamil Páral 2014-10-07 10:35:49 UTC
Created attachment 944529 [details]
program.log

Comment 6 Kamil Páral 2014-10-07 10:35:52 UTC
Created attachment 944530 [details]
storage.log

Comment 7 Kamil Páral 2014-10-07 10:36:17 UTC
Created attachment 944532 [details]
NM ifcfg config file created in the installed system

Comment 8 Fedora End Of Life 2015-11-04 15:04:29 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. 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 '21'.

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 21 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 9 Kamil Páral 2015-11-05 12:43:18 UTC
This is fixed in F23.


Note You need to log in before you can comment on or make changes to this bug.