Bug 1690336

Summary: [RFE] Support setting network default onboot in rhv installclass
Product: Red Hat Enterprise Linux 7 Reporter: Qin Yuan <qiyuan>
Component: anacondaAssignee: Radek Vykydal <rvykydal>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.6CC: cshao, emarcus, huzhao, jkonecny, nlevy, qiyuan, rvykydal, salmy, sbonazzo, smoroney, weiwang, yaniwang, yturgema
Target Milestone: betaKeywords: FutureFeature, OtherQA
Target Release: 7.7   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: anaconda-21.48.22.151-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-06 12:54:56 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1655534    

Description Qin Yuan 2019-03-19 10:17:33 UTC
Description of problem:
The behaviours of rhel and rhvh against network configuration during installation are not exactly the same:

For rhel 7, if user enabled only one NIC during installation on Anaconda GUI, but forgot to mark the "Automatically connect to this network.." check box, then Anaconda will set "ONBOOT=yes" for that NIC. After installation finished, the NIC is still up. While for RHVH, the NIC is down after boot, as "ONBOOT=yes" was not set.

The setting default onboot logic of rhel7 is implemented in setNetworkOnbootDefault of rhel installclass, https://github.com/rhinstaller/anaconda/blob/rhel7-branch/pyanaconda/installclasses/rhel.py, that when no nic is set with "ONBOOT=yes", then Anaconda will try to set "ONBOOT=yes" for the default route's NIC.

There is no such method in rhv installclass, https://github.com/rhinstaller/anaconda/blob/rhel7-branch/pyanaconda/installclasses/rhv.py, better to align with rhel which is more user friendly.


Version-Release number of selected component (if applicable):
RHVH-4.3-20190313.3-RHVH-x86_64-dvd1.iso
RHEL-7.6-20181010.0-Server-x86_64-dvd1.iso

How reproducible:
100%

Steps to Reproduce:
1. Install rhel and check the NIC:
1) Install RHEL-7.6-20181010.0-Server-x86_64-dvd1.iso, enable only one NIC, like em1, on Anaconda GUI, but don't mark the "Automatically connect to this network.." check box.
2) After installation finished, boot into the system, check em1 status, check "ONBOOT" option in /etc/sysconfig/network-scripts/ifcfg-em1

2. Install RHVH and check the NIC:
1) Install RHVH-4.3-20190313.3-RHVH-x86_64-dvd1.iso, enable only one NIC, like em1, on Anaconda GUI, but don't mark the "Automatically connect to this network.." check box.
2) After installation finished, boot into the system, check em1 status, check "ONBOOT" option in /etc/sysconfig/network-scripts/ifcfg-em1

Actual results:
1. For rhel, em1 is up after boot, and "ONBOOT=yes"
2. For RHVH, em1 is down after boot, and "ONBOOT=no"

Expected results:
1. For RHVH, "ONBOOT=yes" could be set for the default NIC automatically when none is set.

Additional info:

Comment 3 Jiri Konecny 2019-04-02 10:03:59 UTC
There is the upstream PR for this: https://github.com/rhinstaller/anaconda/pull/1924 .

Comment 6 Eli Marcus 2019-04-16 12:38:24 UTC
Comments from Steve Goodman:

1. Does this only apply to RHVH? Or also the RHEL hosts?
2. Does this apply only to an interactive GUI-based install? What about when installing using PXE, or when setting up automated installation?
3. If I understand correctly, the request here is to add a note to the RHV installation guide in the section on installing hosts, with a link to https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/sect-network-hostname-configuration-x86#sect-edit-network-connections-x86

The note should say:

When you install the operating system on your host, mark the *Automatically connect to this network when it is available* check box if you want to use the connection every time the system boots. For more information, see https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/sect-network-hostname-configuration-x86#sect-edit-network-connections-x86



Please confirm or correct each point above.

Comment 7 Qin Yuan 2019-04-22 12:19:23 UTC
(In reply to Eli Marcus from comment #6)
> Comments from Steve Goodman:
> 
> 1. Does this only apply to RHVH? Or also the RHEL hosts?
> 2. Does this apply only to an interactive GUI-based install? What about when
> installing using PXE, or when setting up automated installation?
> 3. If I understand correctly, the request here is to add a note to the RHV
> installation guide in the section on installing hosts, with a link to
> https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/
> html/installation_guide/sect-network-hostname-configuration-x86#sect-edit-
> network-connections-x86
> 
> The note should say:
> 
> When you install the operating system on your host, mark the *Automatically
> connect to this network when it is available* check box if you want to use
> the connection every time the system boots. For more information, see
> https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/
> html/installation_guide/sect-network-hostname-configuration-x86#sect-edit-
> network-connections-x86
> 
> 
> 
> Please confirm or correct each point above.


I saw the same comments from Steve in https://bugzilla.redhat.com/show_bug.cgi?id=1688009#c11, if I understood correctly, those questions are specific to adding notes to RHVH installation doc to tell users to set onboot=yes during installation if they want to use the connection every time the system boots.

This bug is different from bug 1688009, it's a nice to have feature that when user forgot to set onboot=yes during installation, the program will try to set the default one. These two bugs don't conflict with each other. 

This bug only applies to RHVH, as RHEL already has such feature.
This bug is not related to the installation mode, it should work with both GUI and TUI.
I don't think this bug needs a doc.

Comment 11 Radek Vykydal 2019-05-15 09:23:53 UTC
Keeping the 'requires_doc_text' flag set to -.

Comment 12 Qin Yuan 2019-06-21 04:30:28 UTC
Test with RHVH-4.3-20190620.7-RHVH-x86_64-dvd1.iso, anaconda 21.48.22.156-1, the default onboot nic could be set correctly, so move to VERIFIED status.

Comment 14 errata-xmlrpc 2019-08-06 12:54:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2132