Skip to content

Commit d37958a

Browse files
nikita-dubrovskiijlebon
authored andcommitted
Remove obsolete create_disk.sh
1 parent 57d158f commit d37958a

File tree

2 files changed

+3
-658
lines changed

2 files changed

+3
-658
lines changed

src/cmd-buildextend-metal

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,12 @@ EOF
3434
}
3535

3636
# Parse options
37-
hostkey=
3837
genprotimgvm=/data.secex/genprotimgvm.qcow2
3938
ignition_pubkey=
4039
rc=0
4140
build=
4241
force=
43-
options=$(getopt --options h --longoptions help,force,build:,hostkey:,genprotimgvm: -- "$@") || rc=$?
42+
options=$(getopt --options h --longoptions help,force,build:,genprotimgvm: -- "$@") || rc=$?
4443
[ $rc -eq 0 ] || {
4544
print_help
4645
exit 1
@@ -59,10 +58,6 @@ while true; do
5958
build=$2
6059
shift
6160
;;
62-
--hostkey)
63-
hostkey=$(realpath "$2")
64-
shift
65-
;;
6661
--genprotimgvm)
6762
genprotimgvm="$2"
6863
shift
@@ -156,13 +151,6 @@ fi
156151
img=${name}-${build}-${image_type}${image_suffix}.${basearch}.${image_format}
157152
path=${PWD}/${img}
158153

159-
ignition_platform_id="${image_type}"
160-
161-
# dasd and metal4k are different disk formats, but they're still metal
162-
if [ "${image_type}" = dasd ] || [ "${image_type}" = metal4k ]; then
163-
ignition_platform_id=metal
164-
fi
165-
166154
# We do some extra handling of the rootfs here; it feeds into size estimation.
167155
rootfs_type=$(jq -re .rootfs < "${image_json}")
168156

@@ -242,18 +230,15 @@ image_dynamic_yaml="${tmp_builddir}/image-dynamic.yaml"
242230
image_dynamic_json="${tmp_builddir}/image-dynamic.json"
243231
image_for_disk_json="${tmp_builddir}/image-for-disk.json"
244232
cat >"${image_dynamic_yaml}" << EOF
245-
# Used by create_disk.sh
246233
buildid: "${build}"
247234
imgid: "${img}"
248235
ostree-commit: "${commit}"
249-
# Used by both create_disk.sh and runvm-osbuild
250236
container-imgref: "${container_imgref}"
251237
deploy-via-container: "${deploy_via_container}"
252238
osname: "${name}"
253239
ostree-container: "${ostree_container}"
254240
ostree-ref: "${ref}"
255241
extra-kargs-string: "${extra_kargs}"
256-
# Used by runvm-osbuild
257242
image-type: "${image_type}"
258243
ostree-repo: "${ostree_repo}"
259244
metal-image-size: "${metal_image_size_mb}"
@@ -287,18 +272,8 @@ if [ "${OSBUILD_SUPPORTED:-}" != "" ] && [ "${COSA_USE_OSBUILD:-}" != "0" ]; the
287272
--mpp "/usr/lib/coreos-assembler/osbuild-manifests/coreos.osbuild.${basearch}.mpp.yaml" \
288273
--filepath "${path}.tmp" "${osbuild_extra_args[@]}"
289274
else
290-
runvm "${qemu_args[@]}" -- \
291-
/usr/lib/coreos-assembler/create_disk.sh \
292-
--config "${image_for_disk_json}" \
293-
--platform "${ignition_platform_id}" \
294-
--platforms-json "${platforms_json}" \
295-
"${disk_args[@]}"
296-
297-
# Now that we've created the image let's resize it to the desired
298-
# size for qemu (and all images based on it).
299-
if [[ $image_type == qemu ]]; then
300-
qemu-img resize "${path}.tmp" "${cloud_image_size_mb}M"
301-
fi
275+
echo "OSBUILD_SUPPORTED is not supported or COSA_USE_OSBUILD is unset"
276+
exit 1
302277
fi
303278

304279
if [[ $secure_execution -eq "1" ]]; then

0 commit comments

Comments
 (0)