VDDK >= 8 has a bug where if /sys/class/scsi_disk is missing, it will
crash when trying to scan for SAN mode. Detect what we think is the
possible combination of causes and emit a debug message warning about
this and suggesting that the user read the bug.
Unfortunately we have to do this as a debug message (not an error),
and we have to do it after forking, because we must wait until VDDK
has been loaded to get the VDDK version. Still, this is better than
nothing.
Thanks: Matthew Arnold, Nijin Ashok, Eric Blake
Related:
https://issues.redhat.com/browse/RHEL-54377
---
plugins/vddk/vddk.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c
index cf44e92cc6..3d8c223b23 100644
--- a/plugins/vddk/vddk.c
+++ b/plugins/vddk/vddk.c
@@ -481,6 +481,14 @@ static int
vddk_get_ready (void)
{
load_library (true);
+
+ /* Check for possible VDDK crash if /sys/class/scsi_disk is missing. */
+ if (library_version >= 8 && snapshot_moref && !transport_modes
&&
+ access ("/sys/class/scsi_disk", F_OK) == -1)
+ nbdkit_debug ("warning: if nbdkit crashes when you open a connection, "
+ "please read this link for workarounds: "
+ "https://issues.redhat.com/browse/RHEL-54377");
+
return 0;
}
--
2.46.0