-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
debian: use tmpfs on /tmp + bump /tmp size on fedora #351
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestions inline, but not a real review because I'm not 100% sure how/if these will work (e.g., if debian already has a /tmp
fstab entry, and other logistics).
Finally: the process for working in this repo is:
$ make IMG_SFX
$ git add IMG_SFX <------- you have to commit it every single time, on every push
This is so incredibly annoying, that I encourage you to save this into .git/hooks/pre-push
:
#!/bin/bash
#
# 2024-01-25 esm
#
# FIXME: figure out if this is a PR push or a tag push
#
imgsfx=$(<IMG_SFX)
imgsfx_history=.imgsfx.history
if [[ -e $imgsfx_history ]]; then
if grep -q "$imgsfx" $imgsfx_history; then
echo "FATAL: $imgsfx has already been used" >&2
echo "Please rerun 'make IMG_SFX'" >&2
exit 1
fi
fi
echo $imgsfx >>$imgsfx_history
cache_images/debian_setup.sh
Outdated
# they don't have to write to persistent disk. | ||
# https://github.com/containers/podman/pull/22533 | ||
# We could create a systemd mount unit for it but appending fstab is easier. | ||
$SUDO sh -c 'echo "tmpfs /tmp tmpfs size=75%,mode=1777 0 0" >> /etc/fstab' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the standard way to do this is via $SUDO tee -a
:
echo "tmpfs ...." | $SUDO tee -a /etc/fstab
cache_images/fedora_setup.sh
Outdated
# Make /tmp tmpfs bigger, by default we only get 50%. Bump it to 75% so the tests have more storage. | ||
# Do not use 100% so we do not run out of memory for the process itself if tests start leaking big | ||
# files on /tmp. | ||
$SUDO mkdir /etc/systemd/system/tmp.mount.d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: mkdir -p
, so command won't fail if (some day) that directory already exists
cache_images/fedora_setup.sh
Outdated
# Do not use 100% so we do not run out of memory for the process itself if tests start leaking big | ||
# files on /tmp. | ||
$SUDO mkdir /etc/systemd/system/tmp.mount.d | ||
$SUDO sh -c 'echo -e "[Mount]\nOptions=size=75%%,mode=1777\n" > /etc/systemd/system/tmp.mount.d/override.conf' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same tee
suggestion as above.
Also, did you look into bumping |
well yeah that is what I figured but it gave a bunch of timebomb warning that I should fix so I didn't bother and called it a day..., will continue on Thursday |
Oh yeah. Easiest solution is to just bump the timebombs up by a month. |
That is the next step, but I think 4 Gb RAM is enough (if we remove the gigantic toolbox image). |
I could make it a systemd unit like on fedora then we know it will always overwrite it (Note that on systemd systems it will parse the fstab file and convert to mounts) I am not sur ehow it interacts with the systemd parser but traditionally it would just mount line by line, so even if there would be a tmpfs mount specified before it would have just over mounted it again AFAIK. |
Cirrus CI build successful. Found built image names and IDs:
|
|
To make tests faster setup a tmpfs on /tmp like fedora does so that test do not have to write everything onto persistent disk. Fixes containers#350 Signed-off-by: Paul Holzinger <[email protected]>
By default we only get 50% of all memory, given our programs don't take this much we should instead use more /tmp space in case we have to store more images. Signed-off-by: Paul Holzinger <[email protected]>
Cirrus CI build successful. Found built image names and IDs:
|
Not sure what to use as baseline, so I choose the last result of #349. Only one diff:
|
264ba1d
to
a531bef
Compare
Cirrus CI build successful. Found built image names and IDs:
|
Comparing against the previous build in this PR:
|
Now that we use /tmp we do not have to include the changes for /var/tmp. However we need r (read) access to /tmp as pasta opens the path with read access. Signed-off-by: Paul Holzinger <[email protected]>
Signed-off-by: Paul Holzinger <[email protected]>
Cirrus CI build successful. Found built image names and IDs:
|
Again, comparing against the previous build in this same PR. New pasta in f40 and rawhide, be careful
|
from containers/automation_images#351 Signed-off-by: Paul Holzinger <[email protected]>
@edsantiago PTAL and merge, images were merged in podman containers/podman#22533 |
/lgtm @Luap99 do you know the debian pasta status? Should I tag this (so renovatebot pulls it into every repo), or should we wait? |
If it passes podman I see no reason why not. AFAIK pasta is only used in buildah and podman so I don't see any particular risk with pasta on debian. |
To make tests faster setup a tmpfs on /tmp like fedora does so that test
do not have to write everything onto persistent disk.
Fixes #350