Open dustymabe opened 6 years ago
Any update on this? I can look into this if it'd be handy to have. I imagine there would be some way to query the disk space available, then give an error if it is less than the size of the packages to download. @cgwalters what do you think of the complexity of this?
I can look into this if it'd be handy to have.
thanks robert. Funny enough, I actually hit this again today. @cgwalters I know we just discussed that labeling the difficulty of tasks is arbitrary, but I figure I'll ask, do you think this is something @rfairley could pick up with some guidance?
Had a look into reproducing this - when pinning deployments with different BaseCommit
s i.e. after upgrading, I can see /boot
go up to > 200MB used. I just need to figure out how to set the partition of the virtual machine to lower so that I can hit the max space used for /boot
and reproduce the issue (right now when I spin up a F28AH Vagrant box the partition where /boot
is mounted defaults to a size of 1GB).
Reproduced this after:
vagrant init fedora/27-atomic-host && vagrant up && vagrant ssh
# ostree admin pin 0
# 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
Output is:
# rpm-ostree rebase fedora-atomic-28:fedora/28/x86_64/atomic-host
2956 metadata, 15046 content objects fetched; 426106 KiB transferred in 295 seconds
Copying /etc changes: 21 modified, 0 removed, 57 added
error: Installing kernel: regfile copy: No space left on device
Now will look into adding a check. Both cases run into the error in postprocessing scripts I think, will start from there:
rpm-ostree-2018.9/src/libpriv/rpmostree-postprocess.c:1422: return glnx_throw_errno_prefix (error, "regfile copy");
rpm-ostree-2018.9/src/libpriv/rpmostree-postprocess.c:1779: return glnx_throw_errno_prefix (error, "regfile copy");
libglnx/glnx-fdio.c:942: return glnx_throw_errno_prefix (error, "regfile copy");
The rpm-ostree code isn't involved here - except when rpm-ostree initramfs --enable
. This is a libostree issue.
Probably the best approach to fixing this would be to add the size of the kernel/initramfs as metadata on the commit object (along with the bootcsum
).
Ah, thanks! Makes sense, now looking at src/libostree/ostree-sysroot-deploy.c
. Adding to the metadata of the ostree commit (and checking the size of /boot
against the kernel/initramfs size in the metadata) sounds good.
Can later see if a check at rpm-ostree initramfs --enable
can/needs to be done.
hmm. I wonder if https://github.com/ostreedev/ostree/pull/2847 means we can close this? or at least modify the scope.
I hit a case today where I ran out of disk space on my /boot/ partition. This was mainly because I had pinned some deployments that I wanted to keep around, but I still ended up with a failure:
Here is the status after the failure:
I unpinned a deployment and ran a
rpm-ostree cleanup -r
, so I'm unblocked. This is something to consider, though.