Integrate Distributed Cloud with containerized services

Disable nova, cinder and neutron api proxy services
Disable nova, cinder and neutron sync threads
Add cluster IP support to generated subcloud
configuration file
Remove openstack users from subcloud user list

Story: 2004766
Task: 28884

Change-Id: I683ba05ee74b159716924f08814a7473e7053d4d
Signed-off-by: Tao Liu <tao.liu@windriver.com>
This commit is contained in:
Tao Liu 2019-03-14 14:52:24 -04:00
parent 5ca61d36c8
commit 3ac45e3281
5 changed files with 38 additions and 64 deletions

View File

@ -206,6 +206,14 @@ class SubcloudsController(object):
'management-interface-mtu', DEFAULT_STR)
management_interface_ports = payload.get(
'management-interface-port', DEFAULT_STR)
cluster_vlan = payload.get(
'cluster-vlan', DEFAULT_STR)
cluster_interface_mtu = payload.get(
'cluster-interface-mtu', DEFAULT_STR)
cluster_interface_ports = payload.get(
'cluster-interface-port', management_interface_ports)
cluster_cidr = payload.get(
'cluster-subnet', IPNetwork("192.168.206.0/24"))
oam_cidr = payload.get(
'oam-subnet', DEFAULT_STR)
oam_gateway = payload.get(
@ -253,6 +261,36 @@ class SubcloudsController(object):
oam_ip_unit_1_address=oam_ip_unit_1_address,
)
subcloud_config += (
"[CLUSTER_NETWORK]\n"
"CIDR = {cluster_cidr}\n"
"DYNAMIC_ALLOCATION = Y\n"
).format(
cluster_cidr=cluster_cidr
)
if cluster_vlan != DEFAULT_STR:
subcloud_config += (
"VLAN={cluster_vlan}\n"
).format(
cluster_vlan=cluster_vlan
)
if management_interface_ports == cluster_interface_ports:
subcloud_config += (
"LOGICAL_INTERFACE = LOGICAL_INTERFACE_1\n")
else:
subcloud_config += (
"LOGICAL_INTERFACE = LOGICAL_INTERFACE_3\n"
"[LOGICAL_INTERFACE_3]\n"
"LAG_INTERFACE = N\n"
"INTERFACE_MTU = {cluster_interface_mtu}\n"
"INTERFACE_PORTS = {cluster_interface_ports}\n"
).format(
cluster_interface_mtu=cluster_interface_mtu,
cluster_interface_ports=cluster_interface_ports,
)
MIN_MANAGEMENT_SUBNET_SIZE = 8
tmp_management_subnet = validate_network_str(
subcloud.management_subnet,
@ -340,21 +378,10 @@ class SubcloudsController(object):
# First entry is openstack user name, second entry is the user stored
# in keyring. Not sure why heat_admin uses a different keystone name.
SUBCLOUD_USERS = [
('nova', 'nova'),
('placement', 'placement'),
('sysinv', 'sysinv'),
('patching', 'patching'),
('heat', 'heat'),
('ceilometer', 'ceilometer'),
('vim', 'vim'),
('aodh', 'aodh'),
('panko', 'panko'),
('mtce', 'mtce'),
('cinder', 'cinder'),
('glance', 'glance'),
('neutron', 'neutron'),
('heat_admin', 'heat-domain'),
('gnocchi', 'gnocchi'),
('fm', 'fm'),
('barbican', 'barbican')
]

View File

@ -136,9 +136,6 @@ ENDPOINT_TYPE_PATCHING = "patching"
ENDPOINT_TYPE_IDENTITY = "identity"
ENDPOINT_TYPES_LIST = [ENDPOINT_TYPE_PLATFORM,
ENDPOINT_TYPE_VOLUME,
ENDPOINT_TYPE_COMPUTE,
ENDPOINT_TYPE_NETWORK,
ENDPOINT_TYPE_PATCHING,
ENDPOINT_TYPE_IDENTITY]

View File

@ -24,11 +24,8 @@ from oslo_utils import timeutils
from dcorch.common import consts
from dcorch.common import exceptions
from dcorch.drivers.openstack.cinder_v2 import CinderClient
from dcorch.drivers.openstack.fm import FmClient
from dcorch.drivers.openstack.keystone_v3 import KeystoneClient
from dcorch.drivers.openstack.neutron_v2 import NeutronClient
from dcorch.drivers.openstack.nova_v2 import NovaClient
from dcorch.drivers.openstack.sysinv_v1 import SysinvClient
# Gap, in seconds, to determine whether the given token is about to expire
@ -66,12 +63,6 @@ class OpenStackDriver(object):
LOG.info('Using cached OS client objects %s' % region_name)
self.sysinv_client = OpenStackDriver.os_clients_dict[
region_name]['sysinv']
self.nova_client = OpenStackDriver.os_clients_dict[
region_name]['nova']
self.cinder_client = OpenStackDriver.os_clients_dict[
region_name]['cinder']
self.neutron_client = OpenStackDriver.os_clients_dict[
region_name]['neutron']
self.fm_client = OpenStackDriver.os_clients_dict[
region_name]['fm']
else:
@ -89,42 +80,6 @@ class OpenStackDriver(object):
LOG.error('sysinv_client region %s error: %s' %
(region_name, exception.message))
try:
self.neutron_client = NeutronClient(
region_name,
self.disabled_quotas,
self.keystone_client.session,
endpoint_type=consts.KS_ENDPOINT_DEFAULT)
OpenStackDriver.os_clients_dict[region_name][
'neutron'] = self.neutron_client
except Exception as exception:
LOG.error('neutron_client region %s error: %s' %
(region_name, exception.message))
try:
self.nova_client = NovaClient(
region_name,
self.keystone_client.session,
endpoint_type=consts.KS_ENDPOINT_DEFAULT,
disabled_quotas=self.disabled_quotas)
OpenStackDriver.os_clients_dict[region_name][
'nova'] = self.nova_client
except Exception as exception:
LOG.error('nova_client region %s error: %s' %
(region_name, exception.message))
try:
self.cinder_client = CinderClient(
region_name,
self.disabled_quotas,
self.keystone_client.session,
endpoint_type=consts.KS_ENDPOINT_DEFAULT)
OpenStackDriver.os_clients_dict[region_name][
'cinder'] = self.cinder_client
except Exception as exception:
LOG.error('cinder_client region %s error: %s' %
(region_name, exception.message))
try:
self.fm_client = FmClient(
region_name,

View File

@ -1,7 +1,4 @@
# the sync services needs to be imported for them to
# be seen as subclasses to SyncThread in subcloud.py
from dcorch.engine.sync_services.compute import ComputeSyncThread # noqa
from dcorch.engine.sync_services.identity import IdentitySyncThread # noqa
from dcorch.engine.sync_services.network import NetworkSyncThread # noqa
from dcorch.engine.sync_services.sysinv import SysinvSyncThread # noqa
from dcorch.engine.sync_services.volume import VolumeSyncThread # noqa

View File

@ -119,8 +119,6 @@ class EngineService(service.Service):
super(EngineService, self).start()
if self.periodic_enable:
LOG.info("Adding periodic tasks for the engine to perform")
self.TG.add_timer(self.periodic_interval,
self.periodic_balance_all, None, self.engine_id)
self.TG.add_timer(self.periodic_interval,
self.periodic_sync_audit,
initial_delay=self.periodic_interval / 2)