After performing a platform backup with stx-openstack application
applied, when trying to restore the application it fails due to an
unsupported application-apply mode (--mode restore_db).
This issue was probably introduced after changing code on sysinv to use
general naming for Openstack application [1]. It is probably a remaining
work that was left behind on that time. Now when the app name is checked
to be valid inside HELM_APP_APPLY_MODES it is never validated since the
mode is now referring to HELM_APP_OPENSTACK='openstack'.
This change is simply checking if the app being patched has a name that
ends with the constant HELM_APP_OPENSTACK. If it is the case, then we
are handling an Openstack application and the mode_name to be searched
can simply be the constat it self. Otherwise we consider the mode_name
as the name argument and the function behaves as it is behaving now.
TEST PLAN:
PASS: Build & Install on an AIO-SX system
PASS: Execute stx-openstack application backup procedure [2]
successfully
PASS: Execute stx-openstack application restore procedure [2]
successfully
Reviewed: https:/ /review. opendev. org/c/starlingx /config/ +/829972 /opendev. org/starlingx/ config/ commit/ c53d555e2df7c91 26b7c1295625427 61d4fc1884
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit c53d555e2df7c91 26b7c1295625427 61d4fc1884
Author: Thales Elero Cervi <email address hidden>
Date: Fri Feb 18 14:22:30 2022 -0300
Fixing app name when searching for apply modes
After performing a platform backup with stx-openstack application
applied, when trying to restore the application it fails due to an
unsupported application-apply mode (--mode restore_db).
This issue was probably introduced after changing code on sysinv to use APPLY_MODES it is never validated since the OPENSTACK= 'openstack' .
general naming for Openstack application [1]. It is probably a remaining
work that was left behind on that time. Now when the app name is checked
to be valid inside HELM_APP_
mode is now referring to HELM_APP_
This change is simply checking if the app being patched has a name that
ends with the constant HELM_APP_OPENSTACK. If it is the case, then we
are handling an Openstack application and the mode_name to be searched
can simply be the constat it self. Otherwise we consider the mode_name
as the name argument and the function behaves as it is behaving now.
TEST PLAN:
PASS: Build & Install on an AIO-SX system
PASS: Execute stx-openstack application backup procedure [2]
successfully
PASS: Execute stx-openstack application restore procedure [2]
successfully
[1] https:/ /review. opendev. org/c/starlingx /config/ +/814670 /docs.starlingx .io/developer_ resources/ backup_ restore. html
[2] https:/
Closes-bug: 1961435
Signed-off-by: Thales Elero Cervi <email address hidden> 228111ba2b954af e7b93c505d7
Change-Id: I9423da249ddc74