Change feed ostree config

Sometimes ostree complains about the remaining space on feed
directory while committing, but it has enough space to commit. This
happens because the ostree config to leave some free space is active
and set to a 3% value.

This commit set the min-free-space-percent config to 0, because it
is miscalculating the remaining space and raising an error even with
plenty of free space to commit.

Test-plan:
PASS: Install a system from zero and see if the config was set
PASS: Apply multiple patches and see no error regarding free memory

Related-To: I1974f75e11ebd62d3d6d1a5c6a87de7e4abb8842
Story: 2010676
Task: 50998

Change-Id: I149b0c16548369740f5712859725d37ade8ed57a
Signed-off-by: Lindley Vieira <lindley.vieira@windriver.com>
This commit is contained in:
Lindley Vieira 2024-09-10 17:16:23 -03:00
parent 6555b03e73
commit 72915c9536

View File

@ -3026,6 +3026,7 @@ if [ "${controller}" = true ] ; then
pxeboot="${IMAGE_ROOTFS}/var/pxeboot"
feed="${IMAGE_ROOTFS}/var/www/pages/feed/rel-${sw_release}"
repo="${feed}/ostree_repo"
config_file="${repo}/config"
mkdir -p "${repo}"
mkdir -p "${feed}"
@ -3034,6 +3035,7 @@ if [ "${controller}" = true ] ; then
ilog "Stage ostree_repo from USB device to ${repo}"
ostree --repo=${repo} init --mode=archive
echo "min-free-space-percent=0" >> "${config_file}"
ostree --repo=${repo} remote add ${instbr} file:///instboot/ostree_repo
ostree --repo=${repo} pull ${pull_options} ${instbr}:${instbr}