Skip to content

Commit

Permalink
bootstrap-pivot: skip pivot in SCOS Live ISO
Browse files Browse the repository at this point in the history
If bootstrap is running in a Live ISO of SCOS `rpm-ostree pivot` will
fail as /usr is not writable. Live ISO is used in assisted-installer
flow and it doesn't need to pivot machine-os-content during bootstrap
(it would write SCOS image on disk and run pivot via
machine-config-daemon-pivot service). This change unblocks OKD Stream
isntall using assisted-installer
  • Loading branch information
vrutkovs committed Mar 15, 2023
1 parent 1fe95cf commit ba72368
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
{{if .IsOKD -}}
#!/usr/bin/env bash
set -euo pipefail

# Exit early if pivot is attempted on SCOS Live ISO
{{if .IsSCOS -}}
source /etc/os-release
if [[ ! $(touch /usr/.test) ]] && [[ ${ID} =~ ^(centos)$ ]]; then
touch /opt/openshift/.pivot-done
exit 0
fi
{{end -}}

# Rebase to OKD's OSTree container image.
# This is required in OKD as the node is first provisioned with plain Fedora CoreOS.

Expand Down

0 comments on commit ba72368

Please sign in to comment.