Skip to content

Commit

Permalink
B #-: Fail if virt-sparsify hangs for 5m
Browse files Browse the repository at this point in the history
  • Loading branch information
xorel committed Nov 21, 2023
1 parent 9443f3c commit 613c158
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packer/postprocess.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -ex

timeout 5m virt-sysprep \
--add ${OUTPUT_DIR}/${APPLIANCE_NAME} \
Expand All @@ -8,8 +9,6 @@ timeout 5m virt-sysprep \
--run-command 'truncate -s0 -c /etc/machine-id' \
--delete /etc/resolv.conf

# virt-sparsify was haning sometimes
for I in 1 2 3; do
timeout 5m virt-sparsify \
--in-place ${OUTPUT_DIR}/${APPLIANCE_NAME} && break
done
# virt-sparsify hang badly sometimes, when this happends
# kill + start again
timeout -s9 5m virt-sparsify --in-place ${OUTPUT_DIR}/${APPLIANCE_NAME}

0 comments on commit 613c158

Please sign in to comment.