Repository navigation
feat: integrate nested KVM and support legacy v9 snapshot recovery #358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -33,6 +33,23 @@ permissions: | |||||||||||||||||||||||||||||||||||
| packages: read | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||
| nestedvirt-tools: | ||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||
| timeout-minutes: 10 | ||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||
|
Comment on lines
+36
to
+39
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggestion:
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added timeout-minutes: 10 to nestedvirt-tools in a436054. I checked the actual prior job: it succeeded in 7 seconds, and no hang was observed. The 10-minute limit is a bounded resource-protection measure with ample allowance for checkout and Python setup, replacing the 360-minute default for this lightweight job only. The existing per-request/readiness/process timeouts remain unchanged.
Comment on lines
+36
to
+39
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggestion:
Suggested change
|
||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v6 | ||||||||||||||||||||||||||||||||||||
| - uses: actions/setup-python@v7 | ||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||
| python-version: "3.12" | ||||||||||||||||||||||||||||||||||||
| - name: Check nested KVM smoke syntax | ||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||
| python3 -m py_compile scripts/tests/nestedvirt-smoke.py | ||||||||||||||||||||||||||||||||||||
| sh -n scripts/tests/nestedvirt-guest.sh | ||||||||||||||||||||||||||||||||||||
| - name: Verify real fixture rebuild | ||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||
| python3 scripts/tests/nestedvirt-smoke.py check-fixture | ||||||||||||||||||||||||||||||||||||
| python3 -O scripts/tests/nestedvirt-smoke.py check-fixture | ||||||||||||||||||||||||||||||||||||
|
Comment on lines
+48
to
+51
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggestion:
Suggested change
Comment on lines
+48
to
+51
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Comment on lines
+48
to
+51
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggestion:
Suggested change
Comment on lines
+48
to
+51
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| agentenv-tests: | ||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| #!/bin/sh | ||
| # Copyright 2026 AgentENV contributors. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| set -eu | ||
| mode=${1:-fixture-init} | ||
| if [ "$#" -gt 0 ]; then shift; fi | ||
| case "$mode" in | ||
| fixture-init) | ||
| while true; do /bin/busybox sleep 3600; done | ||
|
Comment on lines
+8
to
+9
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| ;; | ||
| inner-init) | ||
| /bin/busybox mount -t proc proc /proc | ||
| /bin/busybox mount -t sysfs sysfs /sys | ||
| n=0 | ||
| while true; do | ||
| echo "INNER_TICK=$n" | ||
| n=$((n+1)) | ||
| /bin/busybox sleep 1 | ||
| done | ||
| ;; | ||
| start-inner) | ||
| /bin/busybox ip link set lo up | ||
| exec /usr/bin/qemu-system-x86_64 -machine microvm,accel=kvm -cpu host \ | ||
| -m 128 -smp 1 -nodefaults -no-reboot -nographic -serial stdio \ | ||
| -qmp tcp:127.0.0.1:4444,server=on,wait=off \ | ||
| -kernel /inner-bzImage -initrd /inner.cpio \ | ||
| -append 'console=ttyS0 panic=1 rdinit=/init' "$@" | ||
| ;; | ||
| stop-inner) | ||
| pid=$(/bin/busybox cat "${1:?PID_FILE}") | ||
| test "$(/bin/busybox readlink /proc/"$pid"/exe)" = /usr/bin/qemu-system-x86_64 | ||
| kill -TERM "$pid" | ||
| attempt=0 | ||
| while kill -0 "$pid" 2>/dev/null; do | ||
| processes=$(/bin/busybox ps -o pid,stat) | ||
| state=$(printf '%s\n' "$processes" | /bin/busybox awk -v target="$pid" '$1 == target {print $2}') | ||
| case "$state" in Z*|"") break ;; esac | ||
| attempt=$((attempt + 1)) | ||
| test "$attempt" -lt 100 | ||
| /bin/busybox sleep 0.1 | ||
| done | ||
| echo "QEMU_STOPPED=$pid" | ||
| ;; | ||
| *) echo "Unknown guest operation: $mode" >&2; exit 2 ;; | ||
| esac | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow runs on both
pushandpull_request, but has no workflow-level concurrency group. Each update can therefore leave an older run executing alongside the newer one, duplicating the fixture checks and the other integration jobs; add a group keyed by workflow and ref (withcancel-in-progress: trueif superseded runs are not needed).Suggestion: