Skip to content

Commit 3ffd3c1

Browse files
committed
Fit the integration ControlPlane onto single-node kind
The Keystone integration job OOM-killed its Keystone pod (exit 137, CrashLoopBackOff). Two causes: the CR left infrastructure.{database,cache}.replicas unset, so the CRD default of 3 brought up a 3-node Galera MariaDB plus three Memcached pods; and Docker Desktop's containerd ships LimitNOFILE=infinity, so uWSGI pre-allocated multiple GiB per worker from the inherited ~1e9 fd limit and died within seconds of spawning (more memory does not help). Pin database.replicas and cache.replicas to 1 -- a single-instance non-Galera MariaDB and one Memcached pod -- and bump FORGE_REF to a828d6a, whose deploy-infra caps each kind node's containerd RLIMIT_NOFILE to 1048576 before any workload is scheduled. Together they let Keystone come up at its default 512Mi/2-worker footprint. Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Christian Berendt <berendt@osism.tech>
1 parent 7fa4baf commit 3ffd3c1

2 files changed

Lines changed: 30 additions & 5 deletions

File tree

test/integration/controlplane.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,20 @@ metadata:
66
namespace: openstack
77
spec:
88
openStackRelease: "2025.2"
9+
# Pin the operator-projected backing services to a single instance for the
10+
# single-node kind cluster. The CRD default for both is 3 (a 3-node Galera
11+
# MariaDB plus three Memcached pods, matching the production baseline), which
12+
# OOM-kills a single-node kind. database.replicas: 1 yields a single-instance
13+
# non-Galera MariaDB (the c5c3-operator derives Galera from replicas > 1);
14+
# cache.replicas: 1 a single Memcached pod. Only replicas is set here; the
15+
# operator defaulting webhook fills the clusterRef/database/secretRef/backend
16+
# references. database.replicas is immutable after creation, but CI recreates
17+
# the cluster on every run so that never bites here.
18+
infrastructure:
19+
database:
20+
replicas: 1
21+
cache:
22+
replicas: 1
923
services:
1024
keystone:
1125
replicas: 1

test/integration/deploy_keystone.sh

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,17 @@ set -euo pipefail
88

99
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1010

11-
# Pin forge to a known-good commit; forge is a fast-moving prototyping repo.
12-
FORGE_REF="${FORGE_REF:-35ef73ae48d6814270af1674370d60ae410efdc7}"
11+
# Track the latest forge main; forge is a fast-moving prototyping repo and we
12+
# deliberately do not pin to a commit. main caps each kind node's containerd
13+
# RLIMIT_NOFILE (default 1048576) inside deploy-infra before any workload is
14+
# scheduled. Docker Desktop's containerd ships LimitNOFILE=infinity, so pods
15+
# otherwise inherit an ~1e9 open-file limit and uWSGI (the Keystone API server)
16+
# pre-allocates multiple GiB per worker and is OOM-killed within seconds of
17+
# spawning; raising the memory limit does not help. The cap lets Keystone come
18+
# up at its default 512Mi/2-worker footprint. main also carries the single-node
19+
# backing-service defaults our controlplane.yaml relies on
20+
# (infrastructure.{database,cache}.replicas).
21+
FORGE_REF="${FORGE_REF:-main}"
1322
FORGE_DIR="${FORGE_DIR:-${TMPDIR:-/tmp}/opm-forge}"
1423

1524
NAMESPACE="${NAMESPACE:-openstack}"
@@ -30,10 +39,12 @@ fi
3039
# forge's own installer pins kind/kubectl into ${HOME}/.local/bin.
3140
if [[ ! -d "${FORGE_DIR}/.git" ]]; then
3241
git clone https://github.com/c5c3/forge.git "${FORGE_DIR}"
33-
else
34-
git -C "${FORGE_DIR}" fetch --quiet origin
3542
fi
36-
git -C "${FORGE_DIR}" checkout --quiet "${FORGE_REF}"
43+
# Fetch and check out the tip of ${FORGE_REF} (default: main) as a detached
44+
# HEAD, so a reused clone always advances to the latest commit instead of
45+
# staying on a stale local branch.
46+
git -C "${FORGE_DIR}" fetch --quiet origin "${FORGE_REF}"
47+
git -C "${FORGE_DIR}" checkout --quiet FETCH_HEAD
3748

3849
make -C "${FORGE_DIR}" install-test-deps
3950
export PATH="${HOME}/.local/bin:${PATH}"

0 commit comments

Comments
 (0)