All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Michal Novotny <minovotn@redhat.com>
Cc: "'xen-devel@lists.xensource.com'" <xen-devel@lists.xensource.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: [PATCH] pyGrub: Implement error handling on kernel/initrd extraction
Date: Tue, 27 Jul 2010 18:42:47 +0200	[thread overview]
Message-ID: <4C4F0C87.3050701@redhat.com> (raw)
In-Reply-To: <4C4E9D7F.1020008@redhat.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

      reply	other threads:[~2010-07-27 16:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-26 13:59 [PATCH] pyGrub: Implement error handling on kernel/initrd extraction Michal Novotny
2010-07-26 15:23 ` Ian Jackson
2010-07-27  8:49   ` Michal Novotny
2010-07-27 16:42     ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C4F0C87.3050701@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=minovotn@redhat.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.