Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions e2e/rbd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -674,14 +670,21 @@ var _ = Describe("RBD", func() {
e2elog.Failf("failed to poll: %v", err)
}

filePath := app.Spec.Containers[0].VolumeMounts[0].MountPath + "/test"
_, stdErr, err = execCommandInPod(
f,
fmt.Sprintf("echo 'Hello World' > %s", filePath),
app.Namespace,
&appOpt)
if err != nil || stdErr != "" {
e2elog.Failf("failed to write IO, err: %v, stdErr: %v ", err, stdErr)
// 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) {
pkalever marked this conversation as resolved.
Show resolved Hide resolved
filePath := app.Spec.Containers[0].VolumeMounts[0].MountPath + "/test"
_, stdErr, err = execCommandInPod(
f,
fmt.Sprintf("echo 'Hello World' > %s", filePath),
app.Namespace,
&appOpt)
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)
Expand Down