aboutsummaryrefslogtreecommitdiffstats
path: root/vm/qemu
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2025-02-12 18:11:31 +0100
committerAleksandr Nogikh <nogikh@google.com>2025-02-13 09:36:31 +0000
commit9a42cf50b1a373c1ec83041da104162cb71b406a (patch)
treed99995d5794daa5eea45c7aba0cbd86d5ff509af /vm/qemu
parent2afad16efd9ec2029fe61dcd74d9d5154dce0f2e (diff)
vm/qemu: retry on Address already in use errors
The chance of port collision is very low, but still not 0. There's no reason to report an error on the first ocurrence of the problem, let it first retry 100 times.
Diffstat (limited to 'vm/qemu')
-rw-r--r--vm/qemu/qemu.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/vm/qemu/qemu.go b/vm/qemu/qemu.go
index 1371a9405..525e887be 100644
--- a/vm/qemu/qemu.go
+++ b/vm/qemu/qemu.go
@@ -353,6 +353,9 @@ func (pool *Pool) Create(workdir string, index int) (vmimpl.Instance, error) {
if i < 1000 && strings.Contains(err.Error(), "Device or resource busy") {
continue
}
+ if i < 1000 && strings.Contains(err.Error(), "Address already in use") {
+ continue
+ }
return nil, err
}
}