Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 409ba9e

Browse files
authoredSep 8, 2023
Merge pull request #7445 from JM1/okd-sno
Implement workaround to allow SNO installations for OKD/FCOS
2 parents 3dcb003 + ed1467e commit 409ba9e

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
 

Diff for: ‎data/data/bootstrap/files/usr/local/bin/bootstrap-pivot.sh.template

+15
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,25 @@ if [ ! -f /opt/openshift/.pivot-done ]; then
4242
record_service_stage_start "rebase-to-okd-os-image"
4343
{{if .IsFCOS -}}
4444
mnt="$(podman image mount "${MACHINE_OS_IMAGE}")"
45+
{{- if .BootstrapInPlace }}
46+
# SNO setup boots into Live ISO which cannot be rebased
47+
# https://github.com/coreos/rpm-ostree/issues/4547
48+
mkdir /var/mnt/{upper,worker}
49+
mount -t overlay overlay -o "lowerdir=/usr:$mnt/usr" /usr
50+
mount -t overlay overlay -o "lowerdir=/etc:$mnt/etc,upperdir=/var/mnt/upper,workdir=/var/mnt/worker" /etc
51+
systemctl daemon-reload
52+
53+
# Workaround for SELinux denials when launching crio.service from overlayfs
54+
setenforce Permissive
55+
56+
systemctl start crio.service
57+
# No reboot necessary because SNO setup will reboot system
58+
{{ else }}
4559
pushd "${mnt}/bootstrap"
4660
# shellcheck disable=SC1091
4761
. ./pre-pivot.sh
4862
popd
63+
{{ end -}}
4964
{{else if .IsSCOS -}}
5065
chmod 0644 /etc/containers/registries.conf
5166
rpm-ostree rebase --experimental "ostree-unverified-registry:${MACHINE_OS_IMAGE}"

Diff for: ‎data/data/bootstrap/systemd/units/release-image-pivot.service.template

+4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
Description=Pivot bootstrap to the OpenShift Release Image
44
Wants=release-image.service
55
After=release-image.service
6+
{{- if .BootstrapInPlace }}
7+
Before=bootkube.service kubelet.service
8+
{{ else }}
69
Before=bootkube.service
10+
{{ end -}}
711

812
[Service]
913
Type=oneshot

0 commit comments

Comments
 (0)
Please sign in to comment.