From: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] xend: Do not create XendNetwork instance of tmpbridge
Date: Thu, 12 Mar 2009 20:27:20 +0900 [thread overview]
Message-ID: <49B8F198.7010009@ab.jp.nec.com> (raw)
This patch prevents xend from creating a XendNetwork instance of tmpbridge
(a temporary bridge used in network-bridge script).
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
diff -r 8ce14a3bcf05 tools/python/xen/xend/XendNode.py
--- a/tools/python/xen/xend/XendNode.py Thu Mar 12 08:35:12 2009 +0000
+++ b/tools/python/xen/xend/XendNode.py Thu Mar 12 19:28:41 2009 +0900
@@ -18,6 +18,7 @@
import os
import socket
+import time
import xen.lowlevel.xc
from xen.util import Brctl
@@ -157,7 +158,16 @@
# Next discover any existing bridges and check
# they are not already configured
- bridges = Brctl.get_state().keys()
+
+ # 'tmpbridge' is a temporary bridge created by network-bridge script.
+ # Wait a couple of seconds for it to be renamed.
+ for i in xrange(20):
+ bridges = Brctl.get_state().keys()
+ if 'tmpbridge' in bridges:
+ time.sleep(0.1)
+ else:
+ break
+
configured_bridges = [XendAPIStore.get(
network_uuid, "network")
.get_name_label()
@@ -166,7 +176,8 @@
for bridge in bridges
if bridge not in configured_bridges]
for unconfigured_bridge in unconfigured_bridges:
- XendNetwork.create_phy(unconfigured_bridge)
+ if unconfigured_bridge != 'tmpbridge':
+ XendNetwork.create_phy(unconfigured_bridge)
# Initialise PIFs
# First configure ones off disk
reply other threads:[~2009-03-12 11:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=49B8F198.7010009@ab.jp.nec.com \
--to=y-iwamatsu@ab.jp.nec.com \
--cc=xen-devel@lists.xensource.com \
/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.