mirror of
git://git.yoctoproject.org/yocto-autobuilder2.git
synced 2026-01-27 11:01:23 +01:00
builders: Fix disk space error message
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
4397ebf306
commit
1ee8bfa19c
|
|
@ -77,12 +77,12 @@ def canStartBuild(builder, wfb, request):
|
|||
for mountpoint in checks:
|
||||
threshold, name = checks[mountpoint]
|
||||
|
||||
threshold = threshold * 1024 *1024 * 1024
|
||||
bytes_in_gb = 1024 * 1024 * 1024
|
||||
|
||||
cmd = yield shell("findmnt -T %s --df -n --bytes | awk '{print $5}'" % mountpoint, wfb.worker, builder)
|
||||
space = int(cmd.stdout.strip())
|
||||
if space < threshold:
|
||||
log.msg("Detected {0} GB of space available on {1}, less than threshold of {2} GB. Can't start build".format(space, name, threshold))
|
||||
if space < threshold * bytes_in_gb:
|
||||
log.msg("Detected {0} GB of space available on {1}, less than threshold of {2} GB. Can't start build".format(space / bytes_in_gb, name, threshold))
|
||||
wfb.worker.quarantine_timeout = 10 * 60
|
||||
wfb.worker.putInQuarantine()
|
||||
return False
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user