Merge "Move ceph to use mgmt IP on AIO-SX"

This commit is contained in:
Zuul 2019-02-04 14:15:39 +00:00 committed by Gerrit Code Review
commit 29cd437d79
2 changed files with 7 additions and 11 deletions

View File

@ -170,7 +170,7 @@ class BaseHelm(object):
def _get_ceph_monitor_ips(self):
if self._system_mode() == constants.SYSTEM_MODE_SIMPLEX:
monitors = [self._get_oam_address()]
monitors = [self._get_controller_0_management_address()]
else:
monitors = StorageBackendConfig.get_ceph_mon_ip_addresses(
self.dbapi).values()
@ -189,6 +189,11 @@ class BaseHelm(object):
constants.CONTROLLER_HOSTNAME, constants.NETWORK_TYPE_MGMT)
return address.address
def _get_controller_0_management_address(self):
address = self._get_address_by_name(
constants.CONTROLLER_0_HOSTNAME, constants.NETWORK_TYPE_MGMT)
return address.address
def get_meta_overrides(self, namespace):
"""
Return Armada-formatted chart-specific meta-overrides

View File

@ -7,7 +7,6 @@
import netaddr
import uuid
from sysinv.api.controllers.v1 import utils
from sysinv.common import constants
from sysinv.common import exception
from sysinv.common.storage_backend_conf import StorageBackendConfig
@ -61,15 +60,7 @@ class CephPuppet(openstack.OpenstackBasePuppet):
else:
mon_2_host = None
# TODO: k8s on AIO-SX: Temporarily need to move the ceph monitor address
# from a loopback address to the OAM address so the ceph monitor is
# reachable from the cluster pods.
if (utils.is_kubernetes_config(self.dbapi) and
(self.dbapi.isystem_get_one().system_mode ==
constants.SYSTEM_MODE_SIMPLEX)):
mon_0_ip = self._get_oam_address()
else:
mon_0_ip = ceph_mon_ips['ceph-mon-0-ip']
mon_0_ip = ceph_mon_ips['ceph-mon-0-ip']
mon_1_ip = ceph_mon_ips['ceph-mon-1-ip']
mon_2_ip = ceph_mon_ips.get('ceph-mon-2-ip', None)
floating_mon_ip = ceph_mon_ips['ceph-floating-mon-ip']