Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 244994

Summary: RHEL 5.1: anaconda fails to mark iSCSI root with _netdev mount option
Product: Red Hat Enterprise Linux 5 Reporter: Mark McLoughlin <markmc>
Component: anacondaAssignee: Dave Cantrell <dcantrell>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 5.1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0644 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-07 17:22:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 238143    
Attachments:
Description Flags
anaconda-device-options.patch none

Description Mark McLoughlin 2007-06-20 13:38:00 UTC
With RHEL5-Server-20070620.nightly when installing to iSCSI root, I end up with
the following entries in /etc/fstab:

  /dev/VolGroup00/LogVol00 /    ext3 defaults        1 1
  LABEL=/boot             /boot ext3 defaults,_netdev 1 2

It's clearly not the driveIsIscsi() logic which is failing, since /boot is
getting marked with _netdev and:

  >>> os.path.islink("/sys/block/sda/device")
  True
  >>> target = os.readlink("/sys/block/sda/device")       
  >>> target
  '../../devices/platform/host0/session1/target0:0:0/0:0:0:0'
  >>>
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)               
  <_sre.SRE_Match object at 0x2aaaac4358a0>

Need the flag set so that we can disable Xen bridging on iSCSI root - see bug
#238143

Comment 1 Mark McLoughlin 2007-06-26 10:57:49 UTC
Okay, the problem turns out to be that the mount options from the
LogicalVolumeDevice are taken by the FileSystemSetEntry during the
"partitiondone" step.

However, the device is only marked with _netdev during the "enablefilesystems"
step, which comes after the "partitiondone" step.

Attaching a patch which fixes the problem by adding a getOptions() method to
FileSystemSetEntry which means the device options are only read when /etc/fstab
is being written during the "preinstallconfig" step which comes after the
"enablefilesystems" step.

Comment 2 Mark McLoughlin 2007-06-26 10:59:06 UTC
Created attachment 157877 [details]
anaconda-device-options.patch

Comment 3 Dave Cantrell 2007-06-26 14:07:36 UTC
This fix is required for bug #238143 in 5.1

Comment 6 Dave Cantrell 2007-07-18 15:04:58 UTC
Fixed in CVS and will be included in the anaconda-11.1.2.59-1 build.

Comment 8 James Laska 2007-09-24 15:16:40 UTC
VERIFIED against RHEL5.1-Server-20070920.1

# cat /etc/fstab 
/dev/VolGroup00/LogVol00 /                       ext3    defaults,_netdev 1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/VolGroup00/LogVol01 swap                    swap    defaults,_netdev 0 0


Comment 10 errata-xmlrpc 2007-11-07 17:22:03 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 the 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-2007-0644.html