Skip to content

Commit a148940

Browse files
committed
Fix remaining loop devices manipulations in NodeSetup E2Es
1 parent 183c53d commit a148940

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

test/e2e/set/nodeconfig/nodeconfig_disksetup.go

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -604,12 +604,6 @@ var _ = g.Describe("Node Setup", framework.Serial, func() {
604604
stdout, stderr, err := executeInPod(ctx, f.ClientConfig(), f.KubeClient().CoreV1(), clientPod, "xfs_repair", "-o", "force_geometry", "-f", "-n", devicePathInContainer)
605605
o.Expect(err).NotTo(o.HaveOccurred(), stdout, stderr)
606606

607-
framework.By("Getting the filesystem's block size")
608-
stdout, stderr, err = executeInPod(ctx, f.ClientConfig(), f.KubeClient().CoreV1(), clientPod, "stat", "--file-system", "--format=%s", devicePathInContainer)
609-
o.Expect(err).NotTo(o.HaveOccurred(), stdout, stderr)
610-
611-
blockSize := strings.TrimSpace(stdout)
612-
613607
framework.By("Corrupting the filesystem")
614608
stdout, stderr, err = executeInPod(ctx, f.ClientConfig(), f.KubeClient().CoreV1(), clientPod, "xfs_db", "-x", "-c", "blockget", "-c", "blocktrash -s 12345678 -n 1000", devicePathInContainer)
615609
o.Expect(err).NotTo(o.HaveOccurred(), stdout, stderr)
@@ -646,16 +640,8 @@ var _ = g.Describe("Node Setup", framework.Serial, func() {
646640
)
647641
o.Expect(err).NotTo(o.HaveOccurred())
648642

649-
framework.By("Overwriting the corrupted filesystem")
650-
stdout, stderr, err = executeInPod(ctx, f.ClientConfig(), f.KubeClient().CoreV1(), clientPod, "mkfs", "-t", string(scyllav1alpha1.XFSFilesystem), "-b", fmt.Sprintf("size=%s", blockSize), "-K", "-f", hostDevicePath)
651-
o.Expect(err).NotTo(o.HaveOccurred(), stdout, stderr)
652-
653-
framework.By("Zeroing XFS log")
654-
stdout, stderr, err = executeInPod(ctx, f.ClientConfig(), f.KubeClient().CoreV1(), clientPod, "xfs_repair", "-L", "-f", hostDevicePath)
655-
o.Expect(err).NotTo(o.HaveOccurred(), stdout, stderr)
656-
657-
framework.By("Verifying the filesystem's integrity")
658-
stdout, stderr, err = executeInPod(ctx, f.ClientConfig(), f.KubeClient().CoreV1(), clientPod, "xfs_repair", "-o", "force_geometry", "-f", "-n", hostDevicePath)
643+
framework.By("Repairing the corrupted filesystem")
644+
stdout, stderr, err = executeInPod(ctx, f.ClientConfig(), f.KubeClient().CoreV1(), clientPod, "xfs_repair", "-o", "force_geometry", "-f", devicePathInContainer)
659645
o.Expect(err).NotTo(o.HaveOccurred(), stdout, stderr)
660646

661647
framework.By("Waiting for NodeConfig to roll out")

0 commit comments

Comments
 (0)