rebuilds/kernel: better logging of disk space
Trying to report situations where rebuild fails of low disk space.
This commit is contained in:
parent
e973ac70e0
commit
55feba1310
2 changed files with 35 additions and 16 deletions
|
|
@ -46,3 +46,11 @@ adjust+:
|
|||
- how: fmf
|
||||
filter: "tag:gate-build"
|
||||
test: '^/tests/rebuilds/kernel$'
|
||||
|
||||
provision:
|
||||
- how: virtual
|
||||
hardware:
|
||||
disk:
|
||||
- size: ">= 120 GiB"
|
||||
cpu:
|
||||
processors: ">= 8"
|
||||
|
|
|
|||
|
|
@ -61,6 +61,24 @@ REBOOTCOUNT="${REBOOTCOUNT:-0}"
|
|||
|
||||
unset ARCH
|
||||
|
||||
|
||||
function log_disk_space () {
|
||||
rlLogInfo 'Disk space:'
|
||||
|
||||
df -h | while read line; do
|
||||
rlLogInfo " $line"
|
||||
done
|
||||
}
|
||||
|
||||
function log_rpms () {
|
||||
rlLogInfo 'Installed packages:'
|
||||
|
||||
rpm -qa | sort | while read line; do
|
||||
rlLogInfo " $line"
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
buTestHeader
|
||||
|
|
@ -71,22 +89,6 @@ rlJournalStart
|
|||
rlLogInfo "REBOOTCOUNT=$REBOOTCOUNT"
|
||||
rlLogInfo "RPM_BUILD_ID=$RPM_BUILD_ID"
|
||||
|
||||
# We'll use a lot of disk space (tens of GBs at least). The root FS
|
||||
# often is the most beefy one in CI environemnts. Let's use it but also
|
||||
# let's log what's actually available.
|
||||
export TMPDIR=/test_tmp_root
|
||||
rlRun "mkdir -p $TMPDIR"
|
||||
rlLogInfo "TMPDIR=$TMPDIR"
|
||||
rlLogInfo 'Disk space:'
|
||||
df -h | while read line; do
|
||||
rlLogInfo " $line"
|
||||
done
|
||||
|
||||
rlLogInfo 'Installed packages:'
|
||||
rpm -qa | sort | while read line; do
|
||||
rlLogInfo " $line"
|
||||
done
|
||||
|
||||
rlRun "AFTER_REBOOT=no"
|
||||
|
||||
if [ "$REBOOTCOUNT" != "0" ]; then
|
||||
|
|
@ -107,6 +109,9 @@ rlJournalStart
|
|||
rlRun "rngd -r /dev/hwrandom || rngd -r /dev/urandom"
|
||||
|
||||
buPrepareSRPM "$KERNEL" "--nobest"
|
||||
|
||||
log_disk_space
|
||||
log_rpms
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
|
|
@ -128,6 +133,9 @@ rlJournalStart
|
|||
else
|
||||
rlLogInfo "rpmbuild kernel failed"
|
||||
rlRun "RPMBUILD_OK=no"
|
||||
|
||||
log_disk_space
|
||||
log_rpms
|
||||
fi
|
||||
rlBundleLogs "Build-log" BUILD_LOG
|
||||
rlPhaseEnd
|
||||
|
|
@ -153,6 +161,9 @@ rlJournalStart
|
|||
else
|
||||
rlRun "grub2-set-default 2"
|
||||
fi
|
||||
|
||||
log_disk_space
|
||||
log_rpms
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "Reboot"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue