From 007346e5ca97b9c7382002a121d61937147da19c Mon Sep 17 00:00:00 2001 From: Irina Mihai Date: Thu, 29 Nov 2018 21:31:26 +0000 Subject: [PATCH] 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 --- sysinv/sysinv/sysinv/sysinv/helm/glance.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sysinv/sysinv/sysinv/sysinv/helm/glance.py b/sysinv/sysinv/sysinv/sysinv/helm/glance.py index 9f090614a3..9cee1abb7f 100644 --- a/sysinv/sysinv/sysinv/sysinv/helm/glance.py +++ b/sysinv/sysinv/sysinv/sysinv/helm/glance.py @@ -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, } }