diff --git a/SOURCES/0564-rootfs-generator-don-t-set-JobRunningTimeoutSec.patch b/SOURCES/0564-rootfs-generator-don-t-set-JobRunningTimeoutSec.patch new file mode 100644 index 0000000..6e845d6 --- /dev/null +++ b/SOURCES/0564-rootfs-generator-don-t-set-JobRunningTimeoutSec.patch @@ -0,0 +1,22 @@ +From 6193b3a6e28e81fe0ebbdba4ca6aaff70b63695f Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Thu, 29 Aug 2019 09:40:09 +0200 +Subject: [PATCH] rootfs-generator: don't set JobRunningTimeoutSec + +We don't have that in rhel7 systemd +--- + modules.d/98systemd/rootfs-generator.sh | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/modules.d/98systemd/rootfs-generator.sh b/modules.d/98systemd/rootfs-generator.sh +index 4ae693bb..eada3d15 100755 +--- a/modules.d/98systemd/rootfs-generator.sh ++++ b/modules.d/98systemd/rootfs-generator.sh +@@ -32,7 +32,6 @@ generator_wait_for_dev() + { + echo "[Unit]" + echo "JobTimeoutSec=$_timeout" +- echo "JobRunningTimeoutSec=$_timeout" + } > "$GENERATOR_DIR"/${_name}.device.d/timeout.conf + fi + } diff --git a/SOURCES/0565-Sync-initramfs-after-creation.patch b/SOURCES/0565-Sync-initramfs-after-creation.patch new file mode 100644 index 0000000..167a88d --- /dev/null +++ b/SOURCES/0565-Sync-initramfs-after-creation.patch @@ -0,0 +1,29 @@ +From 1126a69746b6e0625d4a8db3b246a3edb7c5f551 Mon Sep 17 00:00:00 2001 +From: Ankit Kumar +Date: Mon, 7 Aug 2017 12:13:53 +0530 +Subject: [PATCH] Sync initramfs after creation + +If we trigger crash just after creating initramfs, sometimes it is +observed that initramfs is not written to disk causing the subsequent +boot to fail. A sync should resolve this. + +Signed-off-by: Ankit Kumar +--- + dracut.sh | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/dracut.sh b/dracut.sh +index 27489528..9df63cd7 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1704,4 +1704,10 @@ else + exit 1 + fi + ++sync $outfile 2> /dev/null ++if [ $? -ne 0 ] ; then ++ dinfo "dracut: sync operartion on newly created initramfs $outfile failed" ++ exit 1 ++fi ++ + exit 0 diff --git a/SOURCES/0566-dracut.sh-quote-sync-file-argument.patch b/SOURCES/0566-dracut.sh-quote-sync-file-argument.patch new file mode 100644 index 0000000..3c9cd04 --- /dev/null +++ b/SOURCES/0566-dracut.sh-quote-sync-file-argument.patch @@ -0,0 +1,24 @@ +From 57c3103a6907fecab002f6d20b0410ad9a1b9f94 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 11 Oct 2017 15:28:20 +0200 +Subject: [PATCH] dracut.sh: quote sync file argument + +--- + dracut.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 9df63cd7..62e53b73 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1704,8 +1704,8 @@ else + exit 1 + fi + +-sync $outfile 2> /dev/null +-if [ $? -ne 0 ] ; then ++ ++if ! sync "$outfile" 2> /dev/null; then + dinfo "dracut: sync operartion on newly created initramfs $outfile failed" + exit 1 + fi diff --git a/SOURCES/0567-net-lib-check-if-addr-exists-before-checking-for-dad.patch b/SOURCES/0567-net-lib-check-if-addr-exists-before-checking-for-dad.patch new file mode 100644 index 0000000..c473d95 --- /dev/null +++ b/SOURCES/0567-net-lib-check-if-addr-exists-before-checking-for-dad.patch @@ -0,0 +1,35 @@ +From 6b827761075266ebaf1ef10cc0a640445f02dbe1 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Mon, 7 Oct 2019 16:48:09 +0200 +Subject: [PATCH] net-lib: check if addr exists before checking for dad state + +Before we check if dad is done we should first make sure, +that there is a link local address where we do the check. + +Due to this issue, on ipv6 only setups sometimes dhclient started +asking for ip address, before the link local address was present +and failed immediately. +--- + modules.d/40network/net-lib.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 35e6e833..3f2fc712 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -645,6 +645,7 @@ wait_for_ipv6_dad_link() { + timeout=$(($timeout*10)) + + while [ $cnt -lt $timeout ]; do ++ [ -n "$(ip -6 addr show dev "$1" scope link)" ] \ + [ -z "$(ip -6 addr show dev "$1" scope link tentative)" ] \ + && return 0 + [ -n "$(ip -6 addr show dev "$1" scope link dadfailed)" ] \ +@@ -662,6 +663,7 @@ wait_for_ipv6_dad() { + timeout=$(($timeout*10)) + + while [ $cnt -lt $timeout ]; do ++ [ -n "$(ip -6 addr show dev "$1")" ] \ + [ -z "$(ip -6 addr show dev "$1" tentative)" ] \ + && return 0 + [ -n "$(ip -6 addr show dev "$1" dadfailed)" ] \ diff --git a/SPECS/dracut.spec b/SPECS/dracut.spec index 1b7cfc3..e4636b2 100644 --- a/SPECS/dracut.spec +++ b/SPECS/dracut.spec @@ -10,7 +10,7 @@ Name: dracut Version: 033 -Release: 564%{?dist} +Release: 568%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} || 0%{?rhel} @@ -592,6 +592,10 @@ Patch560: 0560-95iscsi-iscsiroot-synchronously-wait-until-iscsistar.patch Patch561: 0561-rootfs-generator-rebase-to-upstream-version.patch Patch562: 0562-fips-split-loading-the-crypto-modules-and-checking-t.patch Patch563: 0563-network-skip-already-enslaved-interfaces.patch +Patch564: 0564-rootfs-generator-don-t-set-JobRunningTimeoutSec.patch +Patch565: 0565-Sync-initramfs-after-creation.patch +Patch566: 0566-dracut.sh-quote-sync-file-argument.patch +Patch567: 0567-net-lib-check-if-addr-exists-before-checking-for-dad.patch BuildRequires: bash git @@ -1023,6 +1027,15 @@ rm -rf -- $RPM_BUILD_ROOT %endif %changelog +* Tue Oct 29 2019 Lukas Nykryn - 033-568 +- net-lib: check if addr exists before checking for dad state + +* Tue Oct 22 2019 Lukas Nykryn - 033-567 +- Sync initramfs after creation + +* Thu Aug 29 2019 Lukas Nykryn - 033-565 +- rootfs-generator: don't set JobRunningTimeoutSec + * Wed Jun 19 2019 Lukas Nykryn - 033-564 - network: skip already enslaved interfaces