Added a semantic check to prevent user lock host during a backup process
checking if the flag /etc/platform/.backup_in_progress is active.
Lock a host during a backup in progress may cause the backup to fail to
complete correctly and the flag not to be cleared as expected at the end
of the process. This can lead to failures to start future backup or SX
upgrade processes.
On an SX, for the cases where the backup was not finished correctly,
there is no backup in progress alarm, and the flag is still present,
when the upgrade starts it will be removed before starting the backup
process that runs during upgrade start. Avoiding upgrade start failure
also in cases of orchestrated upgrade on SX subclouds.
Test plan:
PASS: Tried to lock a host during a backup run and received a message
that the lock action was not performed because there is a backup in
progress;
PASS: Tried to lock a host after backup failed and flag was not cleared,
and received a message that the lock action was not performed because
there is a backup in progress
PASS: After system-health-query-upgrade and fm-alarm list did not show
a backup in progress alarm, but with the flag present, an upgrade was
attempted. The flag was cleared and the upgrade started.
Reviewed: https:/ /review. opendev. org/c/starlingx /config/ +/859441 /opendev. org/starlingx/ config/ commit/ 6421b57e7fd8fee 550579a2652c47e 8303c2e68e
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 6421b57e7fd8fee 550579a2652c47e 8303c2e68e
Author: Luis Eduardo Angelini Marquitti <email address hidden>
Date: Tue Sep 27 10:37:47 2022 -0400
Handling backup_in_progress flag
Added a semantic check to prevent user lock host during a backup process .backup_ in_progress is active.
checking if the flag /etc/platform/
Lock a host during a backup in progress may cause the backup to fail to
complete correctly and the flag not to be cleared as expected at the end
of the process. This can lead to failures to start future backup or SX
upgrade processes.
On an SX, for the cases where the backup was not finished correctly,
there is no backup in progress alarm, and the flag is still present,
when the upgrade starts it will be removed before starting the backup
process that runs during upgrade start. Avoiding upgrade start failure
also in cases of orchestrated upgrade on SX subclouds.
Test plan:
PASS: Tried to lock a host during a backup run and received a message health- query-upgrade and fm-alarm list did not show
that the lock action was not performed because there is a backup in
progress;
PASS: Tried to lock a host after backup failed and flag was not cleared,
and received a message that the lock action was not performed because
there is a backup in progress
PASS: After system-
a backup in progress alarm, but with the flag present, an upgrade was
attempted. The flag was cleared and the upgrade started.
Closes-Bug: 1990984 b4990cc40cff215 0a73c10b056
Change-Id: I747d79f41cff41
Signed-off-by: Luis Eduardo Angelini Marquitti <email address hidden>