From: Michal Novotny <minovotn@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "'xen-devel@lists.xensource.com'" <xen-devel@lists.xensource.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: [PATCH] Introduce dom0-min-space configuration option
Date: Mon, 26 Jul 2010 13:48:17 +0200 [thread overview]
Message-ID: <4C4D7601.7010503@redhat.com> (raw)
In-Reply-To: <4C4D71FB.6020806@redhat.com>
On 07/26/2010 01:31 PM, Paolo Bonzini wrote:
> On 07/26/2010 01:21 PM, Michal Novotny wrote:
>> On 07/26/2010 01:18 PM, Paolo Bonzini wrote:
>>> On 07/26/2010 12:36 PM, Michal Novotny wrote:
>>>> On 07/26/2010 11:59 AM, Paolo Bonzini wrote:
>>>>> On 07/26/2010 08:55 AM, Michal Novotny wrote:
>>>>>> Or do you think that we should alter the message in gunzip
>>>>>> function to
>>>>>> say that there's an error in data stream (premature end of data
>>>>>> stream)
>>>>>> and that user should check for enough space on dom0?
>>>>>
>>>>> No, the gunzip function (in libxc, if I understood the context)
>>>>> should
>>>>> not even be called if pygrub could not write the file. Instead, it
>>>>> should print something like
>>>>>
>>>>> pygrub: No space left on device
>>>>>
>>>>> and exit. There's absolutely no error checking here:
>>>>>
>>>>> data = fs.open_file(chosencfg["kernel"]).read()
>>>>> (tfd, bootcfg["kernel"]) = tempfile.mkstemp(prefix="boot_kernel.",
>>>>> dir="/var/run/xend/boot")
>>>>> os.write(tfd, data)
>>>>> os.close(tfd)
>>>>>
>>>>> (and likewise for initrd) and that's the bug.
>>>>>
>>>>> Paolo
>>>>
>>>> Paolo, that's correct but the issue here is that we don't know
>>>> until we
>>>> extract it from image file.
>>>
>>> os.write would return -1 and set errno to ENOSPC (besides, any other
>>> errno should get the same treatment), no?
>>
>> Maybe, I need to check the docs first but you're most likely right about
>> this. Nevertheless this is the pygrub code AFAIK so some patch for xend
>> would be necessary as well, otherwise libvirt-based tools would complain
>> with "Boot loader didn't return any data!" message.
>
> That's the least of the problems, if a sensible error message is
> present too. I agree with Ian, let's first fix the main cause. Then
> we can see what the fallout is.
>
> Paolo
Well, the root cause is insufficient disk space since without
insufficient disk space issue we won't be running into those issues. In
fact there are 2 points of view on this one:
1) implement a check for enough disk space (this is what I did)
2) implement the proper error message saying there is not enough space
to extract it (ENOSPC) - this is what you and Ian suggest
I am not telling any of those options is bad, nevertheless it's based
just on the point of view. So, is option 2 better and worth
implementing rather than limiting the domain run only to case with
enough space on dom0?
Michal
--
Michal Novotny<minovotn@redhat.com>, RHCE
Virtualization Team (xen userspace), Red Hat
next prev parent reply other threads:[~2010-07-26 11:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-12 18:07 [PATCH] Introduce dom0-min-space configuration option Michal Novotny
2010-07-13 18:02 ` Ian Jackson
2010-07-14 11:23 ` Michal Novotny
2010-07-21 3:52 ` Michal Novotny
2010-07-21 13:25 ` Ian Jackson
2010-07-22 7:50 ` Michal Novotny
2010-07-22 7:52 ` Michal Novotny
2010-07-23 16:00 ` Ian Jackson
2010-07-26 6:55 ` Michal Novotny
2010-07-26 9:59 ` Paolo Bonzini
2010-07-26 10:36 ` Michal Novotny
2010-07-26 11:18 ` Paolo Bonzini
2010-07-26 11:21 ` Michal Novotny
2010-07-26 11:31 ` Paolo Bonzini
2010-07-26 11:48 ` Michal Novotny [this message]
2010-07-26 12:23 ` Paolo Bonzini
2010-07-26 12:48 ` Michal Novotny
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=4C4D7601.7010503@redhat.com \
--to=minovotn@redhat.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=pbonzini@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).