Felipe Sanches Zanoni bc01cdee11 Fix lifecycle pre apply checks
When one host has its availability changed, the application lifecycle
framework will call a hook with an 'evaluate-reapply' operation and
with the 'relative_timing' field missing.

This hook should block the 'apply' and 'evaluate-reapply' operations
if Ceph is unresponvise. Not blocking these operations will lead to a
scenario where the ceph-csi configuration gets broken and the PVCs
fail to attach, mount and umount.

Example of hook_info dict when the 'evaluate-reapply' operation is
started:

{'mode': 'auto', 'lifecycle_type': 'check', 'operation': \
 'evaluate-reapply', 'extra': {'trigger': {'type': \
 'host-availability-updated', 'availability': 'available'}}}

Example of hook_info dict when the 'apply' operations is started:

{'mode': 'auto', 'lifecycle_type': 'check', 'relative_timing': 'pre',\
 'operation': 'apply', 'extra': {}}

This change fixes the semantic check for 'evaluate-reapply' and
'apply' operations, considering the 'relative_timing' field.

Test-Plan:
  PASS: On AIO-DX restart the standby controller and when it is back
        'available' verify if the auto reapply is blocked if Ceph
        status is not HEALTH_OK
  PASS: Verify application update is working
  PASS: Verify application auto apply is working
  PASS: Add a new storage tier and verify the application is
        re-applied correctly.
  PASS: Manual and auto application apply is blocked when Ceph status
        is not HEALTH_OK

Closes-bug: 2097570

Change-Id: I09bc9b0bfe53ddae3008ae164a177f3ea5a6ae63
Signed-off-by: Felipe Sanches Zanoni <Felipe.SanchesZanoni@windriver.com>
2025-02-08 09:30:39 -03:00
2023-12-15 12:44:37 -07:00
2019-09-09 14:47:45 -05:00
2024-01-17 16:26:23 -06:00
2019-09-09 14:47:45 -05:00
2019-09-09 14:47:45 -05:00
2023-12-15 12:44:37 -07:00
Description
StarlingX Platform Armada App
2.1 MiB
Languages
Python 84.2%
Makefile 15.7%