os-brick/os_brick/local_dev
Sofia Enriquez 80f0bc4f5d LVM: Retry lv calls on segfault due to lvs failure
Follow-up to 0b2c0d9238b6f84a02fcd82f97bc5a2d9f681247 and I6824ba4f.

Sometimes we get an unexpected failure on the lvs command where it exits
with code 139, which is not one of the 5 predefined ones in the code
ECMD_PROCESSED, ENO_SUCH_CMD, EINVALID_CMD_LINE, EINIT_FAILED, or
ECMD_FAILED.

Since the LVM code indicates that a retry can help, we'll retry on error
139 when calling ``get_lv_info``. Retry lvdisplay, lvs and lvcreate calls
on segfault.

In addition, we only need readonly mode for lvdisplay.

Co-Authored-By: Gorka Eguileor <geguileo@redhat.com>
Co-Authored-By: Eric Harney <eharney@redhat.com>
Closes-Bug: #1901783
Change-Id: I62fadd401591025ecf9f83fa095249008f75bbaa
2021-07-26 15:19:16 +00:00
..
__init__.py os-brick add cinder local_dev lvm code 2016-01-12 08:17:31 -08:00
lvm.py LVM: Retry lv calls on segfault due to lvs failure 2021-07-26 15:19:16 +00:00