Bug 796193

Summary: NIC not configured by default in SSA
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Brian Foster <bfoster>
Component: glusterfsAssignee: Bala.FA <barumuga>
Status: CLOSED CURRENTRELEASE QA Contact: Sudhir D <sdharane>
Severity: high Docs Contact:
Priority: high    
Version: 1.0CC: barumuga, bengland, dpati, flanagan, gluster-bugs, rwheeler, sdharane, twilkins, vbellur
Target Milestone: Release Candidate   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-10 07:42:19 UTC Type: ---
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: 817967    
Attachments:
Description Flags
screen shots of anaconda install failing because it expected eth0 not em1
none
ks.cfg from SSA 3.2 initrd.img with eth0 hardcoded none

Description Brian Foster 2012-02-22 13:11:35 UTC
Description of problem: 

When installed on a Dell PowerEdge server, the NIC was not configured (DHCP) by default. The /etc/sysconfig/network-scripts/ifcfg-em1 had to be modified slightly to work. Unfortunately I don't recall the default content of said file, but the following settings within the file were configured to make it work:

NM_CONTROLLED="no"
BOOTPROTO="dhcp"
ONBOOT="yes"

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


How reproducible: 100%


Steps to Reproduce:
1. Install the SSA ISO
2. Run ifconfig.
3.
  
Actual results: NIC not active, no IP address.


Expected results: The server obtains an IP by default in a DHCP environment.


Additional info:

Comment 1 Ben England 2012-02-23 15:03:08 UTC
To add to Brian's bug, NTP does not come up either.  Consequently the servers all have the wrong time.  Whereas typical RHEL 6.2 clients all come up with NTP working, and DHCP edits /etc/ntp.conf to fill in the correct timeserver to use.   Storage servers need to have correct time for a variety of reasons (timestamps in metadata kerberos, others I haven't thought of yet)

Comment 2 Ben England 2012-02-24 20:22:03 UTC
Created attachment 565668 [details]
screen shots of anaconda install failing because it expected eth0 not em1

I just tried installing RHSSA .iso via PXEboot on Dell PowerEdge 610, it failed.  It asked which network interface I wanted to use during install, but then it came back and said eth0 didn't exist, but the interface was named em1.  Why oh why did they change the interface names for Dell?  But shouldn't anaconda and/or kickstart be able to handle whatever network interface name is used as long as it's an ethernet-type interface?

The workaround is to use a CD/DVD or USB stick.  But it's really impractical to do this on a large scale or in an environment where physical access is not practical.

Comment 3 Anthony Towns 2012-03-01 06:36:45 UTC
Created attachment 566759 [details]
ks.cfg from SSA 3.2 initrd.img with eth0 hardcoded

Aha, looks like the ks.cfg included in the initrd in the SSA iso is the problem -- it's got eth0 hardcoded:

%post --nochroot
sed -i -e '/ONBOOT/c ONBOOT=yes\nBOOTPROTO=dhcp' /mnt/sysimage/etc/sysconfig/network-scripts/ifcfg-eth0
%end

I'm not sure what that should be. It might just be that "firstboot --disable" is preventing ifcfg-em0 from getting enabled or similar?

(I haven't included a ks.cfg in the RHS 2.0 isos because at the time I couldn't find a copy of the SSA one easily)

Comment 4 Ben England 2012-03-02 14:49:01 UTC
https://access.redhat.com/knowledge/articles/53579 has an article about network interface naming, might want to check that out.

Comment 5 Bala.FA 2012-03-03 03:36:35 UTC
Got very useful information. The bug will be fixed in upcoming releases.
Thanks for everybody's help.

Comment 6 Bala.FA 2012-03-07 11:14:13 UTC
My observation in RHEL 6.2 is that 'Basic Server' or 'Minimal' type installation doesn't start/configure NIC by default.  For me, its sort of a bug in RHEL.

As Anthony mentioned, NIC configuration is given to firstboot at first time.  This requires X.  Neither 'Basic Server'/'Minimal' type nor RH SSA provide/install X by default.

I am figuring other alternative approaches for RH SSA for NIC configuration by default.

Comment 7 Bala.FA 2012-03-07 11:47:07 UTC
Below kickstart configuration will fix

%post --nochroot
for f in /mnt/sysimage/etc/sysconfig/network-scripts/ifcfg-*; do
    if echo $f | grep -q 'ifcfg-lo$'; then
        continue
    fi
    if ! grep -q '^BOOTPROTO' $f; then
        echo 'BOOTPROTO="dhcp"' >> $f
    fi
    if grep -q '^ONBOOT' $f; then
        sed -i -e '/^ONBOOT/c ONBOOT="yes"' $f
    else
        echo 'ONBOOT="yes"' >> $f
    fi
done

Comment 8 Bala.FA 2012-03-07 12:06:00 UTC
I filed a bug https://bugzilla.redhat.com/show_bug.cgi?id=800850

Comment 9 Anthony Towns 2012-03-16 03:24:46 UTC
Update ks used for qa28 spin

Comment 10 Tim Wilkinson 2012-03-27 15:00:19 UTC
Is there a version table for RHS that identifies qa28? RHS-2.0-20120315.4 (currently available via PXE) is still exhibiting the same issue. Screenshots available ...

Comment 12 Anthony Towns 2012-03-28 09:33:18 UTC
(In reply to comment #10)
> Is there a version table for RHS that identifies qa28? RHS-2.0-20120315.4
> (currently available via PXE) is still exhibiting the same issue. Screenshots
> available ...

I'd suggest updating to the Beta 1 image (RHS-2.0-20120320.2), but either way sounds like you'll need to make sure you're getting the ks via PXE. It's also in isolinux/initrd.img on the dvd image.

Cheers,
aj

Comment 13 Tim Wilkinson 2012-03-30 15:08:39 UTC
I did try the 20120320.2 build in PXE just to verify that it too does not accommodate the new naming convention of embedded NICs. The workaround for me was to copy the ks file used by the PXE images, modify it to allow an IF named 'em1' and interrupted the PXE boot line to use that modified ks.

Comment 14 Anthony Towns 2012-04-04 05:27:06 UTC
Bala, sounds like this needs more work?

Comment 15 Bala.FA 2012-04-04 05:53:51 UTC
(In reply to comment #13)
> I did try the 20120320.2 build in PXE just to verify that it too does not
> accommodate the new naming convention of embedded NICs. The workaround for me
> was to copy the ks file used by the PXE images, modify it to allow an IF named
> 'em1' and interrupted the PXE boot line to use that modified ks.

Could you share the kickstart file you used?

Comment 16 Tim Wilkinson 2012-04-04 21:39:15 UTC
(In reply to comment #15)
> Could you share the kickstart file you used?

Originally I used http://irish.lab.bos.redhat.com/pub/gprfs005.ks for the 20120315.4 build. I later got the kickstart that has the fix (http://irish.lab.bos.redhat.com/pub/RHS2.ks) to work for me.

When I selected the 20120320.2 build the day it appeared in PXE and let it run without interruption, I got the same eth0 failure I'd seen before so it appeared as though the fix was not there yet.

Comment 17 Bala.FA 2012-04-05 05:54:09 UTC
Ok.  As long as you use RHS-2.0-iso.ks or modified version of the file, this bug won't appear.  You can see how we fixed more bugs in the ks file :)

Comment 18 Amar Tumballi 2012-05-08 11:24:47 UTC
Fixed in RHS 2.0 beta2.

Comment 20 Ujjwala 2012-06-04 10:07:33 UTC
Verified it on RHS 2.0 RC1

Comment 21 Ben England 2012-06-04 15:20:32 UTC
This bug appears fixed to me, who should close it?

Comment 22 Vijay Bellur 2012-06-04 16:01:04 UTC
Verified state is logical closure as far as we are concerned.