Skip to content

Commit

Permalink
Remove "san" from VDDK transports list.
Browse files Browse the repository at this point in the history
Some versions of the VDDK crash when determining system support for its
"san" transport mode, if there are no SCSI disks present. This transport
mode is active by default, and is not used by CDI, so avoid the crash by
setting the list of allowable transports to not include "san".

Signed-off-by: Matthew Arnold <[email protected]>
  • Loading branch information
mrnold authored and kubevirt-bot committed Aug 20, 2024
1 parent bfd0000 commit 614a0fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/image/nbdkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ func NewNbdkitVddk(nbdkitPidFile, socket string, args NbdKitVddkPluginArgs) (Nbd
}
if args.Snapshot != "" {
pluginArgs = append(pluginArgs, "snapshot="+args.Snapshot)
pluginArgs = append(pluginArgs, "transports=file:nbdssl:nbd")
}
pluginArgs = append(pluginArgs, "--verbose")
pluginArgs = append(pluginArgs, "-D", "nbdkit.backend.datapath=0")
Expand Down
2 changes: 1 addition & 1 deletion tools/vddk-test/vddk-test-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void fakevddk_close(void *handle) {
int fakevddk_config(const char *key, const char *value) {
arg_count++;
if (strcmp(key, "snapshot") == 0) {
expected_arg_count = 8;
expected_arg_count = 9; // Expect one for 'snapshot' and one for 'transports'
}
return 0;
}
Expand Down

0 comments on commit 614a0fa

Please sign in to comment.