Skip to content
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

[WIP] lib/deploy: Check space before copying into /boot #1830

Closed

Conversation

rfairley
Copy link
Member

Pushing this up as a draft, WIP for #1648 .

To finish:

Can be tested by (do this in a virtual machine which is OK to break):

# Take up space in /boot so that the partition becomes nearly full around 99%
dd if=/dev/zero of=/boot/some_empty_file bs=file_size count=<number of bytes to fill>
# Try pinning the current deployment, then upgrading or deploying a new tree that has a different /boot
ostree admin pin 0
# E.g. from Fedora 29:
ostree remote add --set=gpgkeypath=/etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-28-primary fedora-atomic-28 https://kojipkgs.fedoraproject.org/atomic/repo/
rpm-ostree rebase fedora-atomic-28:fedora/28/x86_64/atomic-host

Check free space on the filesystem before copying the kernel
executable, initramfs, and devicetree into the boot partition.

Both the get_kernel_from_tree_usrlib_modules() and
get_kernel_from_tree_legacy_layouts() code paths query the size
of the kernel, initramfs, and devicetree. If hardlinking fails,
then sum up what still needs to be copied, and fail if it is
greater than the disk space available.

Fixes: ostreedev#1648
@openshift-ci-robot
Copy link
Collaborator

@rfairley: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci
Copy link

openshift-ci bot commented Apr 6, 2022

@rfairley: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/sanity a4173ee link true /test sanity

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@cgwalters
Copy link
Member

I'd forgotten about this one, sorry...this fix was done in #2847

@cgwalters cgwalters closed this May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants