Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/cmd-osbuild
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,12 @@ main() {
else
cmd="runvm_with_cache"
fi
$cmd -- /usr/lib/coreos-assembler/runvm-osbuild \

# To get a shell in the osbuild supermin VM uncomment this.
# osbuild can be started with `bash tmp/build.<artifact>/cmd.sh`
# See comment about checkpoints in runvm-osbuild
# RUNVM_SHELL=1 \
$cmd -- /usr/lib/coreos-assembler/runvm-osbuild \
--config "${runvm_osbuild_config_json}" \
--mpp "/usr/lib/coreos-assembler/osbuild-manifests/coreos.osbuild.${basearch}.mpp.yaml" \
--outdir "${outdir}" \
Expand Down
7 changes: 6 additions & 1 deletion src/runvm-osbuild
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,16 @@ set -x; osbuild-mpp \
"${mppyaml}" "${processed_json}"
set +x

log_disk_usage
#log_disk_usage
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm against this change. This is useful because running out of disk space in the cache qcow2 could be the reason why a failure occurs. Having these breadcrumbs in the logs are how we know.

Now, what I will admit is that it's really not helpful when you have a RUNVM_SHELL environment and you are trying to type on a bash prompt. Maybe we could find some way to auto disable it if that is the case? Perhaps we could change this line to:

(cd ${workdir}; RUNVM_SHELL=${RUNVM_SHELL} bash)

and then conditionalize if on $RUNVM_SHELL here in the code.


# Build the image
set -x
# shellcheck disable=SC2068
# To stop osbuild at a given stage to inspect the state of
# things you can add `--break stage_id` to the following.
# eg : `--break org.osbuild.bootc.install-to-filesystem`
# The osbuild environnement is set up under `/run/osbuild`
# Use it in conjuction with `RUNVM_SHELL=1 in `cmd-osbuild`
osbuild \
--out "$outdir" \
--store "$storedir" \
Expand Down