config/sysinv/sysinv/sysinv/sysinv/db
jgauld 5a9582ac5c Platform support for application upgrades
This enhances the application management component of sysinv to
support the upgrade of both platform and non-platform applications.

This supports new application metadata:
  upgrades:
    update_failure_no_rollback: <true/false/yes/no>
    from_versions:
      - <version.1>
      - <version.2>
  supported_k8s_version:
    minimum: <version>
    maximum: <version>
  supported_releases:
    <release>:
      - <patch.1>
      - <patch.2> ...

The processing of patch_dependencies is deprecated in favour of
supported_releases.

This enables applications to specify:
* required patches such as a platform patch_level which
  the application can run on for a specfic release
* supported K8s Versions which the application can run on
* app releases that this version can upgrade from
* application update failures do not rollback

Application upload and updates check against this metadata.

System health pre-upgrade checks make sure that:
* all applications are in a valid state for the upgrade
  (i.e. uploaded or applied)
* active controller is controller-0

Testing:
- Configs: AIO-SX, AIO-DX, Standard
- new metadata format validation with valid/invalid input
- upversion platform-integ-apps tarball with new metadata,
  and do an application-update
  e.g.,
  system application-update platform-integ-apps-1.0-22.tgz
  * applies if the new metadata not provided
  * blocks update if from_versions, supported_k8s_releases,
    or supported_releases criteria not met
- normal operation of system application-remove/application-delete
- system application-upload should apply/block based on metadata
- trigger 'no_rollback' handling by forcing an application
  rollback using a small manifest.yaml timeout and too many
  replicas that cannot be deployed
- AIO-DX after load-import, swact to controller-1, verify
  that upgrade is blocked

- perform upgrade of current N to N+1 release
  * upversion platform-integ-apps in N+1 release with new metadata
  * import new load containing new metadata
  * system health-query-upgrade; should indicate fail and failure
    reasons based on new criteria
  * follow 'system upgrade' procedure; should block upgrade based
    on new criteria

Story: 2008055
Task: 42179

Signed-off-by: jgauld <james.gauld@windriver.com>
Change-Id: I93a6f2ada7ce52414190948cbc458f6295c50603
2021-04-13 12:44:38 -04:00
..
sqlalchemy Platform support for application upgrades 2021-04-13 12:44:38 -04:00
__init__.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
api.py Migrate to database backend for backup and restore 2021-02-24 13:48:04 +02:00
migration.py Sysinv. Cleanup import statements for pep8 2018-06-29 13:43:53 -04:00