e2e: use io-timeout conditionally based on kernel version

We need
https://www.mail-archive.com/linux-block@vger.kernel.org/msg38060.html
inorder to use `--io-timeout=0`. This patch is part of kernel 5.4

Since minikube doesn't have a v5.4 kernel yet, lets use io-timeout value
conditionally based on kernel version at our e2e.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
This commit is contained in:
Prasanna Kumar Kalever
2021-08-23 18:40:22 +05:30
committed by mergify[bot]
parent 1bd2d46cdb
commit 55d3226d6b
2 changed files with 51 additions and 23 deletions

View File

@ -40,6 +40,28 @@ var nbdResizeSupport = []util.KernelVersion{
}, // standard 5.3+ versions
}
// To use `io-timeout=0` we need
// www.mail-archive.com/linux-block@vger.kernel.org/msg38060.html
// nolint:gomnd // numbers specify Kernel versions.
var nbdZeroIOtimeoutSupport = []util.KernelVersion{
{
Version: 5,
PatchLevel: 4,
SubLevel: 0,
ExtraVersion: 0,
Distribution: "",
Backport: false,
}, // standard 5.4+ versions
{
Version: 4,
PatchLevel: 18,
SubLevel: 0,
ExtraVersion: 305,
Distribution: ".el8",
Backport: true,
}, // CentOS 8.4
}
func imageSpec(pool, image string) string {
if radosNamespace != "" {
return pool + "/" + radosNamespace + "/" + image