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] Improve error reporting in XenD

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [patch] Improve error reporting in XenD
From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Date: Tue, 29 Aug 2006 18:12:22 +0100
Delivery-date: Tue, 29 Aug 2006 10:12:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Reply-to: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
In the XenD code which deals with dispatching of requests (SrvBase.py) the
dispatch process is obviously wrapped in a try/except block. Unfortunately
in the except block, the HTTP error code is never updated to indicate a failure
condition.  

So, for example, if you try to create a domain requesting 3 GB of memory,
and Dom0 fails to balloon, XenD will happily still return 'HTTP 202 OK'
even though the domain creation failed. This leaves apps talking to XenD
no way to discover that there was a failure in the create operation, other
than telling the user to look in /var/log/xend.log where the details are
logged.

The attached patch sets the HTTP return code to '500 Internal Error' when
a request throws an exception. This lets client detect & report the failure
of domain creation immediately, improving the end user experiance

As an example user interaction with current behaviour. libvirt is told by
XenD that domain creation succeeded, so it goes onto to wait for devices
where upon its told there is no such domain:

  Starting install...
  libvir: Xen Daemon error : POST operation failed: No such domain demo12
  Failed to get devices for domain demo12

With the attached patch applied, the initial domain creation failure can 
be detected & reported immediately:

  Starting install...
  libvir: Xen Daemon error : POST operation failed: (xend.err 'Error creating 
domain: The privileged domain did not balloon!')
  Failed to create domain demo12


Signed-off by: Daniel P. Berrange <berrange@xxxxxxxxxx>


Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

Attachment: xend-error-500.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [patch] Improve error reporting in XenD, Daniel P. Berrange <=