Bug 633469 - [6.1 FEAT] Enhance cio_ignore usage in scripts using new handler for pending work - installer part
[6.1 FEAT] Enhance cio_ignore usage in scripts using new handler for pending ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: anaconda (Show other bugs)
6.0
s390x All
high Severity high
: beta
: 6.1
Assigned To: David Cantrell
Release Test Team
: FutureFeature, Reopened
Depends On: 631517 631527 633356
Blocks: 633862 538808 580566 647893
  Show dependency treegraph
 
Reported: 2010-09-13 15:42 EDT by IBM Bug Proxy
Modified: 2011-05-19 08:50 EDT (History)
9 users (show)

See Also:
Fixed In Version: anaconda-13.21.111-1
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-05-19 08:50:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
IBM Linux Technology Center 67040 None None None Never

  None (edit)
Description IBM Bug Proxy 2010-09-13 15:42:55 EDT
1. Feature Overview:
Feature Id: [67040]
a. Name of Feature: [6.1 FEAT] Enhance cio_ignore usage in scripts using new handler for pending
work - installer part
b. Feature Description
This feature requests to enhance the cio_ignore usage in installer by taking advantage of the new
cio_ignore handler to wait for cio pending work.

2. Feature Details:
Sponsor: LTC zSeries BOE
Architectures:  zSeries - 64 native, 

Arch Specificity: purely arch specific code
Affects Kernel Modules: Field does not exist
Delivery Mechanism: LDP Deliverable
Category: other
Request Type: Installer - Enhancement from Distributor
d. Upstream Acceptance: Field does not exist
Sponsor Priority P1
f. Severity: ship issue
IBM Confidential: No
Code Contribution: 3rd party code
g. Component Version Target:---

3. Business Case
This feature will avoid running into possible race condition, making the code more stable. Resulting
on less service cost and better customer satisfaction.

4. Primary contact at Red Hat:
John Jarvis jjarvis@redhat.com

5. Primary contacts at Partner:
Project Management Contact:
Hans-Georg Markgraf, mgrf@de.ibm.com

Technical contact(s):
Gonzalo Muelas Serrano, gmuelas@de.ibm.com
Comment 2 Chris Lumens 2010-09-13 16:00:18 EDT
And what are the changes required to implement this?
Comment 3 Gonzalo Muelas Serrano 2010-09-14 05:07:42 EDT
Hello,
the changes needed to implement this feature are to use the kernel infrastructure (provided by RH Bug 631517) and the tool (provided by RH Bug 631527) in the installer to solve the issues workarounded with timeouts in RHEL 6.0. For more deatils, please read RH Bug 533494 comments #15 through #35, and get in contact with Dan Horak.
Comment 4 Steffen Maier 2010-09-14 08:53:16 EDT
Very simplified speaking this feature only exists of inserting a write into a sysfs file to reliably block right after each dynamic free of devices from cio_ignore (and before the already existing udevadm settle) inside linuxrc.s390. Should only be four occurrences.

The cio_ignore handling in storage/zfcp.py already delegates to zfcp_cio_free (aka device_cio_free) of s390utils and works transparently as soon as s390utils are updated in RH bug 633356.
Comment 5 IBM Bug Proxy 2010-10-04 12:35:09 EDT
------- Comment From rsisk@us.ibm.com 2010-10-04 10:42 EDT-------
Code Upstream Status: No Code Required
Comment 6 IBM Bug Proxy 2010-11-30 05:21:18 EST
------- Comment From mgrf@de.ibm.com 2010-11-30 05:11 EDT-------
Close this feature request as duplicate
to   66875 - RHBZ 631527 -  [6.1 FEAT] Provide userspace handle to wait for cio
pending work - userspace

The functionality could be implemented into s390tools (s390utils) only and get referred to during install and boot.
The calls from installer and scripts already exist with RHEL6  (6.0 FEAT cio_ignore...)  feature request.
.
So nothing to implement for the installer anymore.

*** This bug has been marked as a duplicate of bug 66875 ***
Comment 7 David Cantrell 2010-11-30 09:34:36 EST

*** This bug has been marked as a duplicate of bug 631527 ***
Comment 9 Georg Markgraf 2010-12-08 08:26:03 EST
I was too fast closing this feature a DUP because there is still work to be done in linuxrc 

As mentioned by Steffen Maier in Comment #4 (RHBZ) (#7 LTC BZ) 

In anaconda's rhel6-branch, there are still the following usages of cio_ignore WITHOUT the necessary cio_settle in loader/linuxrc.s390. 

Those MUST be adapted to call the corresponding user space tool in order to transparently handle dynamic freeing from cio_ignore.


# read file from CMS and write it to /tmp                                       
function readcmsfile() # $1=dasdport $2=filename                                
{
    local dev
    if [ $# -ne 2 ]; then return; fi
    # precondition: udevd created dasda block device node                       
    if ! sysecho /proc/cio_ignore "free $1"; then
        echo $"DASD $1 could not be cleared from device blacklist"
        return 1
    fi
    # /proc/cio_ignore won't block on freeing devices until resensing           
    # has been completed, so wait until the udev event queue depletes           
    # (without udevadm settle we could wait 2 seconds unconditionally)          
    #debug ls -laF /dev/.udev                                                   
    udevadm settle
    # even though the device might now be online, some of its                   
    # sysfs attributes might not yet be available                               
    sleep 1

function dialog_network_table() {
...
        if [ "$choice" = "c" ]; then
            echo $"Clearing device blacklist..."
            if sysecho /proc/cio_ignore "free all"; then
                cio_wc_bytes=0
                # /proc/cio_ignore won't block on freeing devices               
                # until resensing has been completed, so wait until             
                # the udev event queue depletes.                                
                # This may take a long time so we show "progress":              
                #( while true; do echo -n "."; sleep 3; done ) &                
                #local childpid=$!                                              
                #debug ls -laF /dev/.udev                                       
                udevadm settle

function semantic_check_subchannels() {
...
        if [ ! -d "$dev_p" -a "$cio_wc_bytes" != "0" ]; then
            # - try to free from /proc/cio_ignore if they don't exist           
            echo $"Device $devbusid not present, trying to clear from
blacklist\
 and resense..."
            if sysecho /proc/cio_ignore "free $devbusid"; then
                # /proc/cio_ignore won't block on freeing devices               
                # until resensing has been completed, so wait until             
                # the udev event queue depletes (without udevadm settle we      
                # could wait 2 seconds unconditionally)                         
                #debug ls -laF /dev/.udev                                       
                udevadm settle
                # even though the device might now be online, some of its       
                # sysfs attributes (e.g. cutype) might not yet be available     
                sleep 1

### MAIN ###
...
                    if sysecho /proc/cio_ignore "free $CD_DEVICE"; then         
                        udevadm settle                                          
                        # even though device might now be online, some of its   
                        # sysfs attributes might not yet be available           
                        sleep 1
Comment 10 Gonzalo Muelas Serrano 2010-12-08 10:45:40 EST
That is, there is some code in linuxrc which should be using the "*_cio_free" functions implemented in s390utils, which will get updated to use the new handler.
Comment 14 Jan Stodola 2011-04-05 08:16:41 EDT
There is still one place in linuxrc that is not fixed:

function semantic_check_subchannels() {
...
        if [ ! -d "$dev_p" -a "$cio_wc_bytes" != "0" ]; then
            # - try to free from /proc/cio_ignore if they don't exist
            echo $"Device $devbusid not present, trying to clear from blacklist and resense..."
            if sysecho /proc/cio_ignore "free $devbusid"; then
                # /proc/cio_ignore won't block on freeing devices
                # until resensing has been completed, so wait until
                # the udev event queue depletes (without udevadm settle we
                # could wait 2 seconds unconditionally)
                #debug ls -laF /dev/.udev
                udevadm settle
                # even though the device might now be online, some of its
                # sysfs attributes (e.g. cutype) might not yet be available
                sleep 1
            else
                echo $"Device $devbusid could not be cleared from device blacklist"
            fi
        fi
...

Tested with anaconda-13.21.108
Moving back to ASSIGNED
Comment 19 John Jarvis 2011-04-06 16:16:06 EDT
This fix is approved and planned for inclusion in snapshot 3.
Comment 20 Jan Stodola 2011-04-12 06:15:53 EDT
There is no direct write into /proc/cio_ignore in anaconda-13.21.111 source code, build RHEL6.1-20110406.0.

Moving to VERIFIED.
Comment 21 errata-xmlrpc 2011-05-19 08:50:17 EDT
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-2011-0530.html

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