提交 a523770c 编写于 作者: J John Ferlan

storage: Ignore block devices that fail format detection

https://bugzilla.redhat.com/show_bug.cgi?id=1276198

Prior to commit id '98322052' failure to saferead the block device would
cause an error to be logged and the device to be skipped while attempting
to discover/create a stable target path for a new LUN (NPIV).

This was because virStorageBackendSCSIFindLUs ignored errors from
processLU and virStorageBackendSCSINewLun.

Ignoring the failure allowed a multipath device with an "active" and
"ghost" to be present on the host with the "ghost" block device being
ignored. This patch will return a -2 to the caller indicating the desire
to ignore the block device since it cannot be used directly rather than
fail the pool startup.
上级 b3df72c4
...@@ -224,8 +224,10 @@ virStorageBackendSCSINewLun(virStoragePoolObjPtr pool, ...@@ -224,8 +224,10 @@ virStorageBackendSCSINewLun(virStoragePoolObjPtr pool,
goto cleanup; goto cleanup;
} }
if (virStorageBackendUpdateVolInfo(vol, true, /* Allow a volume read failure to ignore or skip this block file */
VIR_STORAGE_VOL_OPEN_DEFAULT, 0) < 0) if ((retval = virStorageBackendUpdateVolInfo(vol, true,
VIR_STORAGE_VOL_OPEN_DEFAULT,
VIR_STORAGE_VOL_READ_NOERROR)) < 0)
goto cleanup; goto cleanup;
if (!(vol->key = virStorageBackendSCSISerial(vol->target.path))) if (!(vol->key = virStorageBackendSCSISerial(vol->target.path)))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册