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] Re: [PATCH] pyGrub: Implement error handling on kernel/initr

To: Michal Novotny <minovotn@xxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] pyGrub: Implement error handling on kernel/initrd extraction
From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Date: Tue, 27 Jul 2010 18:42:47 +0200
Cc: "'xen-devel@xxxxxxxxxxxxxxxxxxx'" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Delivery-date: Tue, 27 Jul 2010 07:43:48 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=MX8Ddql5khHIfSx0e5S1Hb2uNkQVPi6efa9kHPH5FU8=; b=XRJtXZ8kxKEbHcnnqDodY0i1ZSi9YVCk69dvMhx0b3FZqdYEqWLEr7bkZLEf4caXPI XdI868GRnlO9uXSzL49R5csgiXnSw9aelwbg7ZoJpFg8ADAGfIiTaiCmCthjuRVkiQeq GEYH1oSoUzFfiElYan6z8kXTSTKBVxgF3J3PI=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=hG6BTNur7cKqZD54KbIJG6GxnCeEAZ0AXjUaX8bsxaKa3O+hWZBsA8PGISetT/McsS 8WvjIhBeauv0cv/YlefXPjT/5hGFZHC1Zh407Qcfj/LshVfC4moW09rAmfwOfXCzgfsV 7WLy6E1ueGOGPlFsTPk+yb5Ej7gNEkPJPw2ks=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C4E9D7F.1020008@xxxxxxxxxx>
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: <4C4D94D8.3040609@xxxxxxxxxx> <19533.43140.441316.310245@xxxxxxxxxxxxxxxxxxxxxxxx> <4C4E9D7F.1020008@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Thunderbird/3.0.5
On 07/27/2010 10:49 AM, Michal Novotny wrote:
On 07/26/2010 05:23 PM, Ian Jackson wrote:
Michal Novotny writes ("[Xen-devel] [PATCH] pyGrub: Implement error
handling on kernel/initrd extraction"):
Since we agreed that introduction of dom0-min-space is not the right way
to go, it's superseeded by this patch.
...
- os.write(tfd, data)
- os.close(tfd)
+ try:
+ os.write(tfd, data)
+ os.close(tfd)
+ except OSError, e:
+ print>>sys.stderr, "pyGrub: %s" % str(e)
+ sys.exit(1)
Thanks, but this is not even slightly correct.

Ian.

Why not? It's been tested and working fine. The try/except block is
working fine and sys.exit(1) is necessary to terminate pyGrub.

If os.write gets the OSError it will write the error message as part of the backtrace, and exit anyway.

That said I could reproduce the failure Michal started from, which is this error:

Error creating domain: (1, 'Internal error', 'xc_dom_do_gunzip: inflate failed (rc=-5)\\n')

But I think xend can be forgiven for not treating very well about out-of-disk-space situations... let's just not care.

Paolo

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

<Prev in Thread] Current Thread [Next in Thread>