Commit Graph

8 Commits

Author SHA1 Message Date
Erik Botö 56f39bcf22 bitbake: lib/bb/monitordisk.py: fix spelling in error text
(Bitbake rev: 78efda1224a99ed3d2ca6befb9fd719d82f6b0ae)

Signed-off-by: Erik Botö <erik.boto@pelagicore.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-02 15:41:21 +01:00
Robert Yang 612c25c597 bitbake: monitordisk.py: disable inode checking for btrfs
The btrfs doesn't have static inode, so disable the inode check for it,
the previouse patch has set it:

minInode = None

But this is incorrect, the minInode is just a temporary variable, it
should be:

self.devDict[k][2] = None

[YOCTO #3609]

(Bitbake rev: 7e45149c292bc92314af9b42962fde8f603a179f)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15 15:57:31 +01:00
Robert Yang af9f5843d9 bitbake: monitordisk.py: monitor disks based on path
The previous monitor is based on the disk, and one disk only can have
one action, this limits its function, for example we set this in the
current local.conf:

BB_DISKMON_DIRS = "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100GM,1K"

Before:
  * If TMPDIR, DL_DIR and SSTATE_DIR are on the same disk partition,
    only the last line "ABORT,${SSTATE_DIR},100GM,1K" works

  * If TMPDIR, DL_DIR and SSTATE_DIR are on the different disk partitions,
    only the last three lines (ABORT) work.

These are not what we expect, now:
  * We monitor the disk based on the path and action, so all the six lines
    will work no matter whether they are on the same disk partition or
    not.

  * The out put format will be:
    WARNING: The free space of /path/to/directory (device) is running low (XXGB left)

[YOCTO #3995]

(Bitbake rev: e22a576672ee4a40b44f7a826a78a77fc07e9177)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:55:38 +00:00
Robert Yang b0587077a4 bitbake: monitordisk.py: disable the inode checking for some fs
There is an error when use disk monitor on btrfs:
WARNING: The free inode of rootfs is running low (0.000K left)
ERROR: Immediately abort since the disk space monitor action is "ABORT"!

This is beucase some fs formats' statvfs.f_files (inodes) is zero, thus
the statvfs.f_favail (free inodes) is zero, too, this a feature of the
fs, we disable the inode checking for such a fs.

[YOCTO #3609]

(Bitbake rev: b2ada3ad5f7aefff107f013e0c9decea481c7ef6)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:36 +00:00
Kang Kai b2a959a0ce bitbake: monitordisk: fire event DISKFULL when terminate build
Part of [Yocto #2168]

Add a event DiskFull to descript the termination by disk monitor.

Update check() to fire the event DiskFull when terminates the build.
This could help UIs to deal this scenario and show more information to
end user.

(Bitbake rev: 0a0fca3d94a1db6458ae21501a66461a334410ed)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 15:28:39 +01:00
Robert Yang 0d5e808777 diskspace monitor: assign a default value when only of the interval is set
Assign a default value to the other one when either disk space interval
or amount of inodes interval value is set for example:

BB_DISKMON_WARNINTERVAL = "50M,"
or
BB_DISKMON_WARNINTERVAL = ",5K"

The diskspace monitor would not enable in the past, that seemed
unreasonable, assign a default value to the other one currently, so the
monitor will be enabled, and will warn both of diskspace and free
amount of inode if they have been set in BB_DISKMON_DIRS.

(Bitbake rev: 09592c119550550edcc59c871f754536d5b7bf65)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-11 00:04:40 +01:00
Richard Purdie ff73b02a72 meta/classes: Convert to use appendVar and appendVarFlags
(From OE-Core rev: 3b57de68e70e77dbc03c0616a83a29a2e99e40b4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05 10:36:53 -08:00
Robert Yang 9674ea28ff V5 Disk space monitoring
Monitor disk availability and take action when the free disk space or
amount of free inode is running low, it is enabled when BB_DISKMON_DIRS
is set.

* Variable meanings(from meta-yocto/conf/local.conf.sample):

  # Set the directories to monitor for disk usage, if more than one
  # directories are mounted in the same device, then only one directory
  # would be monitored since the monitor is based on the device.
  # The format is:
  # "action,directory,minimum_space,minimum_free_inode"
  #
  # The "action" must be set and should be one of:
  # ABORT: Immediately abort
  # STOPTASKS: The new tasks can't be executed any more, will stop the build
  #           when the running tasks have been done.
  # WARN: show warnings (see BB_DISKMON_WARNINTERVAL for more information)
  #
  # The "directory" must be set, any directory is OK.
  #
  # Either "minimum_space" or "minimum_free_inode" (or both of them)
  # should be set, otherwise the monitor would not be enabled,
  # the unit can be G, M, K or none, but do NOT use GB, MB or KB
  # (B is not needed).
  #BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
  #
  # Set disk space and inode interval (only works when the action is "WARN",
  # the unit can be G, M, or K, but do NOT use the GB, MB or KB
  # (B is not needed), the format is:
  # "disk_space_interval, disk_inode_interval",  the default value is
  # "50M,5K" which means that it would warn when the free space is
  # lower than the minimum space(or inode), and would repeat the action
  # when the disk space reduces 50M (or the amount of inode reduces 5k)
  # again.
  #BB_DISKMON_WARNINTERVAL = "50M,5K"

[YOCTO #1589]
(Bitbake rev: 4d173d441d2beb8e6492b6b1842682f8cf32e6cc)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-26 11:05:27 +00:00