mirror of
https://github.com/coreos/fedora-coreos-config.git
synced 2026-02-05 09:45:30 +01:00
tree: import changes from testing-devel at 0bd4b65d0d
This commit is contained in:
@@ -1,34 +1,2 @@
|
||||
# This manifest is a list of shared workarounds that are needed in both Fedora CoreOS
|
||||
# and downstreams (i.e. Red Hat CoreOS).
|
||||
|
||||
postprocess:
|
||||
# Put in the fix for multipathd.service in dracut on releases that haven't
|
||||
# been fixed yet.
|
||||
# https://github.com/dracutdevs/dracut/pull/1606
|
||||
# https://github.com/coreos/fedora-coreos-config/pull/1233
|
||||
- |
|
||||
#!/usr/bin/env bash
|
||||
set -xeuo pipefail
|
||||
source /etc/os-release
|
||||
# This has landed in Fedora but not in any version of RHEL yet
|
||||
if [[ ${ID} != "rhel" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
mkdir /usr/lib/dracut/modules.d/36coreos-multipath-fix
|
||||
cat > /usr/lib/dracut/modules.d/36coreos-multipath-fix/90-multipathd-remove-execstop.conf <<'EOF'
|
||||
# Temporary workaround for https://github.com/dracutdevs/dracut/pull/1606.
|
||||
[Service]
|
||||
ExecStop=
|
||||
EOF
|
||||
cat > /usr/lib/dracut/modules.d/36coreos-multipath-fix/module-setup.sh <<'EOF'
|
||||
#!/bin/bash
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
install() {
|
||||
# Temporary workaround for https://github.com/dracutdevs/dracut/pull/1606.
|
||||
mkdir -p "$systemdsystemunitdir/multipathd.service.d"
|
||||
inst_simple "$moddir/90-multipathd-remove-execstop.conf" \
|
||||
"$systemdsystemunitdir/multipathd.service.d/90-multipathd-remove-execstop.conf"
|
||||
}
|
||||
EOF
|
||||
chmod +x /usr/lib/dracut/modules.d/36coreos-multipath-fix/module-setup.sh
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
../../data/commonlib.sh
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/bin/bash
|
||||
## kola:
|
||||
## tags: "platform-independent"
|
||||
## exclusive: false
|
||||
|
||||
set -xeuo pipefail
|
||||
|
||||
. $KOLA_EXT_DATA/commonlib.sh
|
||||
|
||||
# We need either a fixed dracut or temporary workaround, no need for both.
|
||||
# See https://github.com/coreos/fedora-coreos-tracker/issues/803.
|
||||
has_fixed_dracut_multipathd_service=0
|
||||
grep -q 'ExecStop=/sbin/multipathd shutdown' /usr/lib/dracut/modules.d/90multipath/multipathd.service || has_fixed_dracut_multipathd_service=1
|
||||
has_overlay_multipathd_service_quickfix=1
|
||||
test -f /usr/lib/dracut/modules.d/36coreos-multipath-fix/90-multipathd-remove-execstop.conf || has_overlay_multipathd_service_quickfix=0
|
||||
if test "${has_fixed_dracut_multipathd_service}" -eq "${has_overlay_multipathd_service_quickfix}"; then
|
||||
if test "${has_fixed_dracut_multipathd_service}" -eq 1; then
|
||||
fatal "Found fixed dracut multipath module but quickfix is present too"
|
||||
else
|
||||
fatal "Found buggy dracut multipath module but quickfix is missing too"
|
||||
fi
|
||||
fi
|
||||
ok "either dracut multipath module fixed or quickfix present"
|
||||
Reference in New Issue
Block a user