Comment 2 for bug 1961435

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config (master)

Reviewed: https://review.opendev.org/c/starlingx/config/+/829972
Committed: https://opendev.org/starlingx/config/commit/c53d555e2df7c9126b7c129562542761d4fc1884
Submitter: "Zuul (22348)"
Branch: master

commit c53d555e2df7c9126b7c129562542761d4fc1884
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
    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

    [1] https://review.opendev.org/c/starlingx/config/+/814670
    [2] https://docs.starlingx.io/developer_resources/backup_restore.html

    Closes-bug: 1961435

    Signed-off-by: Thales Elero Cervi <email address hidden>
    Change-Id: I9423da249ddc74228111ba2b954afe7b93c505d7