cloudbase / garm-provider-common

Common functionality for GARM providers
https://github.com/cloudbase/garm-provider-common
Apache License 2.0
0 stars 5 forks source link

feat: symlink cached runner instead of copy #25

Closed maigl closed 6 months ago

maigl commented 6 months ago

This should (sometimes dramatically) improve boot times if cache runner image is used. We currently see that copying those ~500 MB takes around 3 Minutes during boot .. I don't know why it's that slow, and later the disk IO speed seems to be much better, but anyway we could skip that copy step all together.

The only issue is see is if /home is mounted on a different disk than /opt , in this case the symlink would probably not be what you would want. Do you think that is an issue? Am I missing other problems with that?

gabriel-samfira commented 6 months ago

Generally speaking as long as symlink targets are absolute paths, it does not matter if the symlink points to a different filesystem. Hard links will complain, but symlinks are just pointers.

The $CACHED_RUNNER contains an absolute path in /opt, so it should be fine to create a link to "$CACHED_RUNNER/actions-runner"