AppFwk: Fix armada operation during upgrades

An error is seen in the AppFramework during upgrades from N to N+2
side.

Specifically during [1], cert-manager is not properly removed,
preventing the new version apply:
ERROR sysinv.conductor.kube_app [-] Unsupported armada request: remove.

When [2] was introduced one request for app removal to armada/fluxcd
was renamed in one place from APP_DELETE_OP to APP_REMOVE_OP. This
needs to be corrected for armada case to support N to N+2 upgrades.

Allow the armada operation to be named APP_DELETE_OP as it was before.

Tested on AIO-SX upgrade from stx.6.0 to master(soon to be stx.8.0).
Had other patches applied to the system, but will address those
issues later.
PASS: cert-manager updated during upgrade script 64-.

[1]: 09981f9d90/controllerconfig/controllerconfig/upgrade-scripts/64-upgrade-cert-manager.sh (L168)
[2]: https://review.opendev.org/c/starlingx/config/+/866200/5/sysinv/sysinv/sysinv/sysinv/conductor/kube_app.py#3346
Story: 2009303
Task: 47135
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
Change-Id: Ia57980de2acac7d510e01903c16596b90bee3b4c
This commit is contained in:
Dan Voiculeasa 2023-01-13 15:42:03 +02:00
parent 1c056d966d
commit 0127278c09
1 changed files with 7 additions and 0 deletions

View File

@ -2048,6 +2048,13 @@ class AppOperator(object):
# Body of the outer method
# On N(stx.6.0) to N+2(stx.8.0) upgrades we need to keep the original
# 'delete' operation that Armada recognizes.
# The operation was renamed (intention was for Flux) for Armada by
# mistake: https://review.opendev.org/c/starlingx/config/+/866200/
if request == constants.APP_REMOVE_OP:
request = constants.APP_DELETE_OP
# This check is for cases where an abort is issued while
# this function waits between retries. In such cases, it
# should just return False