Bug 476383
Summary: | Better error reporting from xend when dom0 is out of diskspace is needed | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Gurhan Ozen <gozen> | ||||
Component: | xen | Assignee: | Michal Novotny <minovotn> | ||||
Status: | CLOSED WONTFIX | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | low | ||||||
Version: | 5.4 | CC: | areis, clalance, jburke, minovotn, pbonzini, xen-maint | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2010-07-27 14:38:57 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 514498 | ||||||
Attachments: |
|
Description
Gurhan Ozen
2008-12-13 22:12:39 UTC
(In reply to comment #0) > Description of problem: > > I have tried to start a guest and got the following error: > libvir: Xen Daemon error : POST operation failed: (xend.err "Error creating > domain: (1, 'Internal error', 'xc_dom_do_gunzip: inflate failed > (rc=-5)\\n')") > > xend.log said: > ERROR (XendDomainInfo:212) Domain construction failed > Traceback (most recent call last): > File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line > 205, in create > vm.initDomain() > File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line > 1540, in initDomain > raise VmError(str(exn)) > VmError: (2, 'Invalid kernel', 'xc_dom_find_loader: no loader found\n') > [2008-12-13 16:40:55 xend.XendDomainInfo 6865] DEBUG (XendDomainInfo:1626) > XendDomainInfo.destroy: domid=24 > [2008-12-13 16:40:55 xend.XendDomainInfo 6865] ERROR (XendDomainInfo:1924) > Failed to restart domain 21. > Traceback (most recent call last): > File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line > 1907, in restart > new_dom = XendDomain.instance().domain_create(config) > File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomain.py", line 238, > in domain_create > dominfo = XendDomainInfo.create(config) > File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line > 205, in create > vm.initDomain() > File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line > 1540, in initDomain > raise VmError(str(exn)) > VmError: (2, 'Invalid kernel', 'xc_dom_find_loader: no loader found\n') > > I suppose you're trying to run PV guest, right? Nevertheless adding some check for enough space on dom0 on each domain create call could be a good idea. Michal Created attachment 431218 [details]
Patch to introduce dom0-min-space configuration option
It appears to be coming from image.py and X86_Linux_ImageHandler (which is available for PV guests) which is being called from the XendDomainInfo.py on create, most probably from lines 2065 to 2067:
self.image = image.create(self,
self.info['image'],
self.info['device'])
Also, the extraction of kernel and ramdisk files itself is done by pygrub but we can't rely on this one since the file could be partially extracted. The xc_dom_do_unzip() function initializes the gzip stream and tries to inflate (decompress) it. The problem within the decompression implementations (no matter whether gzip, LZMA or any other) is that when the input data are not correct it just fails with some error code like Z_BUF_ERROR which is code -5 in the zlib.h header file. This means that we can't know in advance that the stream could be OK or not. Since this is because of the insufficient data on the host (dom0) I recommend adding one new dom0-min-* variable, we already have dom0-min-mem in the configuration file which makes domUs *not run* when the dom0 would be having less memory after particular domain starts up.
I was thinking about something similar to this one, called e.g. dom0-min-space or something similar in the configuration file that would be the minimum space on the dom0 and that dom0 will refuse to start up the new guest when this minimum not being met with the warning the dom0 free space dropped below this value. I'm attaching the patch to introduce the dom0-min-space option right now.
Michal
If there is "very little" space (e.g. 1 megabyte) and pygrub fails really early, that's not a problem because python will exit with a status of 1. I don't think an option like dom0-min-space is worthwhile. A server running out of disk space will have other issues and anyway the option is inherently racy (what if another program is writing to log files continuously and very fast? that's a common cause of disk full situations). I think we can close it as WONTFIX, as Daniel suggested. Closing after talking to Michal. |