rancher / elemental-toolkit

:snowflake: The toolkit to build, ship and maintain cloud-init driven Linux derivatives based on container images
https://rancher.github.io/elemental-toolkit/docs/
Apache License 2.0
291 stars 53 forks source link

make configurable boot-assessment checks #2018

Closed davidcassany closed 7 months ago

davidcassany commented 7 months ago

Part of rancher/elemental#1263

codecov-commenter commented 7 months ago

Codecov Report

Attention: Patch coverage is 69.56522% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 72.36%. Comparing base (c0f39f2) to head (3fc254c). Report is 1 commits behind head on main.

Files Patch % Lines
pkg/action/install.go 62.50% 2 Missing and 1 partial :warning:
pkg/action/reset.go 25.00% 2 Missing and 1 partial :warning:
pkg/features/features.go 85.71% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2018 +/- ## ========================================== + Coverage 72.34% 72.36% +0.01% ========================================== Files 76 76 Lines 8992 9009 +17 ========================================== + Hits 6505 6519 +14 - Misses 1944 1946 +2 - Partials 543 544 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

davidcassany commented 7 months ago

The fallback test new logic tests the following: upgrades to a broken system:

  1. Upgrades to a broken system, the new OS can't boot which causes a reboot to passive
  2. Rebooting to passive succeeds, then from there it upgrades to a system including a checker that always fails. So after actually rebooting to active will reboot again after 5 failed attempts to pass the checker.
  3. The reboot sequence will then attempt to boot to the broken system, which will fail again. Then the boot-assessment logic in grub will select the next system, which the snapshot installed during installation.
  4. The former installed image will successfully boot and detect it booted into passive.