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

[Xen-devel] [PATCH] libxl: improve logging on failure to start device model



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1306143609 -3600
# Node ID 574a94c82cb5ed0f41b68239075b5f97f3fff639
# Parent  25bcb1c381a32b9a489c3879e70227ff9387bc7c
libxl: improve logging on failure to start device model.

Distinguish between device model dying during startup (libxl__spawn_check
returns failure) and timing out while waiting for the xenstore node to show up.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
This patch depends on the four patches in "libxl: improve error handling when
device model fails to start early on" and in particular "[PATCH 4 of 4] libxl:
add statup checks to libxl__wait_for_device_model"

diff -r 25bcb1c381a3 -r 574a94c82cb5 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c        Mon May 23 10:35:56 2011 +0100
+++ b/tools/libxl/libxl_device.c        Mon May 23 10:40:09 2011 +0100
@@ -447,6 +447,8 @@ int libxl__wait_for_device_model(libxl__
         if ( starting ) {
             rc = libxl__spawn_check(gc, starting->for_spawn);
             if ( rc ) {
+                LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
+                           "Device Model died during startup");
                 rc = -1;
                 goto err_died;
             }
@@ -489,10 +491,10 @@ again:
             }
         }
     }
+    LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "Device Model not ready");
 err_died:
     xs_unwatch(xsh, path, path);
     xs_daemon_close(xsh);
-    LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "Device Model not ready");
 err:
     return -1;
 }

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


 


Rackspace

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