Fix snapshot flake

Avoid "snapshot save already in progress" flake when snapshot reconcile from previous save is still in progress.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
pull/11498/head v1.32.0-rc1+k3s1
Brad Davidson 2024-12-20 01:26:18 +00:00 committed by Brad Davidson
parent f83cce95cf
commit 68fbd1a6b5
1 changed files with 2 additions and 0 deletions

View File

@ -149,8 +149,10 @@ var _ = Describe("Verify Create", Ordered, func() {
It("prunes s3 snapshots", func() { It("prunes s3 snapshots", func() {
_, err := e2e.RunCmdOnNode("k3s etcd-snapshot save", serverNodeNames[0]) _, err := e2e.RunCmdOnNode("k3s etcd-snapshot save", serverNodeNames[0])
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
time.Sleep(time.Second)
_, err = e2e.RunCmdOnNode("k3s etcd-snapshot save", serverNodeNames[0]) _, err = e2e.RunCmdOnNode("k3s etcd-snapshot save", serverNodeNames[0])
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
time.Sleep(time.Second)
res, err := e2e.RunCmdOnNode("k3s etcd-snapshot prune", serverNodeNames[0]) res, err := e2e.RunCmdOnNode("k3s etcd-snapshot prune", serverNodeNames[0])
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
// There should now be 4 on-demand snapshots - 2 local, and 2 on s3 // There should now be 4 on-demand snapshots - 2 local, and 2 on s3