mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 22:30:23 +00:00
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:
parent
50e9dfa5c5
commit
c97b6432e3
11
e2e/rbd.go
11
e2e/rbd.go
@ -268,10 +268,6 @@ var _ = Describe("RBD", func() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
e2elog.Failf("failed to get the kernel version with error %v", err)
|
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() {
|
AfterEach(func() {
|
||||||
@ -674,6 +670,10 @@ var _ = Describe("RBD", func() {
|
|||||||
e2elog.Failf("failed to poll: %v", err)
|
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"
|
filePath := app.Spec.Containers[0].VolumeMounts[0].MountPath + "/test"
|
||||||
_, stdErr, err = execCommandInPod(
|
_, stdErr, err = execCommandInPod(
|
||||||
f,
|
f,
|
||||||
@ -683,6 +683,9 @@ var _ = Describe("RBD", func() {
|
|||||||
if err != nil || stdErr != "" {
|
if err != nil || stdErr != "" {
|
||||||
e2elog.Failf("failed to write IO, err: %v, stdErr: %v ", err, 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)
|
err = deletePVCAndApp("", f, pvc, app)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user