Red Hat Bugzilla – Bug 467289
we are storing error strings as fs labels because execWithCapture is broken
Last modified: 2010-10-23 01:13:46 EDT
Description of problem:
We're storing error strings as filesystem labels. This specific manifestation is a call to iutil.execWithCapture from isys._readFATLabel().
On ia64 systems with multiple PVs *or* multiple VGs, the following error dialog will halt any attempt to bring up the system in rescue mode:
+----------------------+ Duplicate Labels +-----------------------+
| Multiple devices on your system are labelled Logical sector |
| size is zero.. Labels across devices must be unique for your |
| system to function properly. |
| Please fix this problem and restart the installation process. |
| +--------+ |
| | Reboot | |
| +--------+ |
The basic problem is that iutil.execWithCapture makes no use of the stderr input argument and instead always dupes stderr to stdout. So, when dosfslabel throws an error to stdout trying to read a fat label from a PV, we end up thinking the PV has a label of "Logical sector size is zero." Another one is a VG with a label of "Read 512 bytes at 0:Is a directory".
Callers who want stderr duped to stdout should use execWithCapture(...,stderr=1).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. create a partition that doesn't contain any fslabel
2. call isys._readFATLabel (or, on ia64, isys.readFSLabel) on the device
1. try to rescue an ia64 box containing more than one PV or more than one VG
An error string is returned as though it was a label, or an error indicating rescue mode is aborting.
No return value if no label is present, and successful rescue of systems we installed.
This only causes problems on ia64, but that's only because we don't collect FAT labels on other arches.
For additional info & partitioning layout see:
Marking as release blocker because this prevents functioning of rescue mode on IA64
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
Fix will be in anaconda-18.104.22.168-1.
I can't reproduce this issue neither with partitioning layout described in bug #456283 comment #28 neither with the layout described in comment #0
With an older release on encrypted raid5 array shows the error:
>>> import isys
>>> isys.readFSLabel("/dev/md0", 0)
'Logical sector size is zero.'
Trying with snap #2 leads to:
>>> import isys
>>> label = isys.readFSLabel("/dev/md0", 0)
>>> label is None
Moving to VERIFIED. Just for the record: rescue mode not always fails.
*** Bug 427457 has been marked as a duplicate of this bug. ***
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.