The commit [1] introduces a boot failure counter to boot.env,
so that a logic can be created to boot the system in the
rollback deployment if the system fails to boot the to-release
deployment during an upgrade.
This commit creates a very simple service to reset the boot
failure counter variable to 0 in boot.env when the system boots
successfully.
[1] https://review.opendev.org/c/starlingx/metal/+/952864
Test Plan
PASS: verify the system runs successfully during the boot
sequence on the console
PASS: verify boot.env once the system boots successfully
and confirm that boot_failure is set to 0
PASS: force boot failure, verify the boot_failure counter
increment with [1], and verify the boot_failure is
reset to 0 when the system boots
PASS: integrated test for automatic boot recovery (AIO-SX)
1. upgrade host from stx-10 to stx-11 with LVM snapshot
feature enabled
2. force failure during the boot sequence (3x)
3. system boots in the rollback deployment
4. LVM snapshots are restored during the boot sequence
and system is rebooted again
5. system boots in from-release ready to 'deploy delete'
Story: 2011357
Task: 52428
Change-Id: Ida4d5c811b376018b2703ff0e89bb65697995b3f
Signed-off-by: Heitor Matsui <heitorvieira.matsui@windriver.com>