Yaniv Bronhaim 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/1181678
Signed-off-by: Nir Soffer <[email protected]>
Reviewed-on: http://gerrit.ovirt.org/36352
Reviewed-by: Allon Mureinik <[email protected]>
Reviewed-by: Federico Simoncelli <[email protected]>
Reviewed-on: http://gerrit.ovirt.org/36782
Tested-by: Allon Mureinik <[email protected]>
Reviewed-by: Yaniv Bronhaim <[email protected]>
---
M vdsm/storage/lvm.py
1 file changed, 9 insertions(+), 0 deletions(-)

Approvals:
  Yaniv Bronhaim: Looks good to me, approved
  Federico Simoncelli: Looks good to me, but someone else must approve
  Allon Mureinik: Verified; Looks good to me, but someone else must approve



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I539c766112edce4a3f55d3aa0caac00d8d8c1cca
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Nir Soffer <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: [email protected]
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to