[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.1-testing] Merge with xen-unstable for (quick!) 3.1.0-rc6.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1178127417 -3600
# Node ID 6955571ebfe5bb41273bce0052a8c3e6983ae8c1
# Parent  b5cfbc8f7d2c2d04d55b7361cc035d5e3b8efd99
# Parent  2678e31d20f329aaa69c6ba7c9ff32d85f51db4c
Merge with xen-unstable for (quick!) 3.1.0-rc6.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/blktap/drivers/blktapctrl.c         |    6 ++++--
 tools/blktap/lib/blktaplib.h              |    3 ++-
 tools/python/xen/xend/XendPIF.py          |    2 +-
 tools/python/xen/xend/server/SrvDaemon.py |    2 +-
 tools/python/xen/xend/server/SrvServer.py |   18 +++++++++---------
 tools/python/xen/xm/main.py               |    2 ++
 tools/python/xen/xm/xenapi_create.py      |    8 ++++----
 xen/Makefile                              |    2 +-
 8 files changed, 24 insertions(+), 19 deletions(-)

diff -r b5cfbc8f7d2c -r 6955571ebfe5 tools/blktap/drivers/blktapctrl.c
--- a/tools/blktap/drivers/blktapctrl.c Wed May 02 15:27:10 2007 +0100
+++ b/tools/blktap/drivers/blktapctrl.c Wed May 02 18:36:57 2007 +0100
@@ -496,12 +496,12 @@ int blktapctrl_new_blkif(blkif_t *blkif)
                if (!exist) {
                        DPRINTF("Process does not exist:\n");
                        asprintf(&rdctldev, 
-                                "%s/tapctrlread%d", BLKTAP_DEV_DIR, minor);
+                                "%s/tapctrlread%d", BLKTAP_CTRL_DIR, minor);
                        blkif->fds[READ] = open_ctrl_socket(rdctldev);
 
 
                        asprintf(&wrctldev, 
-                                "%s/tapctrlwrite%d", BLKTAP_DEV_DIR, minor);
+                                "%s/tapctrlwrite%d", BLKTAP_CTRL_DIR, minor);
                        blkif->fds[WRITE] = open_ctrl_socket(wrctldev);
                        
                        if (blkif->fds[READ] == -1 || blkif->fds[WRITE] == -1) 
@@ -601,6 +601,8 @@ int open_ctrl_socket(char *devname)
        fd_set socks;
        struct timeval timeout;
 
+       if (mkdir(BLKTAP_CTRL_DIR, 0755) == 0)
+               DPRINTF("Created %s directory\n", BLKTAP_CTRL_DIR);
        ret = mkfifo(devname,S_IRWXU|S_IRWXG|S_IRWXO);
        if ( (ret != 0) && (errno != EEXIST) ) {
                DPRINTF("ERROR: pipe failed (%d)\n", errno);
diff -r b5cfbc8f7d2c -r 6955571ebfe5 tools/blktap/lib/blktaplib.h
--- a/tools/blktap/lib/blktaplib.h      Wed May 02 15:27:10 2007 +0100
+++ b/tools/blktap/lib/blktaplib.h      Wed May 02 18:36:57 2007 +0100
@@ -78,9 +78,10 @@ static inline int BLKTAP_MODE_VALID(unsi
 
 #define BLKTAP_IOCTL_KICK 1
 #define MAX_PENDING_REQS       BLK_RING_SIZE
-#define BLKTAP_DEV_DIR   "/var/run/tap"
+#define BLKTAP_DEV_DIR   "/dev/xen"
 #define BLKTAP_DEV_NAME  "blktap"
 #define BLKTAP_DEV_MINOR 0
+#define BLKTAP_CTRL_DIR   "/var/run/tap"
 
 extern int blktap_major;
 
diff -r b5cfbc8f7d2c -r 6955571ebfe5 tools/python/xen/xend/XendPIF.py
--- a/tools/python/xen/xend/XendPIF.py  Wed May 02 15:27:10 2007 +0100
+++ b/tools/python/xen/xend/XendPIF.py  Wed May 02 18:36:57 2007 +0100
@@ -205,7 +205,7 @@ class XendPIF(XendBase):
         ifs = [dev for dev, _1, _2 in linux_get_phy_ifaces()]
         if pif.get_VLAN() == -1:
             if pif.get_device() not in ifs:
-                pif.destroy()
+                XendBase.destroy(pif)
                 metrics.destroy()
                 return None
         else:
diff -r b5cfbc8f7d2c -r 6955571ebfe5 tools/python/xen/xend/server/SrvDaemon.py
--- a/tools/python/xen/xend/server/SrvDaemon.py Wed May 02 15:27:10 2007 +0100
+++ b/tools/python/xen/xend/server/SrvDaemon.py Wed May 02 18:36:57 2007 +0100
@@ -342,7 +342,7 @@ class Daemon:
                 log.info("Xend version: Unknown.")
 
             relocate.listenRelocation()
-            servers = SrvServer.create()
+            servers = SrvServer.create(status)
             servers.start(status)
             del servers
             
diff -r b5cfbc8f7d2c -r 6955571ebfe5 tools/python/xen/xend/server/SrvServer.py
--- a/tools/python/xen/xend/server/SrvServer.py Wed May 02 15:27:10 2007 +0100
+++ b/tools/python/xen/xend/server/SrvServer.py Wed May 02 18:36:57 2007 +0100
@@ -95,14 +95,6 @@ class XendServers:
         self.cleanup(signum, frame, reloading = True)
 
     def start(self, status):
-        # Running the network script will spawn another process, which takes
-        # the status fd with it unless we set FD_CLOEXEC.  Failing to do this
-        # causes the read in SrvDaemon to hang even when we have written here.
-        if status:
-            fcntl.fcntl(status, fcntl.F_SETFD, fcntl.FD_CLOEXEC)
-        
-        Vifctl.network('start')
-
         # Prepare to catch SIGTERM (received when 'xend stop' is executed)
         # and call each server's cleanup if possible
         signal.signal(signal.SIGTERM, self.cleanup)
@@ -249,7 +241,15 @@ def _loadConfig(servers, root, reload):
         servers.add(XMLRPCServer(XendAPI.AUTH_PAM, False))
 
 
-def create():
+def create(status):
+    # Running the network script will spawn another process, which takes
+    # the status fd with it unless we set FD_CLOEXEC.  Failing to do this
+    # causes the read in SrvDaemon to hang even when we have written here.
+    if status:
+        fcntl.fcntl(status, fcntl.F_SETFD, fcntl.FD_CLOEXEC)
+    
+    Vifctl.network('start')
+
     root = SrvDir()
     root.putChild('xend', SrvRoot())
     servers = XendServers(root)
diff -r b5cfbc8f7d2c -r 6955571ebfe5 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Wed May 02 15:27:10 2007 +0100
+++ b/tools/python/xen/xm/main.py       Wed May 02 18:36:57 2007 +0100
@@ -566,6 +566,8 @@ def get_single_vm(dom):
         uuids = server.xenapi.VM.get_by_name_label(dom)
         if len(uuids) > 0:
             return uuids[0]
+
+        refs = []
 
         try:
             domid = int(dom)
diff -r b5cfbc8f7d2c -r 6955571ebfe5 tools/python/xen/xm/xenapi_create.py
--- a/tools/python/xen/xm/xenapi_create.py      Wed May 02 15:27:10 2007 +0100
+++ b/tools/python/xen/xm/xenapi_create.py      Wed May 02 18:36:57 2007 +0100
@@ -374,7 +374,7 @@ class xenapi_create:
             "device":
                 vbd.attributes["device"].value,
             "bootable":
-                vbd.attributes["bootable"].value,
+                vbd.attributes["bootable"].value == "True",
             "mode":
                 vbd.attributes["mode"].value,
             "type":
@@ -401,9 +401,9 @@ class xenapi_create:
             if network_name in networks.keys():
                 network_uuid = networks[network_name]
             else:
-                networks = dict([(record['name_label'], record['uuid'])
-                                 for record in
-                                 server.xenapi.network.get_all_records()])
+                networks = dict([(record['name_label'], ref)
+                                 for ref, record in
+                                 
server.xenapi.network.get_all_records().items()])
                 if network_name in networks.keys():
                     network_uuid = networks[network_name]
                 else:
diff -r b5cfbc8f7d2c -r 6955571ebfe5 xen/Makefile
--- a/xen/Makefile      Wed May 02 15:27:10 2007 +0100
+++ b/xen/Makefile      Wed May 02 18:36:57 2007 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 3
 export XEN_SUBVERSION    = 1
-export XEN_EXTRAVERSION ?= .0-rc5$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .0-rc6$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.