bootstrap_firmware fails on a PE 1950 with dual Intel Quad Core processors
Michael E Brown
Michael_E_Brown at dell.com
Fri Feb 1 16:34:57 CST 2008
On Tue, Jan 29, 2008 at 12:27:33PM -0500, Eric Raskin wrote:
> There seems to be a problem with device identification on our PowerEdge
> 1950 with dual Intel Quad Core processors. bootstrap_firmware is
> aborting at:
>
> bootstrap_pci.py line 78 in makePciDevice:
>
> kargs["pci_Vendor_txt"], kargs["pciVendor"] =
> splitTextFromNumeric(oneDevData["vendor"])
> TypeError: unpack non-sequence.
>
> I'm not a python expert, but I think that the splitTextFromNumeric
> didn't return a list with two entries.
>
> oneDevData contains:
>
> (Pdb) print oneDevData
> {'svendor': '8086', 'vendor': '8086', 'rev': '12', 'sdevice': '8086',
> 'device1': '25c0', 'device0': '0000:00:00.0', 'class': '0600'}
>
> As you can see, the vendor field does not contain any brackets, so
> splitTextFromNumeric can't match words. Its code is:
>
> vendevRe = re.compile(r'^(.*)\[(\w+)\]')
>
> decorate(traceLog())
> def splitTextFromNumeric(line):
> match = vendevRe.search(line)
> if match:
> text = match.group(1)
> number = match.group(2)
> return (text, number)
> return None
>
> Your regular expression appears to be looking for text in brackets. If
> the match fails, then the function returns None. Otherwise, it returns
> the first and second match groups - the text before the brackets and the
> number inside the brackets.
>
> In our case, the data only contains '8086', a number with no brackets.
> Hence we return None, which can't be unpacked as a list of two items.
>
> I suggest the following change:
>
> from
>
> return None
>
> to
>
> return ('', line)
>
> This would return the original input as the pciVendor if there is no
> text in brackets. The pciVendor_txt field is an empty string so that
> the .lower() function used later will continue to work.
>
> The bootstrap_firmware command now executes to completion.
> Unfortunately, I can't tell if the output is OK.
>
> Is this a valid fix?
>
First of all, which version of firmware-tools are you using?
Second, which OS are you using? The basic problem here is that I am
parsing output from the /sbin/lspci command, and that output varies
widely on different OSen. :(
--
Michael
More information about the firmware-tools-devel
mailing list