From: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Subject: Re: [patch RFC 6/6] Wait for interface up at the early stage
Date: Thu, 29 Nov 2012 16:09:17 +0800 [thread overview]
Message-ID: <50B7182D.7000304@redhat.com> (raw)
In-Reply-To: <20121108034317.844374819-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
On 11/08/2012 11:40 AM, dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org wrote:
> In case long delay of network driver initqueue will exit before net dev is
> ready. We have no chance to setup it then.
> For dhcp, when we finish the setup there will be a setup_net_<dev>.ok. Doing
> same for static ip case. Also add a check to initqueue when we generate udev
> rules to ensure it's early enough.
>
> Signed-off-by: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
> modules.d/40network/ifup.sh | 1 +
> modules.d/40network/net-genrules.sh | 3 +++
> 2 files changed, 4 insertions(+)
>
> --- dracut.orig/modules.d/40network/net-genrules.sh
> +++ dracut/modules.d/40network/net-genrules.sh
> @@ -49,14 +49,17 @@ fi
> if [ -n "$BOOTIF" ] ; then
> BOOTIF=$(fix_bootif "$BOOTIF")
> printf 'ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="%s", RUN+="%s"\n' "$BOOTIF" "/sbin/initqueue --onetime $ifup"
> + echo "[ -f /tmp/setup_net_${BOOTIF}.ok ]" >$hookdir/initqueue/finished/wait-${BOOTIF}.sh
>
> # If we have to handle multiple interfaces, handle only them.
> elif [ -n "$IFACES" ] ; then
> for iface in $IFACES ; do
> printf 'SUBSYSTEM=="net", ENV{INTERFACE}=="%s", RUN+="%s"\n' "$iface" "/sbin/initqueue --onetime $ifup"
> + echo "[ -f /tmp/setup_net_${iface}.ok ]" >$hookdir/initqueue/finished/wait-$iface.sh
Above waiting is only necessary for bootdev. For example of bonding
device, it should not wait for the slaves.
Will update 5/6 and 6/6 and resend this series.
> done
>
> # Default: We don't know the interface to use, handle all
> + # Fixme: waiting for the interface as well.
> else
> printf 'SUBSYSTEM=="net", RUN+="%s"\n' "/sbin/initqueue --onetime $ifup" > /etc/udev/rules.d/91-default-net.rules
> fi
> --- dracut.orig/modules.d/40network/ifup.sh
> +++ dracut/modules.d/40network/ifup.sh
> @@ -109,6 +109,7 @@ do_static() {
> [ -n "$gw" ] && echo ip route add default via $gw dev $netif > /tmp/net.$netif.gw
> [ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
>
> + > /tmp/setup_net_${netif}.ok
> return 0
> }
>
>
--
Thanks
Dave
next prev parent reply other threads:[~2012-11-29 8:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-08 3:40 [patch RFC 0/6] network fixes for link waiting dyoung-H+wXaHxf7aLQT0dZR+AlfA
2012-11-08 3:40 ` [patch RFC 1/6] Move wait for if functions to net lib dyoung-H+wXaHxf7aLQT0dZR+AlfA
[not found] ` <20121108034317.171739916-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-11-08 9:50 ` Dave Young
2012-11-08 3:40 ` [patch RFC 2/6] Add function linkup dyoung-H+wXaHxf7aLQT0dZR+AlfA
2012-11-08 3:40 ` [patch RFC 3/6] Change to use linkup function in network scripts dyoung-H+wXaHxf7aLQT0dZR+AlfA
2012-11-08 3:40 ` [patch RFC 4/6] Wait for link ready before use the interface dyoung-H+wXaHxf7aLQT0dZR+AlfA
2012-11-08 3:40 ` [patch RFC 5/6] Get ifaces for udev rule use dyoung-H+wXaHxf7aLQT0dZR+AlfA
[not found] ` <20121108034317.735680044-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-11-29 8:07 ` Dave Young
2012-11-08 3:40 ` [patch RFC 6/6] Wait for interface up at the early stage dyoung-H+wXaHxf7aLQT0dZR+AlfA
[not found] ` <20121108034317.844374819-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-11-29 8:09 ` Dave Young [this message]
[not found] ` <20121108034018.789330224-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-11-14 8:49 ` [patch RFC 0/6] network fixes for link waiting Dave Young
[not found] ` <50A35B2E.9050206-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-11-14 10:56 ` Harald Hoyer
[not found] ` <50A378F0.4030907-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-11-15 1:52 ` Dave Young
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50B7182D.7000304@redhat.com \
--to=dyoung-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.