From 6db364087304b10e71fbf5742bbc62bcaafc02c6 Mon Sep 17 00:00:00 2001 From: Tom Weininger Date: Mon, 25 Jul 2022 16:04:53 +0200 Subject: [PATCH] Fix stat error in periodic image build job Currently the publish-openstack-octavia-amphora-image-centos-9-stream shows this error, even though the job itself seems to succeed: [1] 2022-07-25 02:21:52.929693 | centos-9-stream | Successfully built the amphora image using amphora-agent from the master branch. 2022-07-25 02:21:52.931356 | centos-9-stream | stat: cannot statx '/home/zuul/test-images/test-only-amphora-x64-haproxy-centos-9-stream.qcow2.qcow2': No such file or directory 2022-07-25 02:21:52.931640 | centos-9-stream | Amphora image size: [1]: https://storage.bhs.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_741/periodic/opendev.org/openstack/octavia/master/publish-openstack-octavia-amphora-image-centos-9-stream/7414761/job-output.txt Story: 2010187 Task: 45876 Change-Id: I4600bade69f27c670e58077ded5b7646d2e3f786 --- diskimage-create/diskimage-create.sh | 6 +++--- ...dd-file-extension-to-default-34eeaa97b788cc67.yaml | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/diskimage-create-add-file-extension-to-default-34eeaa97b788cc67.yaml diff --git a/diskimage-create/diskimage-create.sh b/diskimage-create/diskimage-create.sh index e3ef092513..e0ef9472c8 100755 --- a/diskimage-create/diskimage-create.sh +++ b/diskimage-create/diskimage-create.sh @@ -32,7 +32,7 @@ usage() { echo " [-k ]" echo " [-l ]" echo " [-n]" - echo " [-o **amphora-x64-haproxy** | ]" + echo " [-o **amphora-x64-haproxy.qcow2** | ]" echo " [-p]" echo " [-r ]" echo " [-s **2** | ]" @@ -243,7 +243,7 @@ elif [ "${AMP_BASEOS}" = "fedora" ]; then export DIB_RELEASE=${AMP_DIB_RELEASE:-"28"} fi -AMP_OUTPUTFILENAME=${AMP_OUTPUTFILENAME:-"$PWD/amphora-x64-haproxy"} +AMP_OUTPUTFILENAME=${AMP_OUTPUTFILENAME:-"$PWD/amphora-x64-haproxy.qcow2"} AMP_IMAGETYPE=${AMP_IMAGETYPE:-"qcow2"} @@ -520,4 +520,4 @@ if [ -z "$DIB_REPOREF_amphora_agent" ]; then else echo "Successfully built the amphora using the $DIB_REPOREF_amphora_agent amphora-agent." fi -echo "Amphora image size: `stat -c "%n %s" $AMP_OUTPUTFILENAME.$AMP_IMAGETYPE`" +echo "Amphora image size: `stat -c "%n %s" $AMP_OUTPUTFILENAME`" diff --git a/releasenotes/notes/diskimage-create-add-file-extension-to-default-34eeaa97b788cc67.yaml b/releasenotes/notes/diskimage-create-add-file-extension-to-default-34eeaa97b788cc67.yaml new file mode 100644 index 0000000000..3449cf9f8d --- /dev/null +++ b/releasenotes/notes/diskimage-create-add-file-extension-to-default-34eeaa97b788cc67.yaml @@ -0,0 +1,11 @@ +--- +upgrade: + - | + The default for the output file has been changed in + diskimage-create.sh. It is now amphora-x64-haproxy.qcow2 instead of + amphora-x64-haproxy. +fixes: + - | + diskimage-create.sh used $AMP_OUTPUTFILENAME.$AMP_IMAGETYPE for + constructing the image file path when checking the file size, which was + not correct and caused an "No such file or directory" error.