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

[Xen-devel] Re: [PATCH] pyGrub: Implement error handling on kernel/initrd extraction


  • To: Michal Novotny <minovotn@xxxxxxxxxx>
  • 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
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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


 


Rackspace

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