Merge remote-tracking branch 'starlingx/master' into HEAD

Change-Id: I9cc0707a11b678dfe8eeadc769cf97054c84d490
Signed-off-by: Scott Little <scott.little@windriver.com>
This commit is contained in:
Scott Little 2019-02-07 12:10:06 -05:00
commit 396155c8c5
5 changed files with 36 additions and 8 deletions

View File

@ -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': {

View File

@ -6,6 +6,8 @@
from sysinv.common import constants
from sysinv.common import exception
from sysinv.common.storage_backend_conf import StorageBackendConfig
from sysinv.openstack.common import log as logging
from sysinv.helm import common
@ -54,11 +56,18 @@ class GlanceHelm(openstack.OpenstackBaseHelm):
def _get_images_overrides(self):
heat_image = self._operator.chart_operators[
constants.HELM_CHART_HEAT].docker_image
ceph_config_helper_image = "{}:{}/{}/{}{}:{}".format(
self._get_management_address(), common.REGISTRY_PORT,
common.REPO_LOC,
common.DOCKER_SRCS[self.docker_repo_source][common.IMG_PREFIX_KEY],
'ceph-config-helper', self.docker_repo_tag)
return {
'tags': {
'bootstrap': heat_image,
'db_drop': heat_image,
'db_init': heat_image,
'glance_storage_init': ceph_config_helper_image,
'glance_api': self.docker_image,
'glance_db_sync': self.docker_image,
'glance_registry': self.docker_image,
@ -126,9 +135,16 @@ class GlanceHelm(openstack.OpenstackBaseHelm):
if not ceph_backend:
rbd_store_pool = ""
rbd_store_user = ""
replication = 1
else:
rbd_store_pool = constants.CEPH_POOL_IMAGES_NAME
rbd_store_user = RBD_STORE_USER
replication, min_replication = \
StorageBackendConfig.get_ceph_pool_replication(self.dbapi)
# Only the primary Ceph tier is used for the glance images pool, so
# the crush ruleset is 0.
ruleset = 0
conf = {
'glance': {
@ -140,6 +156,8 @@ class GlanceHelm(openstack.OpenstackBaseHelm):
'filesystem_store_datadir': constants.GLANCE_IMAGE_PATH,
'rbd_store_pool': rbd_store_pool,
'rbd_store_user': rbd_store_user,
'rbd_store_replication': replication,
'rbd_store_crush_rule': ruleset,
}
}
}

View File

@ -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(),

View File

@ -1,3 +1,3 @@
SRC_DIR="worker-utils"
COPY_LIST="$SRC_DIR/LICENSE"
TIS_PATCH_VER=2
TIS_PATCH_VER=3

View File

@ -2,7 +2,6 @@
Description=StarlingX Affine Tasks
After=syslog.service network.service dbus.service sw-patch.service affine-platform.sh.service
Before=kubelet.service
Requires=kubelet.service
[Service]
Type=oneshot