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] Introduce dom0-min-space configuration option

To: Michal Novotny <minovotn@xxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] Introduce dom0-min-space configuration option
From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Date: Mon, 26 Jul 2010 13:18:30 +0200
Cc: "'xen-devel@xxxxxxxxxxxxxxxxxxx'" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Delivery-date: Mon, 26 Jul 2010 04:23:00 -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=gNrNgFuBmow+3PBNBL+M9QMSUGRVr56tJMGX6cbN6WY=; b=jEbW1/0P8fTDR63v9bpM4ymIekzHugB8b/wnLZkLK2cIzoyDhu0HI3fgyXUtxbfrsx u3198fXBDjhVci8JwxNO/zWYNvlzarJ305iyQ484GNRid2h5ycyJjb71uWxtKLzhM2Ye Euwg8ukvzykmB0kQrTTKyZ6GqSKvMqyfYnQAM=
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=FvhEOWTcsakWFRvrZHIs1z24kJJuSmxoykQMyq/AuNbXKPyvCbQQzBoHy7MIVxcKvP fFPVSwr+clT9VvMEZiAZCrvhgTajhXOJ4xNvDzLe8Hc0fyCVLZ04g1mjnsGF8y7mHSjs K2Ht0uehUBJPNyB97+ataPZLLGxuKGAM5aikU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C4D6529.3090409@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: <4C3B59FE.2060201@xxxxxxxxxx> <19516.43557.723062.885082@xxxxxxxxxxxxxxxxxxxxxxxx> <4C3D9E22.3030302@xxxxxxxxxx> <19526.62789.227136.192517@xxxxxxxxxxxxxxxxxxxxxxxx> <4C47F857.4060606@xxxxxxxxxx> <19529.48273.52500.896247@xxxxxxxxxxxxxxxxxxxxxxxx> <4C4D314A.7080605@xxxxxxxxxx> <4C4D5C7D.3030302@xxxxxxxxxx> <4C4D6529.3090409@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/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?

Paolo

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

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