From 3a13fe291b53c7e6c784169ac77d5f3ea26ea577 Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Tue, 01 Dec 2026 20:10:28 +0000
Subject: [PATCH] Recognize recovered startup timeouts on rolling replication servers (#1354)

---
 .github/scripts/replication/selftest-disturb-scale.sh |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/.github/scripts/replication/selftest-disturb-scale.sh b/.github/scripts/replication/selftest-disturb-scale.sh
index a40a7f3..2985327 100755
--- a/.github/scripts/replication/selftest-disturb-scale.sh
+++ b/.github/scripts/replication/selftest-disturb-scale.sh
@@ -552,6 +552,26 @@
     grep -Fx 'dn: uid=scale-down-r0,ou=People,dc=example,dc=com' "$OUT/probe.ldif" >/dev/null || { echo 'batch lacks the RS write' >&2; exit 1; }
     if (FAIL_PROBE=1; scale_probe_batch d2 up d0 d1 r0); then echo 'failed batch accepted' >&2; exit 1; fi
   fi
+  # A dedicated RS also runs a DS for its administrative domains.
+  if [ "$topology-$mode" = rs534-kept ]; then (
+    . "$HERE/assert-converged.sh"
+    OUT="$OUT/rs-startup"; mkdir -p "$OUT/logs"
+    for n in $ALL_NODES; do : >"$OUT/$n.log"; done
+    errors_lines() { wc -l <"$OUT/$1.log"; }
+    since_mark() { cat "$OUT/$1.log"; }
+    printf '0\n' >"$OUT/logs/r0.mark"
+    local timeout='[t] category=SYNC severity=ERROR msgID=212 msg=Directory server DS(17231) timed out while connecting to replication server r0:8989 for domain "cn=admin data"'
+    local unrecovered=${timeout/cn=admin data/cn=schema}
+    start_server() {
+      [ "$1" = r0 ] || return 0
+      printf '%s\n' "$timeout" "$unrecovered" \
+        '[t] category=CORE severity=NOTICE msgID=135 msg=The Directory Server has started successfully' \
+        '[t] category=SYNC severity=NOTICE msgID=62 msg=Directory server DS(17231) has connected to replication server RS(32517) for domain "cn=admin data" at 172.18.0.18:8989 with generation ID 154864' >>"$OUT/r0.log"
+    }
+    bootstrap_ended() { return 0; }
+    scale_roll_pair d0 d1 "$FULL_PEERS" r0
+    [ "$(replication_errors r0)" = "$unrecovered" ] || { echo 'expected only the unrecovered RS startup timeout' >&2; exit 1; }
+  ); fi
 )
 check_checkpoint_budget() ( # <load end> <caught up at> <expected result> <expected time> [route change at]
   local caught_up_at=$2 switch_at=${5:-} result=0

--
Gitblit v1.10.0