Hi Coiby,
On Wed, 29 Mar 2023 17:03:49 +0800
Coiby Xu <coxu(a)redhat.com> wrote:
Relates:
https://bugzilla.redhat.com/show_bug.cgi?id=2151504
Currently, when the network isn't ready, kdump would repeatedly print
the same info,
[ 29.537230] kdump[671]: Bad kdump network destination: 192.123.1.21
[ 30.559418] kdump[679]: Bad kdump network destination: 192.123.1.21
[ 31.580189] kdump[687]: Bad kdump network destination: 192.123.1.21
This is not user-friendly and users may think kdump has got stuck. So
also show much time has waited for the network to be ready,
[ 29.537230] kdump[671]: Bad kdump network destination: 192.123.1.21
[ 29.546258] kdump[673]: Waiting for network to be ready (50s / 10min)
...
[ 32.601434] kdump[695]: Bad kdump network destination: 192.123.1.21
[ 32.608967] kdump[697]: Waiting for network to be ready (56s / 10min)
Reported-by: Martin Pitt <mpitt(a)redhat.com>
Signed-off-by: Coiby Xu <coxu(a)redhat.com>
---
dracut-kdump.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dracut-kdump.sh b/dracut-kdump.sh
index 872e75ee..74b2b8ae 100755
--- a/dracut-kdump.sh
+++ b/dracut-kdump.sh
@@ -502,6 +502,8 @@ wait_online_network()
if _route=$(kdump_get_ip_route "$1" 2> /dev/null); then
printf "%s" "$_route"
return
+ else
+ dwarn "Waiting for network to be ready (${_loop}s / 10min)"
fi
done
The message makes totally sense. What I'm a little bit puzzled about is
that kdump_get_ip_route and wait_online_network will use different
log levels (derror vs. dwarn). But finding no route to the destination
is sort of expected behavior here so not actually an error. Not sure
what's the best thing to do here...
Anyway
Reviewed-by: Philipp Rudo <prudo(a)redhat.com>