# # # The contents of this file are subject to the terms of the Common Development and # Distribution License (the License). You may not use this file except in compliance with the # License. # # You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the # specific language governing permission and limitations under the License. # # When distributing Covered Software, include this CDDL Header Notice in each file and include # the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL # Header, with the fields enclosed by brackets [] replaced by your own identifying # information: "Portions copyright [year] [name of copyright owner]". # # Copyright 2026 3A Systems, LLC. # The load of the replication convergence run (#1090), sourced by run.sh: every directory # server is written to at once, for DURATION seconds, by rate tools that run in containers of # the same image on the network of the topology. Only writes: a read sends nothing to the # replication servers. A directory server a disturbance takes down (#1208) is written to before # it and after it, by clients of their own; replication servers it takes down leave the clients # be, and the directory servers write through the replication server still up. # ... : a container that runs one tool of the image against one server start_client() { local name=$1 tool=$2 shift 2 if [ -n "${ROLLING_END_MS:-}" ]; then # The container enforces the absolute deadline as well as the host watchdog: it # cannot start a late operation if Docker finishes creating it after the watchdog scan. docker run -d --name "$name" --network "$NETWORK" -e OPENDJ_JAVA_ARGS="$CLIENT_JAVA_ARGS" \ -v "$OUT/load:/load:ro" --entrypoint /bin/sh "$IMAGE" -c ' deadline=$1; tool=$2; shift 2 left=$((deadline - $(date +%s))) [ "$left" -gt 0 ] || exit 1 exec /usr/bin/timeout "$left" "/opt/opendj/bin/$tool" "$@" ' sh "$((ROLLING_END_MS / 1000))" "$tool" "$@" >/dev/null else docker run -d --name "$name" --network $NETWORK -e OPENDJ_JAVA_ARGS="$CLIENT_JAVA_ARGS" \ -v "$OUT/load:/load:ro" --entrypoint /opt/opendj/bin/$tool "$IMAGE" "$@" >/dev/null fi } CLIENTS= # seconds between two lines of the output of a rate tool STAT_INTERVAL=10 # The clients of one directory server for of the load, a modrate and an addrate. # Segment 1 starts with the load; a later one once a disturbance let the server serve again, # and it adds entries of its own: the 100 newest of the segment before are still there. # Plain LDAP: the run is after the changes the replication carries, and TLS between a client # and its server only takes CPU from them. --noRebind: every client keeps its connections open # and binds once, as an application does, rather than connecting and binding for every # operation, which would cost more than the operation itself. --connectTimeout: the clients # start at once next to the servers, and a runner that is short of CPU for a while accepts # their connections late start_clients() { # local n=$1 name=$1 c surname=AddRate local -a addrate_options=() case ${DISTURBANCE:-none} in # Purging a segment at shutdown can take longer than the segment itself. # FIFO deletes remain enabled; cycle each DS across three indexed shards. scale-*) surname="AddRate-$n-$((($2 - 1) % 3 + 1))"; addrate_options=(--noPurge) ;; esac [ "$2" -eq 1 ] || name=$1-$2 [ ! -e "$OUT/load/deadline" ] || return 1 # entries of its own on each server, so that the adds and deletes of two servers never meet # on one DN: a naming conflict is not what this load is after cat >"$OUT/load/addrate-$name.template" <