Glance overrides - increase replicas count

If a CEPH backend is enabled and the glance storage
is rbd, then set the number of replicas to the number
of controllers.

If there is no CEPH backend present and the glance
storage is pvc, then the replicas must be set to 1
as the glance chart doesn't create two PVCs, as needed.

Story: 2003909
Task: 28188
Change-Id: I293b7251a1f39e0471f73b14ea1e60483ff19d59
Signed-off-by: Irina Mihai <irina.mihai@windriver.com>
This commit is contained in:
Irina Mihai 2018-11-29 21:31:26 +00:00
parent 6b56b8c3a1
commit 007346e5ca
1 changed files with 6 additions and 2 deletions

View File

@ -77,10 +77,14 @@ class GlanceHelm(openstack.OpenstackBaseHelm):
}
def _get_pod_overrides(self):
replicas_count = 1
ceph_backend = self._get_primary_ceph_backend()
if ceph_backend:
replicas_count = self._num_controllers()
return {
'replicas': {
'api': 1,
'registry': 1,
'api': replicas_count,
}
}