Skip to content

Commit 8eed758

Browse files
authored
Merge pull request #1943 from AkihiroSuda/dev
hack/test-upgrade.sh: deflake
2 parents 1a72344 + c796f43 commit 8eed758

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -394,12 +394,6 @@ jobs:
394394
retry_on: error
395395
max_attempts: 3
396396
command: ./hack/test-upgrade.sh ${{ matrix.oldver }} ${{ github.sha }}
397-
- name: "Debug: ha.stdout.log"
398-
if: always()
399-
run: cat ~/.lima/test-upgrade/ha.stdout.log || true
400-
- name: "Debug: ha.stderr.log"
401-
if: always()
402-
run: cat ~/.lima/test-upgrade/ha.stderr.log || true
403397

404398
vz:
405399
name: "vz"

hack/test-upgrade.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ function uninstall_lima() {
3838
fi
3939
}
4040

41+
function show_lima_log() {
42+
tail -n 100 ~/.lima/"${LIMA_INSTANCE}"/*.log || true
43+
}
44+
4145
INFO "Uninstalling lima"
4246
uninstall_lima
4347

@@ -47,8 +51,12 @@ install_lima "${OLDVER}"
4751
export LIMA_INSTANCE="test-upgrade"
4852

4953
INFO "Creating an instance \"${LIMA_INSTANCE}\" with the old Lima"
50-
defer "limactl delete -f \"${LIMA_INSTANCE}\""
51-
limactl start --tty=false "${LIMA_INSTANCE}"
54+
defer "show_lima_log;limactl delete -f \"${LIMA_INSTANCE}\""
55+
# Lima older than v0.15.1 needs `-pdpe1gb` for stability: https://github.com/lima-vm/lima/pull/1487
56+
QEMU_SYSTEM_X86_64="qemu-system-x86_64 -cpu host,-pdpe1gb" limactl start --tty=false "${LIMA_INSTANCE}" || (
57+
show_lima_log
58+
exit 1
59+
)
5260
lima nerdctl info
5361

5462
image_name="lima-test-upgrade-containerd-${RANDOM}"

0 commit comments

Comments
 (0)