Change in vdsm[master]: lvm: Handle special "unknown device" pv_name

danken at redhat.com danken at redhat.com
Sat Jan 10 22:01:07 UTC 2015


Dan Kenigsberg has submitted this change and it was merged.

Change subject: lvm: Handle special "unknown device" pv_name
......................................................................


lvm: Handle special "unknown device" pv_name

When a pv is missing (e.g. device was lost or target is disconnected),
lvm return the special value "unknown device". Keeping this value cause
vdsm to fail in an unhelpful way when checking device properties when
trying to access "unknown device":

    OSError: [Errno 19] Could not find dm device named `unknown device`

Now we check lvm output and filter out pvs named "unknown device". If a
pv is missing, it will not be listed in the vg pv_name list, and in the
pvs cache.

When reloading vgs, we will see now this error:

    vg 04598ee3-46ff-4bb3-b8b2-4434f375302e has pv_count 2 but pv_names
    ('/dev/mapper/1IET_00070003',)

Previously this error was not logged since vg.pv_name included also
"unknown device".

When reloading pvs, we will see a new error:

    Missing pv: wPIujw-Wmcj-V2O6-r8Fl-X485-mXm7-UxCO3Q in vg:
    04598ee3-46ff-4bb3-b8b2-4434f375302e

Finally, a missing pv will show this error during domain selftest:

    StorageDomainAccessError: Domain is either partially accessible or
    entirely inaccessible: ('04598ee3-46ff-4bb3-b8b2-4434f375302e',)

This error was masked before by the OSError above.

Change-Id: I539c766112edce4a3f55d3aa0caac00d8d8c1cca
Bug-Url: https://bugzilla.redhat.com/1176517
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/36352
Reviewed-by: Allon Mureinik <amureini at redhat.com>
Reviewed-by: Federico Simoncelli <fsimonce at redhat.com>
---
M vdsm/storage/lvm.py
1 file changed, 9 insertions(+), 0 deletions(-)

Approvals:
  Nir Soffer: Verified
  Federico Simoncelli: Looks good to me, approved
  Allon Mureinik: Looks good to me, but someone else must approve



-- 
To view, visit http://gerrit.ovirt.org/36352
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I539c766112edce4a3f55d3aa0caac00d8d8c1cca
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list