e2e: restrict IO with lower version kernel at rbd-nbd tests

Currently, at "perform IO on rbd-nbd volume after nodeplugin restart"
test we are performing write on the rbd-nbd based mount after nodeplugin
restart. But due to a bug in NBD driver the writes are failing, please
note NBD zero cmd timeout handling is fixed with kernel >= 5.4 and hence
we should defend on writes based on kernel version to avoid unnecessary
CI failures.

For more information see
https://github.com/ceph/ceph-csi/issues/2204#issuecomment-930941047

updates: #2204
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
This commit is contained in:
Prasanna Kumar Kalever 2021-11-09 17:15:06 +05:30 committed by mergify[bot]
parent 50e9dfa5c5
commit c97b6432e3

View File

@ -268,10 +268,6 @@ var _ = Describe("RBD", func() {
if err != nil {
e2elog.Failf("failed to get the kernel version with error %v", err)
}
// default io-timeout=0, needs kernel >= 5.4
if !util.CheckKernelSupport(kernelRelease, nbdZeroIOtimeoutSupport) {
nbdMapOptions = "debug-rbd=20,io-timeout=330"
}
})
AfterEach(func() {
@ -674,6 +670,10 @@ var _ = Describe("RBD", func() {
e2elog.Failf("failed to poll: %v", err)
}
// Writes on kernel < 5.4 are failing due to a bug in NBD driver,
// NBD zero cmd timeout handling is fixed with kernel >= 5.4
// see https://github.com/ceph/ceph-csi/issues/2204#issuecomment-930941047
if util.CheckKernelSupport(kernelRelease, nbdZeroIOtimeoutSupport) {
filePath := app.Spec.Containers[0].VolumeMounts[0].MountPath + "/test"
_, stdErr, err = execCommandInPod(
f,
@ -683,6 +683,9 @@ var _ = Describe("RBD", func() {
if err != nil || stdErr != "" {
e2elog.Failf("failed to write IO, err: %v, stdErr: %v ", err, stdErr)
}
} else {
e2elog.Logf("kernel %q does not meet recommendation, skipping IO test", kernelRelease)
}
err = deletePVCAndApp("", f, pvc, app)
if err != nil {