Merge "use one mariadb server pod for AIO-DX"
This commit is contained in:
commit
8121910a97
@ -4,6 +4,7 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
from sysinv.api.controllers.v1 import utils
|
||||
from sysinv.common import constants
|
||||
from sysinv.common import exception
|
||||
from sysinv.openstack.common import log as logging
|
||||
@ -32,11 +33,12 @@ class GarbdHelm(base.BaseHelm):
|
||||
def get_meta_overrides(self, namespace):
|
||||
|
||||
def _meta_overrides():
|
||||
if self._num_controllers() < 2:
|
||||
# If there are fewer than 2 controllers we'll use a single
|
||||
# mariadb server and so we don't want to run garbd. This
|
||||
# will remove "openstack-garbd" from the charts in the
|
||||
# openstack-mariadb chartgroup.
|
||||
if (self._num_controllers() < 2 or
|
||||
utils.is_aio_duplex_system(self.dbapi)):
|
||||
# If there are fewer than 2 controllers or we're on AIO-DX
|
||||
# we'll use a single mariadb server and so we don't want to
|
||||
# run garbd. This will remove "openstack-garbd" from the
|
||||
# charts in the openstack-mariadb chartgroup.
|
||||
return {
|
||||
'schema': 'armada/ChartGroup/v1',
|
||||
'metadata': {
|
||||
|
@ -4,6 +4,7 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
from sysinv.api.controllers.v1 import utils
|
||||
from sysinv.common import constants
|
||||
from sysinv.common import exception
|
||||
from sysinv.openstack.common import log as logging
|
||||
@ -21,6 +22,14 @@ class MariadbHelm(openstack.OpenstackBaseHelm):
|
||||
common.HELM_NS_OPENSTACK
|
||||
]
|
||||
|
||||
def _num_server_replicas(self):
|
||||
# For now we want to run with a single mariadb server pod for the
|
||||
# AIO-DX case.
|
||||
if utils.is_aio_duplex_system(self.dbapi):
|
||||
return 1
|
||||
else:
|
||||
return self._num_controllers()
|
||||
|
||||
def get_namespaces(self):
|
||||
return self.SUPPORTED_NAMESPACES
|
||||
|
||||
@ -29,7 +38,7 @@ class MariadbHelm(openstack.OpenstackBaseHelm):
|
||||
common.HELM_NS_OPENSTACK: {
|
||||
'pod': {
|
||||
'replicas': {
|
||||
'server': self._num_controllers()
|
||||
'server': self._num_server_replicas()
|
||||
}
|
||||
},
|
||||
'images': self._get_images_overrides(),
|
||||
|
Loading…
Reference in New Issue
Block a user