diff --git a/dcmanager/api/controllers/v1/subclouds.py b/dcmanager/api/controllers/v1/subclouds.py index 9986e3955..c346d77f9 100644 --- a/dcmanager/api/controllers/v1/subclouds.py +++ b/dcmanager/api/controllers/v1/subclouds.py @@ -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') ] diff --git a/dcorch/common/consts.py b/dcorch/common/consts.py index 63a3edab7..1b0a36052 100644 --- a/dcorch/common/consts.py +++ b/dcorch/common/consts.py @@ -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] diff --git a/dcorch/drivers/openstack/sdk.py b/dcorch/drivers/openstack/sdk.py index 0932e2f6b..fc896fd99 100644 --- a/dcorch/drivers/openstack/sdk.py +++ b/dcorch/drivers/openstack/sdk.py @@ -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, diff --git a/dcorch/engine/__init__.py b/dcorch/engine/__init__.py index 8b9d538b3..29fa1741a 100644 --- a/dcorch/engine/__init__.py +++ b/dcorch/engine/__init__.py @@ -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 diff --git a/dcorch/engine/service.py b/dcorch/engine/service.py index 8250697a2..bd1288aef 100644 --- a/dcorch/engine/service.py +++ b/dcorch/engine/service.py @@ -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)