Timothy Asir has uploaded a new change for review. Change subject: Provides partial device details on any disk failure ......................................................................
Provides partial device details on any disk failure Storage devices list provides only a partial device details if it encounter any blivet UnusableConfigurationError occurs and there is no default option available to ignore such faulty devices. This leads missing device details for the remaining devices and unable to perform lvm tasks on the remaining devices. Change-Id: Idd92b49df10e35365868d243423e01cb3d84832b Signed-off-by: Timothy Asir Jeyasingh <[email protected]> Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1232275 --- M vdsm/gluster/storagedev.py 1 file changed, 19 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/35/42435/1 diff --git a/vdsm/gluster/storagedev.py b/vdsm/gluster/storagedev.py index eb8b103..01c9509 100644 --- a/vdsm/gluster/storagedev.py +++ b/vdsm/gluster/storagedev.py @@ -113,11 +113,30 @@ return True +# bz#1232261: Blivet provides partial device details on any disk failure +# Workaround: Till the bz gets fixed, We will fetch the faulty device +# details from the error message and ignore the device by adding the +# device details into blivet config ignored disks list. Currently blivet +# does not provide any other machanism to reterive faulty device name +# otherthen parsing and fetching it from the error message. +# _reset_blivet function will be called recursively so as to omit the +# faulty devices and to proceed further till to check and reterive the +# remaining devices detail +def _ignoreFaultyDevAndRetry(blivetEnv, e): + faultyBaseDev = '' + if e.message.startswith("failed to scan disk") or e.message.startswith( + "corrupt gpt disklabel on"): + faultyBaseDev = e.message.split()[-1] + blivetEnv.config.ignoredDisks += [faultyBaseDev] + _reset_blivet(blivetEnv) + + def _reset_blivet(blivetEnv): try: blivetEnv.reset() except (blivet.errors.UnusableConfigurationError, blivet.errors.StorageError) as e: + _ignoreFaultyDevAndRetry(blivetEnv, e) log.error("Error: %s" % e.message) -- To view, visit https://gerrit.ovirt.org/42435 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idd92b49df10e35365868d243423e01cb3d84832b Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Timothy Asir <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
