Skip to content

Add test case: cl.update.payload-boot-part-too-small#638

Merged
ader1990 merged 1 commit intoflatcar:mainfrom
ader1990:ader1990/add_boot_size_failure
Aug 14, 2025
Merged

Add test case: cl.update.payload-boot-part-too-small#638
ader1990 merged 1 commit intoflatcar:mainfrom
ader1990:ader1990/add_boot_size_failure

Conversation

@ader1990
Copy link
Copy Markdown
Contributor

@ader1990 ader1990 commented Jul 9, 2025

update: boot: add cl.update.payload-boot-part-too-small test case

This test case makes sure that the Flatcar upgrade fails if the
update payload contains an initrd that has a bigger size than the
free space in the /boot partition.

Currently, the /boot partition free space is around 70 MB.

This test case relies on cl.update.payload test case, but does an additional `sudo dd if=/dev/zero of=/boot/increase_boot_part_usage bs=5M count=1` before the update is started.
It also checks for the failure logs of the update-engine to appear in the journalctl output.

How to use

[ describe what reviewers need to do in order to validate this PR ]

Testing done

[Describe the testing you have done before submitting this PR. Please include both the commands you issued as well as the output you got.]

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

@ader1990
Copy link
Copy Markdown
Contributor Author

One thing I noticed and it is worth sharing here: when the update fails because the space in /boot partition is not enough to copy the new initrd (/boot/flatcar/vmlinuz-b), the update-engine service throws an error without cleaning up the file /boot/flatcar/vmlinuz-b and the /boot partition free space become 0 (zero bytes). This might pose a problem if, for any reason, during the next boot, there will be some free space in the /boot necessary by tooling.

I would suggest to have a reboot added to this test workflow to see if the machine in this state survives.

Copy link
Copy Markdown
Contributor

@chewi chewi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. I always meant to see what the actual behaviour was, but I never got around to checking.

@ader1990 ader1990 requested a review from a team as a code owner August 13, 2025 12:12
This test case makes sure that the Flatcar upgrade fails if the
update payload contains an initrd that has a bigger size than the
free space in the /boot partition.

Currently, the /boot partition free space is around 70 MB.

The test case is Writing 20 MB on the /boot partition before starting
the upgrade, so that it makes sure there is not enough space for the
upgrade to complete. The stable channel has now around one vmlinuz plus
around 15MB free (that s why 20MB has been chosen).

NOTE: this test's expected result is to make sure that the upgrade
FAILS if there is not enough /boot partition space, and at the
same time, verifies that Flatcar can still boot with its
currrent version after the failure.

Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com>
@ader1990 ader1990 force-pushed the ader1990/add_boot_size_failure branch from 4707d4d to 9364539 Compare August 13, 2025 14:43
@ader1990 ader1990 merged commit 8cdb18c into flatcar:main Aug 14, 2025
2 of 3 checks passed
@github-project-automation github-project-automation bot moved this from ✅ Testing / in Review to Implemented in Flatcar tactical, release planning, and roadmap Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants