James Dykman
2005-Nov-18 20:35 UTC
[Xen-devel] [PATCH] Trivial changes to vif-bridge and vif-common.sh
1) "brctl show" has no parameters. On FC3, brctl ignores the extra parameter and shows all bridges. My SLES9 SP2 box is not so cooperative: # brctl show xenbr0 incorrect number of arguments for command 2) Add a -n flag to iptables -L to skip DNS lookups DNS timeouts take quite a while, causing the infamous "Hotplug scripts not working" errors while waiting for vif-bridge. xm create fails, and runs the hotplug remove on the partially-configured vif. Later, when iptables -L successfully completes, vif-bridge finishes the remaining configuration, leaving an orphaned vif cluttering up dom0. Signed-off-by: Jim Dykman <dykman@us.ibm.com> # HG changeset patch # User dykman@us.ibm.com # Node ID a3de757c9e1574fbebf67f6b3341f066f1235067 # Parent 5b5f1b0aca33e7a8bad04893ea6a948befea1c20 1) "brctl show" has no parameters. 2) Add a -n flag to iptables -L to skip DNS lookups diff -r 5b5f1b0aca33 -r a3de757c9e15 tools/examples/vif-bridge --- a/tools/examples/vif-bridge Fri Nov 18 11:42:59 2005 +++ b/tools/examples/vif-bridge Fri Nov 18 19:22:51 2005 @@ -48,9 +48,9 @@ case "$command" in online) - if brctl show "$bridge" | grep "$vif" >&/dev/null + if brctl show | grep "$vif" >&/dev/null then - log debug "$vif already attached to $bridge" + log debug "$vif already attached to a bridge" exit 0 fi diff -r 5b5f1b0aca33 -r a3de757c9e15 tools/examples/vif-common.sh --- a/tools/examples/vif-common.sh Fri Nov 18 11:42:59 2005 +++ b/tools/examples/vif-common.sh Fri Nov 18 19:22:51 2005 @@ -82,7 +82,7 @@ # binary is not sufficient, because the user may not have the appropriate # modules installed. If iptables is not working, then there''s no need to do # anything with it, so we can just return. - if ! iptables -L >&/dev/null + if ! iptables -L -n >&/dev/null then return fi _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ewan Mellor
2005-Nov-20 14:49 UTC
Re: [Xen-devel] [PATCH] Trivial changes to vif-bridge and vif-common.sh
On Fri, Nov 18, 2005 at 03:35:16PM -0500, James Dykman wrote:> 1) "brctl show" has no parameters. > On FC3, brctl ignores the extra parameter and shows all bridges. > My SLES9 SP2 box is not so cooperative: > # brctl show xenbr0 > incorrect number of arguments for command > > 2) Add a -n flag to iptables -L to skip DNS lookups > DNS timeouts take quite a while, causing the infamous "Hotplug > scripts not working" errors while waiting for vif-bridge. > xm create fails, and runs the hotplug remove on the > partially-configured vif. Later, when iptables -L successfully completes, > vif-bridge finishes the remaining configuration, leaving an > orphaned vif cluttering up dom0. > > Signed-off-by: Jim Dykman <dykman@us.ibm.com> >Thanks for your patch Jim. I''ve applied this. I''ve also added tools/examples/README.incompatibilities, into which I''ve added your information about brctl on SLES9. Hopefully this will expand to include all of the distro-specific problems that we suffer. Thanks again, Ewan. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel