Bug 507214 - Need to update /lib/udev/ccw_init since the name of s390 network device driver has changed from ctc to ctcm
Need to update /lib/udev/ccw_init since the name of s390 network device drive...
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
12
s390x Linux
low Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Fedora Extras Quality Assurance
:
Depends On: 539491
Blocks: ZedoraTracker 516998
  Show dependency treegraph
 
Reported: 2009-06-21 14:12 EDT by Steffen Maier
Modified: 2014-03-16 23:19 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-12-05 01:49:30 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
output of "udevadm monitor --environment" (5.68 KB, text/plain)
2009-09-05 14:34 EDT, Steffen Maier
no flags Details
potential patch (1.24 KB, patch)
2009-09-08 12:58 EDT, Bill Nottingham
no flags Details | Diff

  None (edit)
Description Steffen Maier 2009-06-21 14:12:31 EDT
Description of problem:
Previously the name of the network device drivers, the ifcfg file parameter NETTYPE, and certain s390 network device paths in sysfs happened to be exactly the same. Since the merge of the drivers ctc and mpc into ctcm, the network driver module for CTC and also the sysfs paths are called ctcm.

Version-Release number of selected component (if applicable):
initscripts-8.95-1.s390x

How reproducible:
Generate your /etc/sysconfig/network-scripts/ifcfg-ctc0 of choice and the CTC device won't come up (using the network service).

Additional info:

/lib/udev/ccw_init builds an internal variable called DIR using NETTYPE as part of the sysfs path. In case of NETTYPE being ctc, the sysfs path needs to be /sys/bus/ccwgroup/drivers/ctcm instead. Please add this little special case. Doing so lets existing ifcfg files continue working. I wouldn't want to force users to change all occurrences of ctc in ifcfg NETTYPE to ctcm.
Comment 1 Bill Nottingham 2009-06-22 14:30:00 EDT
NETTYPE seems like a broken configuration parameter to begin with. Any reason it couldn't be autodetected?
Comment 2 Steffen Maier 2009-06-23 08:51:06 EDT
My understanding was that time is a scarce resource and we want to get Fedora working on s390x ASAP. Therefore, we should fix all those simple little things as the issue in here, in order to have enough time to fix the more complicated issues at other places.
Comment 3 Bill Nottingham 2009-06-23 10:26:30 EDT
The schedule is not an excuse to include bad hacks (and this process should have started years ago.)
Comment 4 Bill Nottingham 2009-09-02 15:23:40 EDT
What's the output of 'udevmonitor --env' on boot for these devices?
Comment 5 Steffen Maier 2009-09-05 14:34:31 EDT
Created attachment 359877 [details]
output of "udevadm monitor --environment"

Screen log of dynamically defining (not different from boot scenario) one potential ccwgroup (2 ccw channels) making up one Linux network device for each of the 3 different CTC network adapter types. Dynamic definition is accomplished from within Linux under z/VM using vmcp to instruct the hypervisor to define channels. For each of the 3 pairs, the user would have an ifcfg-ctcX as follows (DEVICE, SUBCHANNELS, IPADDR, and GATEWAY different for each of course):

# IBM vCTC p-t-p
DEVICE=ctc0
BOOTPROTO=static
IPADDR=10.61.49.10
NETMASK=255.255.255.255
GATEWAY=10.61.49.13
NETTYPE=ctc
ONBOOT=yes
SUBCHANNELS=0.0.1000,0.0.1001

May I ask, what your plans for solving this are, Bill?
Comment 6 Bill Nottingham 2009-09-08 12:58:30 EDT
Created attachment 360108 [details]
potential patch

Something like this (untested). DEVICETYPE predates NETTYPE anyway; not sure why that was invented for mainframe.
Comment 7 Steffen Maier 2009-09-11 13:36:21 EDT
(In reply to comment #6)
> Created an attachment (id=360108) [details]
> potential patch
> 
> Something like this (untested). DEVICETYPE predates NETTYPE anyway; not sure
> why that was invented for mainframe.  

DEVICETYPE is set by /etc/sysconfig/network-scripts/network-functions, either by choosing it based on TYPE from ifcfg-... or if that isn't specified on the prefix of the device name given in DEVICE. No ifcfg file on s390 I have seen so far had TYPE set explicitly (unless some admin inserted that manually). For the different network types on s390 this gives the following mapping:

driver  TYPE     DEVICE DEVICETYPE
qeth    Ethernet ethX   eth
lcs     Ethernet ethX   eth
ctcm    CTC      ctcX   ctc
netiucv IUCV     iucvX  iucv
(there are more mappings for other, non-s390 network device types)

DEVICETYPE is used by ifup and ifdown and their -post scripts. ifup/ifdown use it to call an ifup-$DEVICETYPE specific subscript if it exists, which is the case for ctc and iucv but neither for qeth nor for lcs which use the common ifup-eth.

NETTYPE is for s390 only and is set in linuxrc.s390, read by loader in loader.c and finally written by loader in net.c to ifcfg-...
To my surprise, anaconda's network.py sets self.info["TYPE"] to either CTC or IUCV, depending on what name the network device starts with (similar to what network-functions does) but this is used nowhere in anaconda.
Anyway, NETTYPE has the following mapping:

driver  NETTYPE
qeth    qeth
lcs     lcs
ctcm    ctc
netiucv iucv

NETTYPE is used by /lib/udev/ccw_init (and maybe other places I don't know of yet). Apparently, DEVICETYPE cannot distinguish between qeth and lcs but that is necessary in /lib/udev/ccw_init (if [ "$NETTYPE" = "lcs" ]; then ...) which is most probably why NETTYPE is used in there.

If you reduce and adapt your patch to the following, it should just work:

-DIR="/sys/bus/ccwgroup/drivers/$NETTYPE"
+if [ "$NETTYPE" = "ctc" ]; then
+	DIR="/sys/bus/ccwgroup/drivers/ctcm"
+else
+	DIR="/sys/bus/ccwgroup/drivers/$NETTYPE"
+fi

I use something similar here successfully.
Comment 8 IBM Bug Proxy 2009-10-19 18:40:52 EDT
------- Comment From kumarr@linux.ibm.com 2009-10-19 18:34 EDT-------
Mirroring
Comment 9 Bug Zapper 2009-11-16 05:17:03 EST
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 12 Steffen Maier 2010-02-04 07:10:46 EST
Bill, did you apply any patch to fix this?
I cannot find any changes in either master or rhel6-branch of initscripts
and ctcm network devices won't be configured in Rawhide and RHEL 6.
Comment 13 Bill Nottingham 2010-02-04 10:38:45 EST
There is an open bug to move ccw_init to s390utils. I was waiting on that, and was going to move this there then.
Comment 14 Bug Zapper 2010-11-04 07:02:49 EDT
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  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 WONTFIX if it remains open with a Fedora 
'version' of '12'.

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 prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

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.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 15 Bug Zapper 2010-12-05 01:49:30 EST
Fedora 12 changed to end-of-life (EOL) status on 2010-12-02. Fedora 12 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.

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

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