From 8953d5bf2aacf8492063754c72c84f961620c2aa Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Sun, 14 Nov 2021 16:24:50 +0530 Subject: [PATCH] cleanup: test commit to see some random enryption CI failure With rbd-nbd tests we are seeing: Nov 14 09:48:20.839: INFO: ExecWithOptions {Command:[/bin/sh -c lsblk -o TYPE,MOUNTPOINT | grep '/var/lib/www/html' | awk '{print $1}'] Namespace:rbd-1318 PodName:csi-rbd-demo-pod ContainerName:web-server Stdin: CaptureStdout:true CaptureStderr:true PreserveWhitespace:true Quiet:false} Nov 14 09:48:20.839: INFO: >>> kubeConfig: /root/.kube/config Nov 14 09:48:20.932: FAIL: failed to validate encrypted pvc with error not equal to crypt reordering rbd-nbd encryption tests TEST-ONLY!!! Signed-off-by: Prasanna Kumar Kalever --- e2e/rbd.go | 74 +++++++++++++++++++++++++++--------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/e2e/rbd.go b/e2e/rbd.go index d0cf74f9bba4..a547b3956edf 100644 --- a/e2e/rbd.go +++ b/e2e/rbd.go @@ -707,43 +707,6 @@ var _ = Describe("RBD", func() { } }) - By("create a PVC and bind it to an app using rbd-nbd mounter with encryption", func() { - err := deleteResource(rbdExamplePath + "storageclass.yaml") - if err != nil { - e2elog.Failf("failed to delete storageclass with error %v", err) - } - // Storage class with rbd-nbd mounter - err = createRBDStorageClass( - f.ClientSet, - f, - defaultSCName, - nil, - map[string]string{ - "mounter": "rbd-nbd", - "mapOptions": nbdMapOptions, - "cephLogStrategy": e2eDefaultCephLogStrategy, - "encrypted": "true", - }, - deletePolicy) - if err != nil { - e2elog.Failf("failed to create storageclass with error %v", err) - } - err = validateEncryptedPVCAndAppBinding(pvcPath, appPath, noKMS, f) - if err != nil { - e2elog.Failf("failed to validate encrypted pvc with error %v", err) - } - // validate created backend rbd images - validateRBDImageCount(f, 0, defaultRBDPool) - err = deleteResource(rbdExamplePath + "storageclass.yaml") - if err != nil { - e2elog.Failf("failed to delete storageclass with error %v", err) - } - err = createRBDStorageClass(f.ClientSet, f, defaultSCName, nil, nil, deletePolicy) - if err != nil { - e2elog.Failf("failed to create storageclass with error %v", err) - } - }) - By("create a PVC and bind it to an app with encrypted RBD volume", func() { err := deleteResource(rbdExamplePath + "storageclass.yaml") if err != nil { @@ -1101,6 +1064,43 @@ var _ = Describe("RBD", func() { }, ) + By("create a PVC and bind it to an app using rbd-nbd mounter with encryption", func() { + err := deleteResource(rbdExamplePath + "storageclass.yaml") + if err != nil { + e2elog.Failf("failed to delete storageclass with error %v", err) + } + // Storage class with rbd-nbd mounter + err = createRBDStorageClass( + f.ClientSet, + f, + defaultSCName, + nil, + map[string]string{ + "mounter": "rbd-nbd", + "mapOptions": nbdMapOptions, + "cephLogStrategy": e2eDefaultCephLogStrategy, + "encrypted": "true", + }, + deletePolicy) + if err != nil { + e2elog.Failf("failed to create storageclass with error %v", err) + } + err = validateEncryptedPVCAndAppBinding(pvcPath, appPath, noKMS, f) + if err != nil { + e2elog.Failf("failed to validate encrypted pvc with error %v", err) + } + // validate created backend rbd images + validateRBDImageCount(f, 0, defaultRBDPool) + err = deleteResource(rbdExamplePath + "storageclass.yaml") + if err != nil { + e2elog.Failf("failed to delete storageclass with error %v", err) + } + err = createRBDStorageClass(f.ClientSet, f, defaultSCName, nil, nil, deletePolicy) + if err != nil { + e2elog.Failf("failed to create storageclass with error %v", err) + } + }) + By("create a PVC clone and bind it to an app", func() { // snapshot beta is only supported from v1.17+ if k8sVersionGreaterEquals(f.ClientSet, 1, 17) {