Bug 466614 - [NetApp 5.4 bug] Installer fails to select iscsi package automatically during SANboot installation on multipath device.
[NetApp 5.4 bug] Installer fails to select iscsi package automatically during...
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: anaconda (Show other bugs)
All Linux
high Severity high
: rc
: 5.4
Assigned To: Hans de Goede
Release Test Team
: OtherQA
Depends On:
Blocks: 461680 AnacondaStorage 483784
  Show dependency treegraph
Reported: 2008-10-11 08:03 EDT by nandkumar mane
Modified: 2009-09-02 05:53 EDT (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-09-02 05:53:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
NetApp isys.py patch (907 bytes, patch)
2009-03-15 07:39 EDT, nandkumar mane
no flags Details | Diff
Netapp isys patch (873 bytes, patch)
2009-03-17 05:32 EDT, nandkumar mane
no flags Details | Diff

  None (edit)
Description nandkumar mane 2008-10-11 08:03:45 EDT
Description of problem:
During RHEL5.2 SANboot installation on multipathed device(root on multipath), installer doesn't choose iscsi package by default. One has to manually select iscsi package during installation. I tried using installation number provided by redhat, but still it didn't help me selecting iscsi package automatically.

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

How reproducible:
very reproducible

Steps to Reproduce:
1. Start RHEL5.2 installation using "linux mpath" parameter, so that multipath support will get enabled.
2. Follow installation procedure. Using advanced storage option login to the controller through more than one path, so that you will see multipathed device on host.
3. Install on multiapthed device using default packages.
Actual results:
System will hang on first reboot after installation, as iscsi package was not selected and installed.

Expected results:
iSCSI and multipath packages should be included in default packages when one is using "linux mpath" option.

Additional info:
Comment 1 Hans de Goede 2008-10-11 10:38:15 EDT
First of all, thanks for reporting this issue. I'm not very familiar with how multi-path works, but I'm pretty familiar with the anaconda iscsi code.

We decide if we need to install iscsi-initiator-utils with the following 2 pieces of code:

def driveIsIscsi(device):
    if not os.path.islink("/sys/block/%s/device" %(device,)):  
        return False
    target = os.path.realpath("/sys/block/%s/device" %(device,))
    if re.search("/platform/host[0-9]*/session[0-9]*/target[0-9]*:[0-9]*:[0-9]*/[0-9]*:[0-9]*:[0-9]*:[0-9]*", target) is not None:
        return True
    return False

        for disk in diskset.disks.keys():
            if isys.driveIsIscsi(disk):
                log.info("ensuring iscsi is installed")

The loop calls driveIsIscsi() for all disks in our diskset, which are normally called something like sda, sdb, sdc, etc. Then driveIsIscsi() checks for the device link under /sys/block/sd#/device if its a link to a file with a full-path something like

This is clearly not working in your case, could you please see which files there are under /sys/block/ on your system and where all there device links point?
Comment 2 nandkumar mane 2008-10-12 10:20:54 EDT
When we install on multipath device anaconda gets driveset.disks as [sda,mapper/mpath0], where sda is a local disk and mapper/mpath0 is a multipathed device on which we are installing root. driveIsIscsi just checks for basic devices(eg. sda,sdb), it doesn't have intelligence to handle multipath device(eg. mapper/mpath0).
Just to confirm if this solution works, I did following change in yuminstall.py and it works fine.

   def selectFSPackages(self, fsset, diskset):
        for entry in fsset.entries:
            map(self.selectPackage, entry.fsystem.getNeededPackages())

        for disk in diskset.disks.keys():
            if isys.driveIsIscsi(disk):
                log.info("ensuring iscsi is installed")

        if diskset.__class__.mpList:
            log.info("Nandkumar : My  change for mpath")
            log.info("ensuring device-mapper-multipath is installed")
---->       log.info("ensuring iscsi is installed")
---->       self.selectPackage("iscsi-initiator-utils")

But the problem with this is everytime you install on multipathed device, iscsi package will get installed, even with fcp installation. There should some check to decide on if it is fcp or iscsi mutliatphed device.

SO we have to update driveIsIscsi function to handle mpath devices. I will come up with patch soon.
Comment 3 Andrius Benokraitis 2009-03-06 15:31:40 EST
Hans - do you require any other info from NetApp on this issue?
Comment 4 Hans de Goede 2009-03-08 05:08:17 EDT
(In reply to comment #3)
> Hans - do you require any other info from NetApp on this issue?  

Yes, the last comment from nandkumar mane was:

(In reply to comment #2)


> SO we have to update driveIsIscsi function to handle mpath devices. I will come
> up with patch soon.  

I'm still waiting for said patch. Given that I do not have access to the relevant
hardware creating a fix for this myself is very hard to do.
Comment 5 nandkumar mane 2009-03-08 12:48:49 EDT
oops. Missed on this because of some other priorities. 
Anyways this is not specific to NetApp or any other controller. The problem here is that selectFSPackages doesn't include iscsi package if we are installing on multipathed device. Multipathed device can be on fc or iscsi or any other device. 
We need to modify code so that iscsi device will be installed only when multipathed device has underneath iscsi devices(and not when underneath devices are fc devices).

The sample code change I gave in comment #2 selects iscsi package without caring if underneath device is iscsi or fc. Need to improovise that.
Comment 6 Andrius Benokraitis 2009-03-09 13:39:41 EDT
NETAPP: If you have an exact patch to propose we'll review it -- I found out from the anaconda team that this issue will only get attention if all other prioritized items have been addressed.

Else, this will have to get deferred to 5.5. Let me know.
Comment 7 nandkumar mane 2009-03-10 08:01:55 EDT
Ok. I will be posting patch in a day or two.
Comment 8 nandkumar mane 2009-03-15 07:39:23 EDT
Created attachment 335253 [details]
NetApp isys.py patch

patch converts mpath device to dm device  and select iscsi package if root is on multipathed device.(SANboot).
Comment 9 Hans de Goede 2009-03-16 05:55:15 EDT
(In reply to comment #8)
> Created an attachment (id=335253) [details]
> NetApp isys.py patch
> patch converts mpath device to dm device  and select iscsi package if root is
> on multipathed device.(SANboot).  

Thanks for the patch. It seems sane, I've asked a fellow anaconda team member to
also take a look at it. I will get back to you when I hear from him.
Comment 11 Peter Jones 2009-03-16 11:47:36 EDT
+def ConvertdmTOsd(minor):
+    slaves = []
+    slavepath = "/sys/block/dm-%d/slaves" % (minor,)
+    if os.path.isdir(slavepath):
+        slaves = os.listdir(slavepath)
+        return slaves
+    else:
+        return None

I'd rather see this named "convertDmToSd()", and have it always return a list (either empty or not).
Comment 13 RHEL Product and Program Management 2009-03-16 14:38:33 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 14 nandkumar mane 2009-03-17 05:32:27 EDT
Created attachment 335494 [details]
Netapp isys patch

Thanks for the feedback. I have done changes in the patch as per anaconda naming convention. Now converDmToSd always returns list. List can be empty or not. Its been handled in calling function.
Comment 15 Hans de Goede 2009-03-17 06:43:13 EDT
Thank you!
Comment 17 Hans de Goede 2009-05-06 05:59:32 EDT
This is fixed in this commit:

Which will be part of the upcoming anaconda- build.
Comment 20 Mark Goodwin 2009-05-14 20:25:25 EDT
IT #290972 is related, but this BZ for anaconda is not the whole fix, as per mchristie's comments in BZ #500273.
Comment 21 Chris Ward 2009-06-14 19:15:51 EDT
~~ Attention Partners RHEL 5.4 Partner Alpha Released! ~~

RHEL 5.4 Partner Alpha has been released on partners.redhat.com. There should
be a fix present that addresses this particular request. Please test and report back your results here, at your earliest convenience. Our Public Beta release is just around the corner!

If you encounter any issues, please set the bug back to the ASSIGNED state and
describe the issues you encountered. If you have verified the request functions as expected, please set your Partner ID in the Partner field above to indicate successful test results. Do not flip the bug status to VERIFIED. Further questions can be directed to your Red Hat Partner Manager. Thanks!
Comment 22 Tanvi 2009-06-24 05:21:56 EDT
I have tested it in RHEL5.4 Partner Alpha, the issue is fixed. iscsi package is getting installed by default in SANBoot scenario. Thank you.
Comment 24 errata-xmlrpc 2009-09-02 05:53:06 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.


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