You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(e2e): wait for RAFT cluster convergence in HA db corruption test (#6348)
After OVN database corruption recovery, the RAFT cluster may not
immediately show all servers in `cluster/status` output even though
pods are ready and db files are healthy. This causes intermittent
failures in `getDbSidsFromClusterStatus()` when it asserts the server
count right after recovery.
Replace the immediate assertion with a WaitUntil poll (up to 30s) that
waits for all pods to report the expected number of servers before
proceeding with validation.
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
framework.ExpectNoError(err, fmt.Sprintf("failed to get ovn%s db status in pod %s: stdout = %q, stderr = %q", db, pod.Name, stdout, stderr))
140
-
status:=parseClusterStatus(stdout)
141
-
framework.ExpectHaveLen(status.Servers, len(pods.Items), "unexpected number of servers in ovn%s db status in pod %s: stdout = %q, stderr = %q", db, pod.Name, stdout, stderr)
}, fmt.Sprintf("ovn%s db on pod %s to show %d servers", db, pod.Name, expectedCount))
154
+
155
+
status:=parseClusterStatus(lastStdout)
156
+
framework.ExpectHaveLen(status.Servers, expectedCount, "unexpected number of servers in ovn%s db status in pod %s: stdout = %q, stderr = %q", db, pod.Name, lastStdout, lastStderr)
142
157
iflen(dbServers[db]) ==0 {
143
158
dbServers[db] =maps.Clone(status.Servers)
144
159
} else {
145
-
framework.ExpectEqual(status.Servers, dbServers[db], "inconsistent servers in ovn%s db status in pod %s: stdout = %q, stderr = %q", db, pod.Name, stdout, stderr)
160
+
framework.ExpectEqual(status.Servers, dbServers[db], "inconsistent servers in ovn%s db status in pod %s: stdout = %q, stderr = %q", db, pod.Name, lastStdout, lastStderr)
0 commit comments