[ovirt-users] Failed to read hardware information

Dan Kenigsberg danken at redhat.com
Thu Oct 13 06:01:53 UTC 2016


On Thu, Oct 13, 2016 at 11:52:17AM +1100, David Pinkerton wrote:
> Nir,
> 
> Looks like its crashing on the dmidecode system call.
> 
> I've attached the output from gbd as well as a dmidecode text dump,
> dmidecode binary dump and each keywords run individually.
> 
> >From the keywords it look like my dmi info is corrupted.  I have download a
> AMI dmi editor but this only allows access to limited fields.  Do you know
> another tools to rewrite the dmi info?

I don't. But whatever is inside your dmi, dmidecode must not crash.
Which version of python-dmidecode do you have installed?
Would you open a bug against it?

I believe that its maintainers would appriace a simple reproducer, that
does not involve ovirt or Vdsm. See if you can simplify the code in

def __leafDict(d):
    ret = {}
    for k, v in d.iteritems():
        if isinstance(v, dict):
            ret.update(__leafDict(v))
        else:
            ret[k] = v
    return ret


def getAllDmidecodeInfo():
    import dmidecode

    myLeafDict = {}
    for k in ('system', 'bios', 'cache', 'processor', 'chassis', 'memory'):
        myLeafDict[k] = __leafDict(getattr(dmidecode, k)())
    return myLeafDict



More information about the Users mailing list