Bug 468755 - layer2 device not being activated on installed system
Summary: layer2 device not being activated on installed system
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: anaconda
Version: 5.3
Hardware: other
OS: All
medium
high
Target Milestone: rc
: ---
Assignee: David Cantrell
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-27 20:10 UTC by IBM Bug Proxy
Modified: 2009-06-20 07:53 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-20 21:36:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0164 0 normal SHIPPED_LIVE anaconda bug fix and enhancement update 2009-01-20 16:05:24 UTC

Description IBM Bug Proxy 2008-10-27 20:10:26 UTC
=Comment: #0=================================================
When doing an install over a layer 2 device the install completes successfully. When the installed
system is booted the network device is not started. The init-script has the right information but
the layer 2 setting indicates that layer2 was not set on. 

/tmp/netinfo from installer:
sh-3.2# cat netinfo
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.70.186
NETMASK=255.255.255.0
GATEWAY=192.168.70.1
HOSTNAME=lac0016.ltic.pok.ibm.com
DOMAIN=ltic.pok.ibm.com
MTU=1492
SUBCHANNELS=0.0.1600,0.0.1601,0.0.1602
PORTNAME=bogus
NETTYPE=qeth
OPTIONS="layer=2"

/tmp/rh5l2.osaconf (cms conf file):
sh-3.2# cat rh5l2.osaconf
DHCP=no
BROADCAST=192.168.70.255
NETTYPE=qeth
SUBCHANNELS=0.0.1600,0.0.1601,0.0.1602
IPADDR=192.168.70.186
HOSTNAME=lac0016.ltic.pok.ibm.com
NETMASK=255.255.255.0
NETWORK=192.168.70.0
GATEWAY=192.168.70.1
DNS=192.168.71.128
SEARCHDNS=ltic.pok.ibm.com
MTU=1492
PORTNAME=bogus
LAYER2=1
VSWITCH=1
PORTNO=0

Boot message:
Bringing up interface eth0:  qeth device eth0 does not seem to be present, delaying initialization.
[FAILED]                                                                        

Device settings:

cd /sys/bus/ccwgroup/drivers/qeth/0.0.1600   

[root@lac0016 0.0.1600]# cat online          
cat online                                   
0                                            

[root@lac0016 0.0.1600]# cat layer2          
cat layer2                                   
0                                            

dmesg | grep qeth                                                    
qeth: loading qeth S/390 OSA-Express driver                          
qeth: received an IDX TERMINATE with cause code 0xf6                 
qeth: sense data available on channel 0.0.1600.                      
qeth:  cstat 0x0                                                     
qeth: irb: 00 c2 60 17  3e 21 a0 38  0e 00 10 00  00 80 00 00        
qeth: irb: 01 02 00 00  00 00 00 00  00 00 00 00  00 00 00 00        
qeth: sense data: 02 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00 
qeth: sense data: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00 
qeth: Initialization in hardsetup failed! rc=-5                      

/etc/sysconfig/network-scripts/ifcfg-eth0:
# IBM QETH
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.70.186
MTU=1492
NETMASK=255.255.255.0
NETTYPE=qeth
ONBOOT=yes
OPTIONS="layer=2"
PORTNAME=bogus
SUBCHANNELS=0.0.1600,0.0.1601,0.0.1602
MTU=1492

Setting layer2 on makes the device eligible to be brought online:
[root@lac0016 0.0.1600]# echo 1 > layer2                                        
                                                                 
[root@lac0016 0.0.1600]# echo 1 > online                                        
                                                                 
qeth: Device 0.0.1600/0.0.1601/0.0.1602 is a Guest LAN QDIO card (level: V531)  
with link type GuestLAN QDIO (portname: bogus)                           

The device can then be started:       
[root@lac0016 0.0.1600]# ifup eth0                                                                 
      

[root@lac0016 ~]# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 02:06:00:00:00:48
          inet addr:192.168.70.186  Bcast:192.168.70.255  Mask:255.255.255.0
          inet6 addr: fe80::6:ff:fe00:48/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1492  Metric:1
          RX packets:77 errors:0 dropped:0 overruns:0 frame:0
          TX packets:93 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8437 (8.2 KiB)  TX bytes:15964 (15.5 KiB)

Comment 1 RHEL Program Management 2008-10-27 21:04:55 UTC
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".

Comment 2 David Cantrell 2008-10-27 21:50:50 UTC
I think we should be writing out a file to /etc/modprobe.d rather than placing:

    OPTIONS="layer=2"

in the ifcfg file.  For example, we should be writing /etc/modprobe.d/qeth.conf with this line:

    options qeth layer=2

Because it doesn't look like the OPTIONS variable from the ifcfg file in RHEL-5 is not used by the scripts in /etc/sysconfig/network-scripts.  The modules are just loaded using modprobe, so options need to be put in the modprobe configuration files.

Can someone at IBM confirm?

Comment 3 IBM Bug Proxy 2008-10-28 16:21:15 UTC
(In reply to comment #6)
> ------- Comment From dcantrell 2008-10-27 17:50:50 EDT-------
> I think we should be writing out a file to /etc/modprobe.d rather than placing:

No, William's configurations files all look sane to me. Device configuration should have been done before automatically by /lib/udev/ccw_init, which has been interpreting and applying SUBCHANNELS, PORTNAME,  CTCPROT, and OPTIONS since earlier releases. The qeth driver module does not have any parameters (modinfo qeth) since things such as OPTIONS (including layer2 or portno) are per device and not per driver.

> Because it doesn't look like the OPTIONS variable from the ifcfg file in RHEL-5
> is not used by the scripts in /etc/sysconfig/network-scripts.

Right, network-scripts (ifup*, network-functions) don't use OPTIONS since they only configure network layer stuff and not the device/hardware themselves.

We have to figure out, why the device wouldn't come up and qeth prints error messages to the kernel log.

Comment 4 Gonzalo Muelas Serrano 2008-10-28 16:40:59 UTC
Hi David,
to the theory I would recommend to check the Device Drivers, Features and Commands Book from October 2005 stream in developerWorks, chapter 9, pages 112-116,124 and  110:
http://www.ibm.com/developerworks/linux/linux390/october2005_documentation.html
That is, layer2 is not a module parameter, but an attribute in sysfs.

OPTIONS="attribute1=value1 attribute2=value2"
in ifcfg-ethXX files has been working since RHEL 4.4 and RHEL 5 thanks to the file/script ccw_init, which from RHEL 4 to RHEL 5 got moved to:
/lib/udev/ccw_init
and it is called by udev from /etc/udev/rules.d/55-ccw.rules 

Maybe you could check with Harald (if he still is the initscripts/udev mantainer for RHEL 5) if any changes where done since RHEL 5.2 in initscripts/udev. As mentioned, in RHEL 5.2 was working.

Hope it helps,
Gonzalo Muelas Serrano.

Comment 5 David Cantrell 2008-10-28 22:04:45 UTC
I see what's happening.  We're writing out this line to the ifcfg file:

    OPTIONS="layer=2"

The /lib/udev/ccw_init script is expecting (see lines 37-42 of ccw_init):

    OPTIONS="layer2=1"

Here's a patch to anaconda to fix up what we write out to the ifcfg file:

diff --git a/loader2/net.c b/loader2/net.c
index a40ee18..e595b59 100644
--- a/loader2/net.c
+++ b/loader2/net.c
@@ -1849,7 +1849,7 @@ int writeNetInfo(const char * fn, struct networkDeviceConfig * dev) {
         fprintf(f, "CTCPROT=%s\n", dev->ctcprot);
 
     if (dev->layer2 && !strcmp(dev->layer2, "1"))
-       strcat(osa_opts, "layer=2");
+       strcat(osa_opts, "layer2=1");
     else if (dev->subchannels)
        fprintf(f, "ARP=no\n");
     if (dev->portno && !strcmp(dev->portno, "1")) {

Comment 6 Harald Hoyer 2008-10-29 07:53:04 UTC
To init/activate the device after writing the configuration, s.th. like this is needed:

# SUBSYSTEM="ccw" DEVPATH="bus/ccwgroup/drivers/qeth/${SUBCHANNELS//,*/}" /lib/udev/ccw_init

Comment 7 IBM Bug Proxy 2008-10-29 10:20:48 UTC
(In reply to comment #9)
> ------- Comment From dcantrell 2008-10-28 18:04:45 EDT-------

Good spotting, David!

> diff --git a/loader2/net.c b/loader2/net.c
> @@ -1849,7 +1849,7 @@ int writeNetInfo(const char * fn, struct
> if (dev->layer2 && !strcmp(dev->layer2, "1"))
> -       strcat(osa_opts, "layer=2");
> +       strcat(osa_opts, "layer2=1");

This seems to be a regression which came in with support for portno:

diff -rup rhel5.2/anaconda-11.1.2.113-1.src.rpm_FILES/anaconda-11.1.2.113/loader
2/net.c rhel5.3-alpha-20081006/anaconda-11.1.2.136-2.src.rpm_FILES/anaconda-11.1
.2.136/loader2/net.c
@@ -1733,10 +1847,20 @@ int writeNetInfo(const char * fn, struct
fprintf(f, "NETTYPE=%s\n", dev->nettype);
if (dev->ctcprot)
fprintf(f, "CTCPROT=%s\n", dev->ctcprot);
+
if (dev->layer2 && !strcmp(dev->layer2, "1"))
-        fprintf(f, "OPTIONS=\"layer2=1\"\n");
+       strcat(osa_opts, "layer=2");
### this is where the regression came in ###
else if (dev->subchannels)
fprintf(f, "ARP=no\n");
+    if (dev->portno && !strcmp(dev->portno, "1")) {
+       if (strlen(osa_opts) != 0) {
+           strcat(osa_opts, " ");
+       }
+       strcat(osa_opts, "portno=1");
+    }
+    if ((strlen(osa_opts) > 0))
+        fprintf(f, "OPTIONS=\"%s\"\n", osa_opts);
+
if (dev->macaddr)
fprintf(f, "MACADDR=%s\n", dev->macaddr);
Since layer2 used to be the only options, it used to write out the whole string "OPTIONS=\"layer2=1\"\n". Now that we have another OPTION portno, the arguments to OPTION are accumulated in osa_opts and finally the OPTION string gets written out.

Thanks for your fix.

Comment 9 RHEL Program Management 2008-10-29 14:59:37 UTC
This bugzilla has Keywords: Regression.  

Since no regressions are allowed between releases, 
it is also being proposed as a blocker for this release.  

Please resolve ASAP.

Comment 11 David Cantrell 2008-10-29 17:58:45 UTC
Patch will be in anaconda-11.1.2.151-1

Comment 13 IBM Bug Proxy 2008-11-05 16:11:19 UTC
This is verified fixed in Snapshot1.

Comment 15 errata-xmlrpc 2009-01-20 21:36:22 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0164.html


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