Skip to content

Commit fb3741c

Browse files
committed
Update e2e workflow and runtime configurations
- Reduced timeout settings for e2e jobs to optimize execution time. - Added a step to free up disk space in the e2e workflow to prevent potential issues during tests. - Installed rsyslog in the Kata Dockerfile to enable proper error logging. - Updated entrypoint script to start rsyslogd if available, enhancing error reporting capabilities. - Adjusted E2E_TIMEOUT in the verification script for more efficient test execution.
1 parent d846bc3 commit fb3741c

4 files changed

Lines changed: 19 additions & 6 deletions

File tree

.github/workflows/e2e.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
jobs:
1212
e2e:
1313
runs-on: ubuntu-latest
14-
timeout-minutes: 45
14+
timeout-minutes: 20
1515
steps:
1616
- name: Check out repository
1717
uses: actions/checkout@v4
@@ -21,6 +21,11 @@ jobs:
2121
with:
2222
go-version-file: go.mod
2323

24+
- name: Free disk space
25+
run: |
26+
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
27+
df -h /
28+
2429
- name: Install kind
2530
run: |
2631
curl -fsSL -o ./kind "https://kind.sigs.k8s.io/dl/v0.27.0/kind-linux-amd64"
@@ -58,7 +63,7 @@ jobs:
5863

5964
e2e-kata:
6065
runs-on: ubuntu-latest
61-
timeout-minutes: 60
66+
timeout-minutes: 20
6267
steps:
6368
- name: Check out repository
6469
uses: actions/checkout@v4
@@ -121,8 +126,6 @@ jobs:
121126
if: steps.kvm.outputs.available == 'true'
122127
env:
123128
CLUSTER_NAME: sandboxfleet-kata
124-
# Lifecycle test itself is 5m; keep suite budget tight for kata.
125-
E2E_TIMEOUT: 12m
126129
run: ./hack/verify-e2e.sh
127130

128131
- name: Collect e2e diagnostics

build/runtimes/kata/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ FROM ${BASE_IMAGE}
1010
ARG TARGETARCH
1111
ARG KATA_VERSION
1212

13+
# rsyslog: kata-shim reports failures via syslog; without /dev/log the real
14+
# error is masked as "Unix syslog delivery error: unknown".
1315
RUN apt-get update \
1416
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
1517
zstd \
18+
rsyslog \
1619
&& rm -rf /var/lib/apt/lists/*
1720

1821
RUN case "${TARGETARCH}" in \

build/worker/entrypoint.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ set -eu
33

44
mkdir -p /var/lib/containerd /run/containerd /opt/cni/bin /etc/cni/net.d
55

6+
# Optional: present only on the Kata Worker image. Lets kata-shim log real errors.
7+
if command -v rsyslogd >/dev/null 2>&1; then
8+
mkdir -p /var/run
9+
rsyslogd
10+
fi
11+
612
# Nested sandboxes need forwarding + NAT through the Worker Pod network.
713
if [ -w /proc/sys/net/ipv4/ip_forward ]; then
814
echo 1 >/proc/sys/net/ipv4/ip_forward

hack/verify-e2e.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -euo pipefail
44
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
55
CLUSTER_NAME="${CLUSTER_NAME:-sandboxfleet}"
66
E2E_KUBE_CONTEXT="${E2E_KUBE_CONTEXT:-kind-${CLUSTER_NAME}}"
7-
E2E_TIMEOUT="${E2E_TIMEOUT:-20m}"
7+
E2E_TIMEOUT="${E2E_TIMEOUT:-10m}"
88
KUBECONFIG="${KUBECONFIG:-${ROOT}/bin/KUBECONFIG}"
99

1010
need() {
@@ -41,6 +41,7 @@ export E2E_KUBE_CONTEXT
4141
export E2E_RUNTIME_HANDLER="${E2E_RUNTIME_HANDLER:-runsc}"
4242

4343
echo "Running e2e against kubeconfig=${KUBECONFIG} context=${E2E_KUBE_CONTEXT} handler=${E2E_RUNTIME_HANDLER}..."
44-
go test ./test/e2e/ -tags=e2e -count=1 -v -timeout="${E2E_TIMEOUT}"
44+
# -failfast: first failure (e.g. lifecycle timeout) aborts the rest of the suite.
45+
go test ./test/e2e/ -tags=e2e -count=1 -v -failfast -timeout="${E2E_TIMEOUT}"
4546

4647
echo "E2E tests passed."

0 commit comments

Comments
 (0)