From 7414ca355281a04b6eeebfd52cc86f15609497ee Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 20 2020 14:21:03 +0000 Subject: import dracut-033-568.el7 --- 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 0d985e0..e4636b2 100644 --- a/SPECS/dracut.spec +++ b/SPECS/dracut.spec @@ -10,7 +10,7 @@ Name: dracut Version: 033 -Release: 565%{?dist} +Release: 568%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} || 0%{?rhel} @@ -593,6 +593,9 @@ 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 @@ -1024,6 +1027,12 @@ 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