Skip to content

Commit 502f8a5

Browse files
committed
gcp: use disk.raw naming at disk upload
otherwise it fails with: The file inside the tar archive was named ''podvm.raw''. It should be named ''disk.raw'' Signed-off-by: Snir Sheriber <[email protected]>
1 parent 9007527 commit 502f8a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/peerpods/podvm/gcp-podvm-image-handler.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ function create_image_from_prebuilt_artifact() {
154154

155155
echo "Compacting ${RAW_IMAGE_PATH} into /tmp/${IMAGE_NAME}.tar.gz"
156156

157-
# TAR the raw image (GCP expects a compressed archive)
158-
tar -cvzf "/tmp/${IMAGE_NAME}.tar.gz" -C "$(dirname "${RAW_IMAGE_PATH}")" "$(basename "${RAW_IMAGE_PATH}")" ||
157+
# TAR the raw image (GCP expects a compressed archive with disk.raw named file)
158+
tar -cvzf "/tmp/${IMAGE_NAME}.tar.gz" -C "$(dirname "${RAW_IMAGE_PATH}")" --transform="s|$(basename "${RAW_IMAGE_PATH}")|disk.raw|" "$(basename "${RAW_IMAGE_PATH}")" ||
159159
error_exit "Failed to create tarball for GCP"
160160

161161
# Create bucket if doesn't exist

0 commit comments

Comments
 (0)