WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] [PATCH 2/4] xenserver: Only put the primary XenServer UUID in

To: <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-API] [PATCH 2/4] xenserver: Only put the primary XenServer UUID in default bridge-id
From: Dominic Curran <dominic.curran@xxxxxxxxxx>
Date: Mon, 14 Feb 2011 12:35:15 +0000
Cc: dominic.curran@xxxxxxxxxx
Delivery-date: Tue, 15 Feb 2011 08:41:12 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.24 (X11/20100411)
From 9ded028db3970a7fc1c16b2b34e53583e5f9f9d4 Mon Sep 17 00:00:00 2001
From: Ethan Jackson <ethan@xxxxxxxxxx>
Date: Tue, 21 Sep 2010 23:57:13 -0700
Subject: [PATCH 2/4] xenserver: Only put the primary XenServer UUID in default bridge-id

This patch defensively guarantees that the first id in
xs-network-uuids will belong to the primary network (as opposed to
a vlan).  Given that the primary network id comes first, it parses
xs-network-ids and only copies the primary id to bridge-id when
monitor-external-ids is run.

Feature #3647

Signed-off-by: Ethan Jackson <ethan@xxxxxxxxxx>
Reviewed-by: Ben Pfaff <blp@xxxxxxxxxx>
Signed-off-by: Dominic Curran <dominic.curran@xxxxxxxxxx>
---
scripts/InterfaceReconfigureVswitch.py |    7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/scripts/InterfaceReconfigureVswitch.py b/scripts/InterfaceReconfigureVswitch.py
index 4766850..1a845ff 100644
--- a/scripts/InterfaceReconfigureVswitch.py
+++ b/scripts/InterfaceReconfigureVswitch.py
@@ -342,7 +342,12 @@ def set_br_external_ids(pif):
# log("Network PIF %s not currently attached (%s)" % (rec['uuid'],pifrec['uuid']))
        #    continue
        nwrec = db().get_network_record(rec['network'])
-        xs_network_uuids += [nwrec['uuid']]
+
+        uuid = nwrec['uuid']
+        if pif_is_vlan(nwpif):
+            xs_network_uuids.append(uuid)
+        else:
+            xs_network_uuids.insert(0, uuid)

    vsctl_argv = []
    vsctl_argv += ['# configure xs-network-uuids']
--
1.6.3.3


_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-API] [PATCH 2/4] xenserver: Only put the primary XenServer UUID in default bridge-id, Dominic Curran <=