Bug 2168

Summary: HOB should check for available disk space
Product: [Build System, Metadata & Runtime] Hob Reporter: Eric Bénard <eric>
Component: hobAssignee: Kai Kang <kai.kang>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: Low CC: jessica.zhang, jiajun.xu, liang.li2, poky.bs.watcher, poky.watcher, zhenfeng.zhao
Version: unspecified   
Target Milestone: 1.3 M3   
Hardware: x86   
OS: Multiple   
Whiteboard: (P2)(QA Testing Completed)(Done)
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Eric Bénard 2012-03-23 16:03:30 UTC
before starting a build so that the user gets warned that he may fill his disk and that the build will fail.
This suppose hob has a level of minimal disk space required depending on some options (sdk or no sdk, X11 or no X11 ...)
Else in a recent build several task failed and then I got :

Traceback (most recent call last):
  File "/home/ebenard/OE-CORE/openembedded-core/bitbake/lib/bb/ui/hob.py", line 45, in event_handle_idle_func
    hobHandler.handle_event(event)
  File "/home/ebenard/OE-CORE/openembedded-core/bitbake/lib/bb/ui/crumbs/hobeventhandler.py", line 168, in handle_event
    self.build.handle_event(event)
  File "/home/ebenard/OE-CORE/openembedded-core/bitbake/lib/bb/ui/crumbs/runningbuild.py", line 212, in handle_event
    current = self.tasks_to_iter[(package, task)]
KeyError: (None, None)
Comment 1 Kai Kang 2012-07-27 09:07:16 UTC
There is a feature named disk monitor in Yocto, and if you set BB_DISKMON_DIRS in your local.conf, when disk/inode space of the device which contains the monitored directory running low, the disk monitor will terminate the build and give warning message.

I update the disk monitor to fire event to tell UIs that the build is terminated, then when the spaces of disk or inode under the threshold set in BB_DISKMON_DIRS, the build will be teminated and hob show it to user.

The detail of BB_DISKMON_DIRS please check local.conf.extend
Comment 2 Kai Kang 2012-08-03 01:33:05 UTC
patch merged, yocto commit 6a293985b2db589c9fae777be00d3c20ed1ec49f
Comment 3 liang li 2012-08-08 06:47:34 UTC
verified on :
git info: 87ffccb5dc184375e8807834e3b9b08ada708105
git branch: poky/master
test env :
host :ubuntu 12.04 x86_64

free disk space of the host is 3.0GB.
1.set build environment
2. following line is added to "conf/local.conf":
BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},10G,100K"
or 
BB_DISKMON_DIRS = "ABORT,${TMPDIR},10G,100K"

3.run "hob" in the build directory
 after "Select a machine" and "Select a base image" and click "Build image" button ,the hob will not build the image and popup "Hob cannot build your image" alert information.
 when click "Edit image configruarion" button,then click "Build image" button again,the same as the above will be met.

 when view the Log of hob ,"the free space of rootfs is running low (2.971GB left)
" info will be found.

no Traceback info is found in the "hob" command terminal.