* dracut requires router
@ 2010-10-08 10:20 Pádraig Brady
[not found] ` <4CAEF060.8030701-V8g9lnOeT5ydJdNcDFJN0w@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Pádraig Brady @ 2010-10-08 10:20 UTC (permalink / raw)
To: philippe.seewer-omB+W0Dpw2o, initramfs-u79uwXL29TY76Z2rM5mHXA
My terminals just failed to boot because the router
was (temporarily) unavailable. Seems this is on purpose?
http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=commit;h=98f25e96
I don't know what the above is trying to do exactly.
cheers,
Pádraig.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: dracut requires router
[not found] ` <4CAEF060.8030701-V8g9lnOeT5ydJdNcDFJN0w@public.gmane.org>
@ 2010-10-08 13:30 ` Seewer Philippe
[not found] ` <4CAF1D02.6060701-omB+W0Dpw2o@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Seewer Philippe @ 2010-10-08 13:30 UTC (permalink / raw)
To: Pádraig Brady; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On 10/08/2010 12:20 PM, Pádraig Brady wrote:
> My terminals just failed to boot because the router
> was (temporarily) unavailable. Seems this is on purpose?
>
> http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=commit;h=98f25e96
>
> I don't know what the above is trying to do exactly.
What this does ist simply try and give a possible router enough time to
update its STP caches (See
http://en.wikipedia.org/wiki/Spanning_tree_protocol) so that subsequent
mount attempts don't fail because the router isn't ready.
So yes, it is on purpose if the available IP information contains routers.
I Hope this helps
Regards,
Philippe
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: dracut requires router
[not found] ` <4CAF1D02.6060701-omB+W0Dpw2o@public.gmane.org>
@ 2010-10-08 13:59 ` Pádraig Brady
[not found] ` <4CAF23BA.4010605-V8g9lnOeT5ydJdNcDFJN0w@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Pádraig Brady @ 2010-10-08 13:59 UTC (permalink / raw)
To: Seewer Philippe; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On 08/10/10 14:30, Seewer Philippe wrote:
> On 10/08/2010 12:20 PM, Pádraig Brady wrote:
>> My terminals just failed to boot because the router
>> was (temporarily) unavailable. Seems this is on purpose?
>>
>> http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=commit;h=98f25e96
>>
>>
>> I don't know what the above is trying to do exactly.
>
> What this does ist simply try and give a possible router enough time to
> update its STP caches (See
> http://en.wikipedia.org/wiki/Spanning_tree_protocol) so that subsequent
> mount attempts don't fail because the router isn't ready.
>
> So yes, it is on purpose if the available IP information contains routers.
>
> I Hope this helps
Thanks for the info, but.
Is it right to do this synchronously with such a long timeout?
Is it right to die if we can't contact the router?
cheers,
Pádraig.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: dracut requires router
[not found] ` <4CAF23BA.4010605-V8g9lnOeT5ydJdNcDFJN0w@public.gmane.org>
@ 2010-10-08 14:17 ` Seewer Philippe
[not found] ` <4CAF27EF.80301-omB+W0Dpw2o@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Seewer Philippe @ 2010-10-08 14:17 UTC (permalink / raw)
To: Pádraig Brady; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On 10/08/2010 03:59 PM, Pádraig Brady wrote:
> On 08/10/10 14:30, Seewer Philippe wrote:
>> On 10/08/2010 12:20 PM, Pádraig Brady wrote:
>>> My terminals just failed to boot because the router
>>> was (temporarily) unavailable. Seems this is on purpose?
>>>
>>> http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=commit;h=98f25e96
>>>
>>>
>>> I don't know what the above is trying to do exactly.
>>
>> What this does ist simply try and give a possible router enough time to
>> update its STP caches (See
>> http://en.wikipedia.org/wiki/Spanning_tree_protocol) so that subsequent
>> mount attempts don't fail because the router isn't ready.
>>
>> So yes, it is on purpose if the available IP information contains routers.
>>
>> I Hope this helps
>
> Thanks for the info, but.
> Is it right to do this synchronously with such a long timeout?
It has to be done synchronously, sorry. We have to be sure the router is
there and ready if the rootserver is behind the router.
As for the timeout: STP can take between 30-60 seconds. (There's a
reason why there's newer protocols like RSTP etc).
> Is it right to die if we can't contact the router?
Usually yes. Either because the rootserver is behind the router or if
you supplied routing information it's safe to assume that later you want
it to work anyway.
But yes, usually. I would have preferred to somehow a subnet check on
the rootserver to decide what or if to check. But alas, not all netroot
variants know the ip of their rootserver at that point.
I'm always open for ideas on how to improve this.
Regards,
Philippe
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: dracut requires router
[not found] ` <4CAF27EF.80301-omB+W0Dpw2o@public.gmane.org>
@ 2010-10-08 15:19 ` Pádraig Brady
[not found] ` <4CAF367D.7030707-V8g9lnOeT5ydJdNcDFJN0w@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Pádraig Brady @ 2010-10-08 15:19 UTC (permalink / raw)
To: Seewer Philippe; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On 08/10/10 15:17, Seewer Philippe wrote:
> On 10/08/2010 03:59 PM, Pádraig Brady wrote:
>> Is it right to die if we can't contact the router?
> Usually yes. Either because the rootserver is behind the router or if
> you supplied routing information it's safe to assume that later you want
> it to work anyway.
Well in my case the router is just needed for browsing the net.
All other services are provided locally.
> But yes, usually. I would have preferred to somehow a subnet check on
> the rootserver to decide what or if to check. But alas, not all netroot
> variants know the ip of their rootserver at that point.
Right, but no need to penalize the common case.
I.E. we can bypass all this if the rootserver is known,
and on the same subnet.
cheers,
Pádraig.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] network: don't die if gateway is down and root server is local
[not found] ` <4CAF367D.7030707-V8g9lnOeT5ydJdNcDFJN0w@public.gmane.org>
@ 2010-10-15 12:05 ` Pádraig Brady
[not found] ` <4CB84390.5060203-V8g9lnOeT5ydJdNcDFJN0w@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Pádraig Brady @ 2010-10-15 12:05 UTC (permalink / raw)
To: Seewer Philippe; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On 08/10/10 16:19, Pádraig Brady wrote:
> On 08/10/10 15:17, Seewer Philippe wrote:
>> On 10/08/2010 03:59 PM, Pádraig Brady wrote:
>
>>> Is it right to die if we can't contact the router?
>> Usually yes. Either because the rootserver is behind the router or if
>> you supplied routing information it's safe to assume that later you want
>> it to work anyway.
>
> Well in my case the router is just needed for browsing the net.
> All other services are provided locally.
>
>> But yes, usually. I would have preferred to somehow a subnet check on
>> the rootserver to decide what or if to check. But alas, not all netroot
>> variants know the ip of their rootserver at that point.
>
> Right, but no need to penalize the common case.
> I.E. we can bypass all this if the rootserver is known,
> and on the same subnet.
This seems to work.
cheers,
Pádraig.
From a1a1fac1a1cfc8bd22417923823f3d64c29dd44f Mon Sep 17 00:00:00 2001
From: =?utf-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Fri, 15 Oct 2010 12:58:31 +0100
Subject: [PATCH] network: make gateway optional with a local root server
* modules.d/40network/netroot: Don't arping the gateway
if we don't need to
---
modules.d/40network/netroot | 25 ++++++++++++++++++-------
1 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/modules.d/40network/netroot b/modules.d/40network/netroot
index 81a9ad3..12717b1 100755
--- a/modules.d/40network/netroot
+++ b/modules.d/40network/netroot
@@ -83,22 +83,33 @@ done
[ -e /tmp/net.$netif.override ] && . /tmp/net.$netif.override
[ -e /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts
-# Handle STP Timeout: arping default router or if not available the
-# root server. Note: This assumes that if no router is present the
+# Handle STP Timeout: arping the default router if root server is
+# unknown or not local, or if not available the root server.
+# Note: This assumes that if no router is present the
# root server is on the same subnet.
#
# TODO There's some netroot variants that don't (yet) have their
# server-ip netroot
-[ -n "$new_routers" ] && dest=${new_routers%%,*}
-[ -n "$gw" ] && dest=$gw
-if [ -z "$dest" ] ; then
+[ "$new_routers" ] && gw_ip=${new_routers%%,*}
+[ "$gw" ] && gw_ip=$gw
+if [ "$netroot" ]; then
dummy=${netroot#*:}
dummy=${dummy%%:*}
case "$dummy" in
- [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*) dest=$dummy;;
+ [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*) netroot_ip=$dummy;;
esac
fi
-if [ -n "$dest" ] && ! arping -q -f -w 60 -I $netif $dest ; then
+dest="$gw_ip"
+if [ "$netroot_ip" ]; then
+ if [ -z "$dest" ]; then
+ # no gateway so check root server
+ dest="$netroot_ip"
+ elif ! ip route get "$netroot_ip" | grep -qF ' via '; then
+ # local root server, so don't arping gateway
+ dest="$netroot_ip"
+ fi
+fi
+if [ "$dest" ] && ! arping -q -f -w 60 -I $netif $dest; then
die "Resolving $dest via ARP on $netif failed"
fi
--
1.6.2.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] network: don't die if gateway is down and root server is local
[not found] ` <4CB84390.5060203-V8g9lnOeT5ydJdNcDFJN0w@public.gmane.org>
@ 2010-10-15 13:43 ` Harald Hoyer
[not found] ` <4CB85A73.6010902-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Harald Hoyer @ 2010-10-15 13:43 UTC (permalink / raw)
To: Pádraig Brady
Cc: Seewer Philippe,
initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On 10/15/2010 02:05 PM, P치draig Brady wrote:
> On 08/10/10 16:19, P치draig Brady wrote:
>> On 08/10/10 15:17, Seewer Philippe wrote:
>>> On 10/08/2010 03:59 PM, P치draig Brady wrote:
>>
>>>> Is it right to die if we can't contact the router?
>>> Usually yes. Either because the rootserver is behind the router or if
>>> you supplied routing information it's safe to assume that later you want
>>> it to work anyway.
>>
>> Well in my case the router is just needed for browsing the net.
>> All other services are provided locally.
>>
>>> But yes, usually. I would have preferred to somehow a subnet check on
>>> the rootserver to decide what or if to check. But alas, not all netroot
>>> variants know the ip of their rootserver at that point.
>>
>> Right, but no need to penalize the common case.
>> I.E. we can bypass all this if the rootserver is known,
>> and on the same subnet.
>
> This seems to work.
>
> cheers,
> P치draig.
>
> From a1a1fac1a1cfc8bd22417923823f3d64c29dd44f Mon Sep 17 00:00:00 2001
> From: =?utf-8?q?P=C3=A1draig=20Brady?=<P@draigBrady.com>
> Date: Fri, 15 Oct 2010 12:58:31 +0100
> Subject: [PATCH] network: make gateway optional with a local root server
>
> * modules.d/40network/netroot: Don't arping the gateway
> if we don't need to
> ---
> modules.d/40network/netroot | 25 ++++++++++++++++++-------
> 1 files changed, 18 insertions(+), 7 deletions(-)
>
> diff --git a/modules.d/40network/netroot b/modules.d/40network/netroot
> index 81a9ad3..12717b1 100755
> --- a/modules.d/40network/netroot
> +++ b/modules.d/40network/netroot
> @@ -83,22 +83,33 @@ done
> [ -e /tmp/net.$netif.override ]&& . /tmp/net.$netif.override
> [ -e /tmp/dhclient.$netif.dhcpopts ]&& . /tmp/dhclient.$netif.dhcpopts
>
> -# Handle STP Timeout: arping default router or if not available the
> -# root server. Note: This assumes that if no router is present the
> +# Handle STP Timeout: arping the default router if root server is
> +# unknown or not local, or if not available the root server.
> +# Note: This assumes that if no router is present the
> # root server is on the same subnet.
> #
> # TODO There's some netroot variants that don't (yet) have their
> # server-ip netroot
> -[ -n "$new_routers" ]&& dest=${new_routers%%,*}
> -[ -n "$gw" ]&& dest=$gw
> -if [ -z "$dest" ] ; then
> +[ "$new_routers" ]&& gw_ip=${new_routers%%,*}
> +[ "$gw" ]&& gw_ip=$gw
> +if [ "$netroot" ]; then
> dummy=${netroot#*:}
> dummy=${dummy%%:*}
> case "$dummy" in
> - [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*) dest=$dummy;;
> + [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*) netroot_ip=$dummy;;
> esac
> fi
> -if [ -n "$dest" ]&& ! arping -q -f -w 60 -I $netif $dest ; then
> +dest="$gw_ip"
> +if [ "$netroot_ip" ]; then
> + if [ -z "$dest" ]; then
> + # no gateway so check root server
> + dest="$netroot_ip"
> + elif ! ip route get "$netroot_ip" | grep -qF ' via '; then
> + # local root server, so don't arping gateway
> + dest="$netroot_ip"
> + fi
> +fi
> +if [ "$dest" ]&& ! arping -q -f -w 60 -I $netif $dest; then
> die "Resolving $dest via ARP on $netif failed"
> fi
>
please use [ -n "$var" ]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] network: don't die if gateway is down and root server is local
[not found] ` <4CB85A73.6010902-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2010-10-15 14:03 ` Pádraig Brady
[not found] ` <4CB85F31.5010207-V8g9lnOeT5ydJdNcDFJN0w@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Pádraig Brady @ 2010-10-15 14:03 UTC (permalink / raw)
To: Harald Hoyer
Cc: Seewer Philippe,
initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On 15/10/10 14:43, Harald Hoyer wrote:
>
> please use [ -n "$var" ]
>
Done, and added a couple of comments.
cheers,
Pádraig.
From 3030d23e31f3975c0c44207b0faae0792d5cc9b0 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Fri, 15 Oct 2010 12:58:31 +0100
Subject: [PATCH] network: don't die if gateway is down and root server is local
* modules.d/40network/netroot: Don't arping the gateway
if we don't need to
---
modules.d/40network/netroot | 28 ++++++++++++++++++++++------
1 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/modules.d/40network/netroot b/modules.d/40network/netroot
index 81a9ad3..948f68b 100755
--- a/modules.d/40network/netroot
+++ b/modules.d/40network/netroot
@@ -83,21 +83,37 @@ done
[ -e /tmp/net.$netif.override ] && . /tmp/net.$netif.override
[ -e /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts
-# Handle STP Timeout: arping default router or if not available the
-# root server. Note: This assumes that if no router is present the
+# Handle STP Timeout: arping the default router if root server is
+# unknown or not local, or if not available the root server.
+# Note: This assumes that if no router is present the
# root server is on the same subnet.
#
# TODO There's some netroot variants that don't (yet) have their
# server-ip netroot
-[ -n "$new_routers" ] && dest=${new_routers%%,*}
-[ -n "$gw" ] && dest=$gw
-if [ -z "$dest" ] ; then
+
+# Get router IP if set
+[ -n "$new_routers" ] && gw_ip=${new_routers%%,*}
+[ -n "$gw" ] && gw_ip=$gw
+# Get root server IP if set
+if [ -n "$netroot" ]; then
dummy=${netroot#*:}
dummy=${dummy%%:*}
case "$dummy" in
- [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*) dest=$dummy;;
+ [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*) netroot_ip=$dummy;;
esac
fi
+# Default arping dest to router
+dest="$gw_ip"
+# Change to arping root server if appropriate
+if [ -n "$netroot_ip" ]; then
+ if [ -z "$dest" ]; then
+ # no gateway so check root server
+ dest="$netroot_ip"
+ elif ! ip route get "$netroot_ip" | grep -qF ' via ' ; then
+ # local root server, so don't arping gateway
+ dest="$netroot_ip"
+ fi
+fi
if [ -n "$dest" ] && ! arping -q -f -w 60 -I $netif $dest ; then
die "Resolving $dest via ARP on $netif failed"
fi
--
1.6.2.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] network: don't die if gateway is down and root server is local
[not found] ` <4CB85F31.5010207-V8g9lnOeT5ydJdNcDFJN0w@public.gmane.org>
@ 2010-10-28 15:14 ` Harald Hoyer
0 siblings, 0 replies; 9+ messages in thread
From: Harald Hoyer @ 2010-10-28 15:14 UTC (permalink / raw)
To: Pádraig Brady
Cc: Seewer Philippe,
initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On 10/15/2010 04:03 PM, Pádraig Brady wrote:
> On 15/10/10 14:43, Harald Hoyer wrote:
>>
>> please use [ -n "$var" ]
>>
>
> Done, and added a couple of comments.
>
> cheers,
> Pádraig.
>
> From 3030d23e31f3975c0c44207b0faae0792d5cc9b0 Mon Sep 17 00:00:00 2001
> From: =?utf-8?q?P=C3=A1draig=20Brady?=<P@draigBrady.com>
> Date: Fri, 15 Oct 2010 12:58:31 +0100
> Subject: [PATCH] network: don't die if gateway is down and root server is local
>
> * modules.d/40network/netroot: Don't arping the gateway
> if we don't need to
pushed
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-10-28 15:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-08 10:20 dracut requires router Pádraig Brady
[not found] ` <4CAEF060.8030701-V8g9lnOeT5ydJdNcDFJN0w@public.gmane.org>
2010-10-08 13:30 ` Seewer Philippe
[not found] ` <4CAF1D02.6060701-omB+W0Dpw2o@public.gmane.org>
2010-10-08 13:59 ` Pádraig Brady
[not found] ` <4CAF23BA.4010605-V8g9lnOeT5ydJdNcDFJN0w@public.gmane.org>
2010-10-08 14:17 ` Seewer Philippe
[not found] ` <4CAF27EF.80301-omB+W0Dpw2o@public.gmane.org>
2010-10-08 15:19 ` Pádraig Brady
[not found] ` <4CAF367D.7030707-V8g9lnOeT5ydJdNcDFJN0w@public.gmane.org>
2010-10-15 12:05 ` [PATCH] network: don't die if gateway is down and root server is local Pádraig Brady
[not found] ` <4CB84390.5060203-V8g9lnOeT5ydJdNcDFJN0w@public.gmane.org>
2010-10-15 13:43 ` Harald Hoyer
[not found] ` <4CB85A73.6010902-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-10-15 14:03 ` Pádraig Brady
[not found] ` <4CB85F31.5010207-V8g9lnOeT5ydJdNcDFJN0w@public.gmane.org>
2010-10-28 15:14 ` Harald Hoyer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.