Accepting request 964654 from devel:kubic:ignition

OBS-URL: https://build.opensuse.org/request/show/964654
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/combustion?expand=0&rev=14
This commit is contained in:
Dominique Leuenberger 2022-03-28 14:58:37 +00:00 committed by Git OBS Bridge
commit 8cfd175eee
4 changed files with 33 additions and 14 deletions

View File

@ -92,21 +92,16 @@ cleanup() {
# (https://github.com/systemd/systemd/issues/20329). To avoid that,
# wait until systemd processed the umount events. In a chroot (or with
# SYSTEMD_OFFLINE=1) systemctl always succeeds, so avoid an infinite loop.
if ! systemctl is-active does-not-exist.mount; then
while systemctl is-active sysroot.mount; do sleep 0.5; done
if ! systemctl --quiet is-active does-not-exist.mount; then
while systemctl --quiet is-active sysroot.mount; do sleep 0.5; done
fi
systemctl start sysroot.mount
}
# Note: The /sysroot remounting during cleanup happens unconditionally.
# This is needed as ignition-mount.service's ExecStop is also disabled unconditionally.
trap cleanup EXIT
# ignition-mount.service mounts stuff below /sysroot in ExecStart and umounts
# it on ExecStop, failing if umounting fails. This conflicts with the
# mounts/umounts done by combustion. Ignition is already done, so just stop it.
if systemctl --quiet is-active ignition-mount.service; then
systemctl stop ignition-mount.service
fi
if ! [ -d "${config_mount}/combustion" ]; then
echo "No config found - doing nothing."
exit 0
@ -165,6 +160,8 @@ if [ -x /sysroot/usr/sbin/transactional-update ]; then
chmod a+x script
./script
echo \$? > "${exchangedir}/retval"
# Snapshot got touched while the policy isn't active, needs relabeling again.
[ -e /etc/selinux/.relabelled ] && >> /etc/selinux/.autorelabel
EOF
echo "transactional-update failed"
exit 1
@ -175,9 +172,6 @@ EOF
chroot /sysroot transactional-update --no-selfupdate rollback
exit 1
fi
# Snapshot got touched while the policy isn't active, needs relabeling again.
[ -e /sysroot/etc/selinux/.relabelled ] && >> /sysroot/etc/selinux/.autorelabel
else
mount -o remount,rw /sysroot
if ! chroot /sysroot sh -e -c "cd '${config_dir}'; chmod a+x script; ./script"; then

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
Thu Mar 24 09:40:34 UTC 2022 - Fabian Vogt <fvogt@suse.com>
- Bump version to 0.3
- Use the Wiki page as URL (boo#1195383)
- Don't touch /sysroot/etc/ after creating a new snapshot, it ends up
in the old snapshot's overlay
-------------------------------------------------------------------
Wed Mar 23 15:15:15 UTC 2022 - Fabian Vogt <fvogt@suse.com>
- Disable ignition-mount.service's ExecStop instead of stopping the
unit (boo#1197309)
-------------------------------------------------------------------
Mon Mar 21 13:20:39 UTC 2022 - Fabian Vogt <fvogt@suse.com>
- Be more --quiet with systemctl
-------------------------------------------------------------------
Thu Mar 3 11:58:07 UTC 2022 - Fabian Vogt <fvogt@suse.com>

View File

@ -17,12 +17,12 @@
Name: combustion
Version: 0.2
Version: 0.3
Release: 0
Summary: System for initial configuration of appliances
License: GPL-2.0-or-later
Group: System/Management
URL: https://build.opensuse.org/package/show/home:Vogtinator:combustion/combustion
URL: https://en.opensuse.org/Portal:MicroOS/Combustion
Source1: LICENSE
Source2: README
Source3: module-setup.sh

View File

@ -11,6 +11,12 @@ install() {
inst_multiple awk chroot findmnt grep rmdir
inst_simple "${moddir}/combustion" "/usr/bin/combustion"
# ignition-mount.service mounts stuff below /sysroot in ExecStart and umounts
# it on ExecStop, failing if umounting fails. This conflicts with the
# mounts/umounts done by combustion. Just let combustion do it instead.
mkdir -p "${initdir}/${systemdsystemunitdir}/ignition-mount.service.d/"
echo -e "[Service]\nExecStop=" > "${initdir}/${systemdsystemunitdir}/ignition-mount.service.d/noexecstop.conf"
# Wait up to 10s (30s on aarch64) for the config drive
devtimeout=10
[ "$(uname -m)" = "aarch64" ] && devtimeout=30