e2e: use exclusive-lock together with lock_on_read

When using `lock_on_read`, the RBD image needs to have the
`exclusive-lock` feature enabled too.

Fixes: #3221
Signed-off-by: Niels de Vos <ndevos@redhat.com>
(cherry picked from commit 2df55a55a3)
This commit is contained in:
Niels de Vos 2022-06-29 09:37:50 +02:00 committed by mergify[bot]
parent 137adbf303
commit 6fd0e19ef7

View File

@ -3266,8 +3266,9 @@ var _ = Describe("RBD", func() {
e2elog.Failf("failed to delete storageclass: %v", err) e2elog.Failf("failed to delete storageclass: %v", err)
} }
err = createRBDStorageClass(f.ClientSet, f, defaultSCName, nil, map[string]string{ err = createRBDStorageClass(f.ClientSet, f, defaultSCName, nil, map[string]string{
"mapOptions": "lock_on_read,queue_depth=1024", "imageFeatures": "exclusive-lock",
"unmapOptions": "force", "mapOptions": "lock_on_read,queue_depth=1024",
"unmapOptions": "force",
}, deletePolicy) }, deletePolicy)
if err != nil { if err != nil {
e2elog.Failf("failed to create storageclass: %v", err) e2elog.Failf("failed to create storageclass: %v", err)