mirror of
git://git.yoctoproject.org/yocto-autobuilder2.git
synced 2025-07-19 12:49:03 +02:00
builders: Handle different distro /tmp mount point output
Simplfy the space command to directly use findmnt and output in bytes to simplify the expression. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
d809e29a23
commit
12f10fc494
|
@ -74,7 +74,9 @@ def canStartBuild(builder, wfb, request):
|
|||
for mountpoint in checks:
|
||||
threshold, name = checks[mountpoint]
|
||||
|
||||
cmd = yield shell("df -BG | grep $(findmnt -T %s | awk '{print $2}' | sed -n 2p) | awk '{print $4}' | sed 's/[^0-9]*//g'" % mountpoint, wfb.worker, builder)
|
||||
threshold = threshold * 1024 *1024 * 1024
|
||||
|
||||
cmd = yield shell("findmnt -T %s --df -n --bytes | awk '{print $5}'" % mountpoint, wfb.worker, builder)
|
||||
if int(cmd.stdout) < threshold:
|
||||
log.msg("Detected {0} GB of space available on {1}, less than threshold of {2} GB. Can't start build".format(cmd.stdout, name, threshold))
|
||||
wfb.worker.quarantine_timeout = 10 * 60
|
||||
|
|
Loading…
Reference in New Issue
Block a user