apply feature-gate update during upgrade-activate
This change adds a method to apply 'update-k8s-feature-gates' puppet class on both controllers during platform upgrade activate phase. Depends-On: https://review.opendev.org/c/starlingx/stx-puppet/+/845651 Test Plan: (CentOS) On AIO-SX and AIO-DX: PASS: Full platform upgrade successful PASS: Check logs if puppet manifest is successfully applied on both the controllers. Story: 2009789 Task: 44765 Signed-off-by: Kaustubh Dhokte <kaustubh.dhokte@windriver.com> Change-Id: I9cb494a72b7ad62476378f3512cb55c94596eb1e
This commit is contained in:
parent
9bf7cbb488
commit
cc3cdbd647
|
@ -1727,6 +1727,25 @@ class ConductorManager(service.PeriodicService):
|
||||||
self._config_apply_runtime_manifest(
|
self._config_apply_runtime_manifest(
|
||||||
context, config_uuid=config_uuid, config_dict=config_dict)
|
context, config_uuid=config_uuid, config_dict=config_dict)
|
||||||
|
|
||||||
|
def _update_kubeadm_feature_gates(self, context):
|
||||||
|
"""Applies the runtime manifest to change kubernetes feature gates.
|
||||||
|
Applied on both the controllers
|
||||||
|
returns True if runtime manifests were applied
|
||||||
|
"""
|
||||||
|
personalities = [constants.CONTROLLER]
|
||||||
|
config_uuid = self._config_update_hosts(
|
||||||
|
context, personalities)
|
||||||
|
config_dict = {
|
||||||
|
"personalities": personalities,
|
||||||
|
"classes": ['platform::kubernetes::master::update_kubeadm_feature_gates'],
|
||||||
|
puppet_common.REPORT_STATUS_CFG:
|
||||||
|
puppet_common.REPORT_UPGRADE_ACTIONS
|
||||||
|
}
|
||||||
|
self._config_apply_runtime_manifest(context,
|
||||||
|
config_uuid=config_uuid,
|
||||||
|
config_dict=config_dict)
|
||||||
|
return True
|
||||||
|
|
||||||
def update_keystone_password(self, context):
|
def update_keystone_password(self, context):
|
||||||
"""This method calls a puppet class
|
"""This method calls a puppet class
|
||||||
'openstack::keystone::password::runtime'
|
'openstack::keystone::password::runtime'
|
||||||
|
@ -12006,6 +12025,9 @@ class ConductorManager(service.PeriodicService):
|
||||||
# Make sure to remove v1 from address format after upgrade
|
# Make sure to remove v1 from address format after upgrade
|
||||||
manifests_applied |= self._update_upgraded_ceph_monitors(context)
|
manifests_applied |= self._update_upgraded_ceph_monitors(context)
|
||||||
|
|
||||||
|
if from_version == tsc.SW_VERSION_21_12:
|
||||||
|
manifests_applied |= self._update_kubeadm_feature_gates(context)
|
||||||
|
|
||||||
if manifests_applied:
|
if manifests_applied:
|
||||||
LOG.info("Running upgrade activation manifests")
|
LOG.info("Running upgrade activation manifests")
|
||||||
self.dbapi.software_upgrade_update(
|
self.dbapi.software_upgrade_update(
|
||||||
|
|
|
@ -14,6 +14,7 @@ from six.moves import configparser
|
||||||
|
|
||||||
SW_VERSION = ""
|
SW_VERSION = ""
|
||||||
SW_VERSION_21_05 = "21.05"
|
SW_VERSION_21_05 = "21.05"
|
||||||
|
SW_VERSION_21_12 = "21.12"
|
||||||
|
|
||||||
nodetype = None
|
nodetype = None
|
||||||
subfunctions = []
|
subfunctions = []
|
||||||
|
|
Loading…
Reference in New Issue