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-devel

Re: [Xen-devel] Network scripts start/stop

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Network scripts start/stop
From: Christopher Thunes <c2thunes@xxxxxxxxxxx>
Date: Sat, 05 Apr 2008 01:49:30 -0400
Delivery-date: Fri, 04 Apr 2008 22:49:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <47F6B9A0.9020806@xxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <47F6B9A0.9020806@xxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.4 (X11/20070604)
Attached a patch.

diff -r 6341a28c8a45 tools/python/xen/xend/XendPIF.py
--- a/tools/python/xen/xend/XendPIF.py  Mon Mar 31 18:08:17 2008 +0100
+++ b/tools/python/xen/xend/XendPIF.py  Sat Apr 05 01:40:20 2008 -0400
@@ -24,16 +24,12 @@ from xen.xend.XendBase import XendBase
 from xen.xend.XendBase import XendBase
 from xen.xend.XendPIFMetrics import XendPIFMetrics
 from xen.xend.XendError import *
-from xen.xend import Vifctl

 log = logging.getLogger("xend.XendPIF")
 log.setLevel(logging.TRACE)

 MAC_RE = re.compile(':'.join(['[0-9a-f]{2}'] * 6))
 IP_IFACE_RE = re.compile(r'^\d+: (\w+):.*mtu (\d+) .* link/\w+ ([0-9a-f:]+)')
-
-
-Vifctl.network('start')

 def linux_phy_to_virt(pif_name):
     return 'eth' + re.sub(r'^[a-z]+', '', pif_name)
diff -r 6341a28c8a45 tools/python/xen/xend/server/SrvServer.py
--- a/tools/python/xen/xend/server/SrvServer.py Mon Mar 31 18:08:17 2008 +0100
+++ b/tools/python/xen/xend/server/SrvServer.py Sat Apr 05 01:41:54 2008 -0400
@@ -53,6 +53,7 @@ from xen.xend.XendClient import XEN_API_
 from xen.xend.XendClient import XEN_API_SOCKET
 from xen.xend.XendDomain import instance as xenddomain
 from xen.web.SrvDir import SrvDir
+from xen.xend import Vifctl

 from SrvRoot import SrvRoot
 from XMLRPCServer import XMLRPCServer
@@ -83,6 +84,7 @@ class XendServers:

         # clean up domains for those that have on_xend_stop
         if not reloading:
+            Vifctl.network('stop')
             xenddomain().cleanup_domains()

         self.running = False
@@ -104,6 +106,8 @@ class XendServers:
         # and call each server's cleanup if possible
         signal.signal(signal.SIGTERM, self.cleanup)
         signal.signal(signal.SIGHUP, self.reloadConfig)
+
+        Vifctl.network('start')

         while True:
             threads = []
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>