[PATCH compass-ci] providers: qemu/kvm.sh check kernel file exists

26 Dec
2020
26 Dec
'20
9:17 a.m.
[why] if os_http not working, the kernel file will can't be download or the size is 0, then the qemu-kvm will boot by pxe, the vm will request the next job again. Signed-off-by: Xiao Shenwei <xiaoshenwei96@163.com> --- providers/qemu/kvm.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/providers/qemu/kvm.sh b/providers/qemu/kvm.sh index b9f5716..fe2345f 100755 --- a/providers/qemu/kvm.sh +++ b/providers/qemu/kvm.sh @@ -51,6 +51,11 @@ do #done < /tftpboot/boot.ipxe-centos done < $ipxe_script +[ -s "$kernel" ] || { + echo "can't get kernel or kernel size is 0" + exit +} + [ -n "$initrds" ] || { exit } -- 2.23.0
1523
Age (days ago)
1523
Last active (days ago)
0 comments
1 participants
participants (1)
-
Xiao Shenwei