Skip to content

Commit e349bba

Browse files
authored
Wait for nbd partition to exist before continuing (#97)
1 parent e045831 commit e349bba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

environment/image_recipes/bare_metal/bare_metal.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"s3_bucket": "tailor-artifacts",
2020
"disk_size": "15",
2121

22-
"iso_image": ""
22+
"iso_image": "",
23+
"nbd_wait_timeout": "60"
2324
},
2425

2526
"builders": [
@@ -118,6 +119,7 @@
118119
"inline": [
119120
"echo 'Resize image'",
120121
"qemu-nbd -c /dev/nbd0 images/{{user `image_name`}}.qcow2",
122+
"timeout {{user `nbd_wait_timeout` }} bash -c \"while [ ! -b '/dev/nbd0p1' ]; do echo 'Waiting for nbd0p1 to be ready'; sleep 1; done\"",
121123
"e2fsck -y -f /dev/nbd0p1",
122124
"resize2fs /dev/nbd0p1 -M",
123125
"qemu-nbd -d /dev/nbd0",

0 commit comments

Comments
 (0)