use one mariadb server pod for AIO-DX
In the case of AIO-DX there are only two controllers and only one of them will be "active" at a time. This makes it difficult to reliably use multiple mariadb server pods since there is no third node to ensure the remaining nodes have quorum if one node goes down. Accordingly, for now we will use a single mariadb server pod for this case. Change-Id: Iadd72df667b09fb3533eb8f80b7fefd9414b7f07 Signed-off-by: Chris Friesen <chris.friesen@windriver.com> Story: 2004712 Task: 29382
This commit is contained in:
parent
24fd045f68
commit
1cf27363e5
@ -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