From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Novotny Subject: Re: [PATCH] Introduce dom0-min-space configuration option Date: Mon, 26 Jul 2010 12:36:25 +0200 Message-ID: <4C4D6529.3090409@redhat.com> References: <4C3B59FE.2060201@redhat.com> <19516.43557.723062.885082@mariner.uk.xensource.com> <4C3D9E22.3030302@redhat.com> <19526.62789.227136.192517@mariner.uk.xensource.com> <4C47F857.4060606@redhat.com> <19529.48273.52500.896247@mariner.uk.xensource.com> <4C4D314A.7080605@redhat.com> <4C4D5C7D.3030302@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4C4D5C7D.3030302@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Paolo Bonzini Cc: "'xen-devel@lists.xensource.com'" , Ian Jackson List-Id: xen-devel@lists.xenproject.org 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. But if an error occurs within the extraction we could write something like "pygrub: No space left on device" but for virt-manager and libvirt-based tools it will return an error "Boot loader didn't return any data!" so it would make other confusion to the user since user won't be able to know what's going on. Maybe the check for this message (or any other message) coming from pygrub could help and this message could be raised in the body of XendError/VmError which would make user know what the problem is at least. Michal -- Michal Novotny, RHCE Virtualization Team (xen userspace), Red Hat