From 0f183054dbea66fb9c0a6010874137a1f0e4e487 Mon Sep 17 00:00:00 2001 From: Igor Soares Date: Thu, 27 Jul 2023 20:07:26 -0300 Subject: [PATCH] Remove support for helmv2 database migration This change removes the helmv2 database migration from the upgrade process. It aims to equalize the upgrade behavior across simplex and multinode loads. The helmv2 database migration was removed from simplex upgrades on this commit: https://opendev.org/starlingx/ansible-playbooks/commit/a6d51ad9bb854fe14a130e9e2e36fe09ec67947b In addition to that, the references to the helmv2 database need to be removed from controllerconfig and sysinv in order to fully remove its support and prevent it from being migrated on multinode scenarios. This will only have effect for upgrades from stx-9 onwards as the code changed is executed during the upgrade-start phase. Test Plan: PASS: build-pkgs && build-image PASS: Check if AIO-SX fresh install was not affected PASS: Check if AIO-DX fresh install was not affected Story: 48480 Task: 2010560 Change-Id: I45568ddc05d6f8f1450bac752b9cb79e0fab5f79 Signed-off-by: Igor Soares --- .../controllerconfig/upgrades/management.py | 5 ++-- sysinv/sysinv/sysinv/setup.cfg | 1 - sysinv/sysinv/sysinv/sysinv/puppet/helm.py | 25 ------------------- 3 files changed, 2 insertions(+), 29 deletions(-) delete mode 100644 sysinv/sysinv/sysinv/sysinv/puppet/helm.py diff --git a/controllerconfig/controllerconfig/controllerconfig/upgrades/management.py b/controllerconfig/controllerconfig/controllerconfig/upgrades/management.py index cce7a53526..d3bad7c5cb 100644 --- a/controllerconfig/controllerconfig/controllerconfig/upgrades/management.py +++ b/controllerconfig/controllerconfig/controllerconfig/upgrades/management.py @@ -27,13 +27,12 @@ LOG = log.getLogger(__name__) def get_upgrade_databases(system_role, shared_services): UPGRADE_DATABASES = ('postgres', 'template1', 'sysinv', - 'barbican', 'fm', 'helmv2') + 'barbican', 'fm') UPGRADE_DATABASE_SKIP_TABLES = {'postgres': (), 'template1': (), 'sysinv': (), 'barbican': (), - 'fm': ('alarm',), - 'helmv2': ()} + 'fm': ('alarm',)} if system_role == sysinv_constants.DISTRIBUTED_CLOUD_ROLE_SYSTEMCONTROLLER: UPGRADE_DATABASES += ('dcmanager', 'dcorch',) diff --git a/sysinv/sysinv/sysinv/setup.cfg b/sysinv/sysinv/sysinv/setup.cfg index 15bcfd8a37..429e60cdff 100644 --- a/sysinv/sysinv/sysinv/setup.cfg +++ b/sysinv/sysinv/sysinv/setup.cfg @@ -66,7 +66,6 @@ systemconfig.puppet_plugins = 034_barbican = sysinv.puppet.barbican:BarbicanPuppet 035_dockerdistribution = sysinv.puppet.dockerdistribution:DockerDistributionPuppet 038_certmon = sysinv.puppet.certmon:CertMonPuppet - 039_helm = sysinv.puppet.helm:HelmPuppet 040_rook = sysinv.puppet.rook:RookPuppet 041_certalarm = sysinv.puppet.certalarm:CertAlarmPuppet 042_sssd = sysinv.puppet.sssd:SssdPuppet diff --git a/sysinv/sysinv/sysinv/sysinv/puppet/helm.py b/sysinv/sysinv/sysinv/sysinv/puppet/helm.py deleted file mode 100644 index 1ad6d850ef..0000000000 --- a/sysinv/sysinv/sysinv/sysinv/puppet/helm.py +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2020 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -from sysinv.puppet import base - - -class HelmPuppet(base.BasePuppet): - """Class to encapsulate puppet operations for helm configuration""" - - SERVICE_NAME = 'helmv2' - - def get_static_config(self): - dbuser = self._get_database_username(self.SERVICE_NAME) - return { - 'platform::helm::v2::db::postgresql::user': dbuser, - } - - def get_secure_static_config(self): - dbpass = self._get_database_password(self.SERVICE_NAME) - - return { - 'platform::helm::v2::db::postgresql::password': dbpass, - }