Red Hat Bugzilla – Bug 466614
[NetApp 5.4 bug] Installer fails to select iscsi package automatically during SANboot installation on multipath device.
Last modified: 2009-09-02 05:53:06 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):
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.
System will hang on first reboot after installation, as iscsi package was not selected and installed.
iSCSI and multipath packages should be included in default packages when one is using "linux mpath" option.
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:
if not os.path.islink("/sys/block/%s/device" %(device,)):
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:
for disk in diskset.disks.keys():
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?
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:
for disk in diskset.disks.keys():
log.info("ensuring iscsi is installed")
log.info("Nandkumar : My change for mpath")
log.info("ensuring device-mapper-multipath is installed")
----> log.info("ensuring iscsi is installed")
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.
Hans - do you require any other info from NetApp on this issue?
(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.
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.
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.
Ok. I will be posting patch in a day or two.
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).
(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.
+ slaves = 
+ slavepath = "/sys/block/dm-%d/slaves" % (minor,)
+ if os.path.isdir(slavepath):
+ slaves = os.listdir(slavepath)
+ return slaves
+ return None
I'd rather see this named "convertDmToSd()", and have it always return a list (either empty or not).
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
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.
This is fixed in this commit:
Which will be part of the upcoming anaconda-126.96.36.199-1 build.
IT #290972 is related, but this BZ for anaconda is not the whole fix, as per mchristie's comments in BZ #500273.
~~ 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!
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.
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.