[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] Re: [PATCH] Introduce dom0-min-space configuration option
On 07/26/2010 01:31 PM, Paolo Bonzini wrote: 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: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 tosay 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) shouldnot 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. PaoloPaolo, that's correct but the issue here is that we don't know until weextract 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 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@xxxxxxxxxx>, RHCE Virtualization Team (xen userspace), Red Hat _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |