Skip to content

Commit 3fa24ec

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

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

test/e2e/set/nodeconfig/nodeconfig_disksetup.go

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ var _ = g.Describe("Node Setup", framework.Serial, func() {
530530
}),
531531
)
532532

533-
g.It("should successfully start a failed mount unit with a corrupted filesystem when it's overwritten with a clean one", func(ctx context.Context) {
533+
g.FIt("should successfully start a failed mount unit with a corrupted filesystem when it's overwritten with a clean one", func(ctx context.Context) {
534534
o.Expect(matchingNodes).NotTo(o.BeEmpty())
535535
o.Expect(matchingNodes[0]).NotTo(o.BeNil())
536536
nodeUnderTest := matchingNodes[0]
@@ -607,7 +607,6 @@ var _ = g.Describe("Node Setup", framework.Serial, func() {
607607
framework.By("Getting the filesystem's block size")
608608
stdout, stderr, err = executeInPod(ctx, f.ClientConfig(), f.KubeClient().CoreV1(), clientPod, "stat", "--file-system", "--format=%s", devicePathInContainer)
609609
o.Expect(err).NotTo(o.HaveOccurred(), stdout, stderr)
610-
611610
blockSize := strings.TrimSpace(stdout)
612611

613612
framework.By("Corrupting the filesystem")
@@ -647,16 +646,10 @@ var _ = g.Describe("Node Setup", framework.Serial, func() {
647646
o.Expect(err).NotTo(o.HaveOccurred())
648647

649648
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)
659-
o.Expect(err).NotTo(o.HaveOccurred(), stdout, stderr)
649+
o.Eventually(func(g o.Gomega) {
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+
g.Expect(err).NotTo(o.HaveOccurred(), stdout, stderr)
652+
}).WithPolling(time.Second * 10).WithTimeout(time.Minute * 3).Should(o.Succeed())
660653

661654
framework.By("Waiting for NodeConfig to roll out")
662655
ctx3, ctx3Cancel := context.WithTimeout(ctx, nodeConfigRolloutTimeout)

0 commit comments

Comments
 (0)