Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initrd-setup-root-after-ignition: Ensure /etc/extensions is mergable #78

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
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
13 changes: 13 additions & 0 deletions dracut/99setup-root/initrd-setup-root-after-ignition
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,16 @@ for NAME in $(grep -h -o '^[^#]*' /sysroot/etc/flatcar/enabled-sysext.conf /sysr
rm -f "/sysroot/etc/extensions/flatcar-${NAME}.raw"
fi
done

# The above mkdir runs when the /etc overlay is already set up and since overlayfs
# creates any folders that don't exist in the lowerdir as opaque it means that when
# they appear later in the lowerdir through an update, the lowerdir folder is ignored.
# That happened in Beta when /etc/extensions wasn't present in /usr/share/flatcar/etc/.
# Remove any opaque markers for directories created on boot. We don't create /etc/cni
# here but it was also created later in boot and as a common folder it might be better
# to have it non-opaque.
for DIR in /sysroot/etc/extensions /sysroot/etc/flatcar /sysroot/etc/cni; do
if [ -d "${DIR}" ]; then
usrbin unshare -m sh -c "umount /sysroot/etc && /sysusr/usr/bin/attr -R -r overlay.opaque '${DIR}' || true"
fi
done