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

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] libxl: improve logging on failure to start device model
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Mon, 23 May 2011 10:41:34 +0100
Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Delivery-date: Mon, 23 May 2011 02:42:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1306143323.20576.42.camel@xxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1306143323.20576.42.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
# 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