David Bastos 7af5f78a1a Defer application reapply evaluation during platform upgrades
The reapply evaluation process has been causing race conditions
during the platform upgrade process. The issue was initially
addressed by blocking the evaluation process for apps that are in
'updating' status. However, depending on other triggers and
different order of events, it is still possible that similar
problems will happen in the future.

In order to fully prevent such race conditions, the reapply
evaluation process can be deferred until the upgrade is completed.
This is feasible because no apps will actually be reapplied during
the upgrade since application auditing is already disabled. That
way we can fully prevent race conditions with the additional
benefit of saving some CPU cycles during activation.

This change, to solve this problem, creates an endpoint in the
sysinv API to trigger the evaluation reapply process. This endpoint
will be reached by USM which will be called as soon as the
"software deploy complete" command is called.

Test Plan:
PASS: build-pkgs && build-image
PASS: Install AIO-SX and AIO-DX
PASS: Upgrade from stx-10 to master
PASS: Swact between the controllers and the evaluate_apps_reapply
      function must be called completely.
PASS: Lock some controller and the evaluate_apps_reapply function
      must be called completely.
PASS: During DX upgrade the evaluate_apps_reapply function is
      skipped.
PASS: After the "software deploy complete" command, USM correctly
      calls the new endpoint "/v1/evaluate_apps_reapply/" to trigger
      the evaluate_apps_reapply function.

Story: 2011242
Task: 51658

Signed-off-by: David Bastos <david.barbosabastos@windriver.com>
Change-Id: I62683b91727f89cce3581301ce9c77312d2b89c0
2025-02-11 14:31:50 -03:00
..
2018-05-31 07:35:52 -07:00