Merge "Add glance overrides for images pool replication"
This commit is contained in:
commit
4da5da6152
|
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue