Bug 15536 - When saving ptest artefacts for failed tests, recursive directories are being copied
Summary: When saving ptest artefacts for failed tests, recursive directories are being...
Status: RESOLVED FIXED
Alias: None
Product: Package Testing (ptest)
Classification: QA/Testing
Component: ptest (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: High normal
Target Milestone: 5.1 M3
Assignee: Alexis Lothoré
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2024-06-30 22:22 UTC by Richard Purdie
Modified: 2024-07-11 16:13 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Purdie 2024-06-30 22:22:07 UTC
We've been seeing space issues on the autobuilder, sometimes with a lack of inodes.

Upon investigation, we found:

~/yocto-worker/qemux86-64-ptest/build/build/tmp/log/oeqa/artifacts

contained huge numbers of inodes (approx. 105063410 from du --inodes -s)

This was from a util-linux ptest failure which resulted in recursive directories of the form:

build/tmp/log/oeqa/artifacts/usr/lib/util-linux/ptest/tests/output/lsblk/dumps/simple-lvm/sys/block/loop0/holders/dm-0/slaves/loop0/holders/dm-0/slaves/loop0/holders/dm-0/slaves/loop0/holders/dm-0/slaves/loop0/holders

We need to make the artefact saving preserve symlinks and/or stop at a sensible depth.
Comment 1 Alexis Lothoré 2024-07-02 14:04:28 UTC
I see two ways of fixing this without spawning an over-complicated solution evaluating each file to check if any is a symlink:
- create an archive with all the files we want to retrieve, and then scp/uncompress this archive
- switch to rsync

I kind of remember that there was constraints which prevented rsync usage for this use case, but I don't remember the details. I will check again and come up with a fix for this
Comment 2 Richard Purdie 2024-07-03 17:19:02 UTC
(In reply to Alexis Lothoré from comment #1)
> I see two ways of fixing this without spawning an over-complicated solution
> evaluating each file to check if any is a symlink:
> - create an archive with all the files we want to retrieve, and then
> scp/uncompress this archive

I'd worry that we don't have the space on target to be able to do this in many cases unfortunately.

> - switch to rsync
> 
> I kind of remember that there was constraints which prevented rsync usage
> for this use case, but I don't remember the details. I will check again and
> come up with a fix for this

The issue with this one would be the requirement to have rsync in the target image which we can't always guarantee either.

There may be a third option which is to pipe tar over ssh since tar can handle symlinks and loops.

The rsync solution is probably most viable/easiest?