Merge "Revert "Remove sysinv kube-apiserver upgrade params apply""

This commit is contained in:
Zuul 2021-12-01 20:00:22 +00:00 committed by Gerrit Code Review
commit 674a390db9
1 changed files with 25 additions and 0 deletions

View File

@ -1205,6 +1205,28 @@ class ConductorManager(service.PeriodicService):
raise exception.SysinvException(_(
"Failed to create pxelinux.cfg file"))
def _apply_kube_apiserver_parameters(self, context):
"""Applies the runtime manifest to change kube_apiserver parameters.
Only done on simplex because the issue is due to the apiserver
service parameters not being applied during the restore.
returns True if runtime manifests were applied
"""
if cutils.is_aio_simplex_system(self.dbapi):
personalities = [constants.CONTROLLER]
config_uuid = self._config_update_hosts(
context, personalities)
config_dict = {
"personalities": personalities,
"classes": ['platform::kubernetes::master::change_apiserver_parameters'],
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
return False
def _remove_pxe_config(self, host):
"""Delete the PXE config file for this host.
@ -11373,6 +11395,9 @@ class ConductorManager(service.PeriodicService):
# Make sure to remove v1 from address format after upgrade
manifests_applied |= self._update_upgraded_ceph_monitors(context)
manifests_applied = manifests_applied or\
self._apply_kube_apiserver_parameters(context)
if manifests_applied:
LOG.info("Running upgrade activation manifests")
self.dbapi.software_upgrade_update(