diff --git a/controllerconfig/controllerconfig/controllerconfig/upgrades/controller.py b/controllerconfig/controllerconfig/controllerconfig/upgrades/controller.py index 972ce34cba..0678ca1b8f 100644 --- a/controllerconfig/controllerconfig/controllerconfig/upgrades/controller.py +++ b/controllerconfig/controllerconfig/controllerconfig/upgrades/controller.py @@ -90,9 +90,6 @@ def get_db_credentials(shared_services, from_release): 'sysinv': {'hiera_user_key': 'sysinv::db::postgresql::user', 'keyring_password_key': 'sysinv', }, - 'magnum': {'hiera_user_key': 'magnum::db::postgresql::user', - 'keyring_password_key': 'magnum', - }, 'ironic': {'hiera_user_key': 'ironic::db::postgresql::user', 'keyring_password_key': 'ironic', }, @@ -532,10 +529,6 @@ def migrate_databases(from_release, shared_services, db_credentials, f.write("[api_database]\n") f.write(get_connection_string(db_credentials, 'nova_api')) - with open("/etc/magnum/magnum-dbsync.conf", "w") as f: - f.write("[database]\n") - f.write(get_connection_string(db_credentials, 'magnum')) - with open("/etc/ironic/ironic-dbsync.conf", "w") as f: f.write("[database]\n") f.write(get_connection_string(db_credentials, 'ironic')) @@ -572,10 +565,6 @@ def migrate_databases(from_release, shared_services, db_credentials, # Migrate nova_api (new in R3) ('nova', 'nova-manage --config-file /etc/nova/nova-dbsync.conf api_db sync'), - # Migrate magnum (new in R5) - ('magnum', - 'magnum-db-manage --config-file /etc/magnum/magnum-dbsync.conf ' + - 'upgrade'), # Migrate ironic (new in R5) ('ironic', 'ironic-dbsync --config-file /etc/ironic/ironic-dbsync.conf ' + diff --git a/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/manifests/manifest.yaml b/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/manifests/manifest.yaml index 1581717874..05d767fe8a 100644 --- a/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/manifests/manifest.yaml +++ b/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/manifests/manifest.yaml @@ -2350,8 +2350,6 @@ data: https_enabled: 'False' lockout_period_sec: '300' lockout_retries_num: '3' - # Optional Services - enable_magnum: 'False' # Turn off domain support as we aren't using keystone_multidomain_support: 'False' template: | diff --git a/puppet-modules-wrs/puppet-sysinv/src/sysinv/manifests/init.pp b/puppet-modules-wrs/puppet-sysinv/src/sysinv/manifests/init.pp index f847dc5559..a3990acffa 100644 --- a/puppet-modules-wrs/puppet-sysinv/src/sysinv/manifests/init.pp +++ b/puppet-modules-wrs/puppet-sysinv/src/sysinv/manifests/init.pp @@ -69,7 +69,6 @@ class sysinv ( $neutron_region_name = 'RegionOne', $cinder_region_name = 'RegionOne', $nova_region_name = 'RegionOne', - $magnum_region_name = 'RegionOne', $barbican_region_name = 'RegionOne', $fm_catalog_info = undef, $fernet_key_repository = undef, @@ -203,7 +202,6 @@ class sysinv ( 'openstack_keystone_authtoken/neutron_region_name': value => $neutron_region_name; 'openstack_keystone_authtoken/cinder_region_name': value => $cinder_region_name; 'openstack_keystone_authtoken/nova_region_name': value => $nova_region_name; - 'openstack_keystone_authtoken/magnum_region_name': value => $magnum_region_name; 'openstack_keystone_authtoken/barbican_region_name': value => $barbican_region_name; } diff --git a/sysinv/sysinv/sysinv/requirements.txt b/sysinv/sysinv/sysinv/requirements.txt index e8d9376d5c..47388a9ec0 100644 --- a/sysinv/sysinv/sysinv/requirements.txt +++ b/sysinv/sysinv/sysinv/requirements.txt @@ -33,7 +33,6 @@ jsonpatch>=1.1 WSME>=0.5b2 pyghmi PyYAML>=3.10 -python-magnumclient>=2.0.0 # Apache-2.0 psutil simplejson>=2.2.0 # MIT rpm diff --git a/sysinv/sysinv/sysinv/setup.cfg b/sysinv/sysinv/sysinv/setup.cfg index af95c67699..ee0afe21bc 100644 --- a/sysinv/sysinv/sysinv/setup.cfg +++ b/sysinv/sysinv/sysinv/setup.cfg @@ -56,7 +56,6 @@ systemconfig.puppet_plugins = 016_horizon = sysinv.puppet.horizon:HorizonPuppet 019_cinder = sysinv.puppet.cinder:CinderPuppet 022_heat = sysinv.puppet.heat:HeatPuppet - 023_magnum = sysinv.puppet.magnum:MagnumPuppet 025_ironic = sysinv.puppet.ironic:IronicPuppet 027_dcmanager = sysinv.puppet.dcmanager:DCManagerPuppet 028_dcorch = sysinv.puppet.dcorch:DCOrchPuppet diff --git a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/service.py b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/service.py index 781d8c0ee3..16dfa3ea4b 100644 --- a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/service.py +++ b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/service.py @@ -114,26 +114,6 @@ def _check_service_data(op, service): raise wsme.exc.ClientSideError(_( "Invalid service name")) - # magnum-specific error checking - if name == constants.SERVICE_TYPE_MAGNUM: - # magnum clusters need to all be cleared before service can be disabled - # this error check is commented out because get_magnum_cluster_count - # cannot count clusters of different projects - # it is commented instead of removed in case a --all-tenants feature is - # added to magnum in the future - # if service['enabled'] == False: - # cluster_count = pecan.request.rpcapi.get_magnum_cluster_count( - # pecan.request.context) - # if cluster_count > 0: - # raise wsme.exc.ClientSideError(_( - # "Cannot disable Magnum while clusters are active")) - # magnum can be enabled only on AIO duplex - if service['enabled']: - system = pecan.request.dbapi.isystem_get_one() - if system.system_type != constants.TIS_STD_BUILD: - raise wsme.exc.ClientSideError(_( - "Magnum can be enabled on only Standard systems")) - # ironic-specific error checking if name == constants.SERVICE_TYPE_IRONIC: if service['enabled']: diff --git a/sysinv/sysinv/sysinv/sysinv/common/constants.py b/sysinv/sysinv/sysinv/sysinv/common/constants.py index 764f1c889d..0ed5d90fe9 100644 --- a/sysinv/sysinv/sysinv/sysinv/common/constants.py +++ b/sysinv/sysinv/sysinv/sysinv/common/constants.py @@ -893,7 +893,6 @@ SERVICE_TYPE_NETWORK = 'network' SERVICE_TYPE_HORIZON = "horizon" SERVICE_TYPE_CEPH = 'ceph' SERVICE_TYPE_CINDER = 'cinder' -SERVICE_TYPE_MAGNUM = 'magnum' SERVICE_TYPE_PLATFORM = 'platform' SERVICE_TYPE_NOVA = 'nova' SERVICE_TYPE_SWIFT = 'swift' @@ -1259,7 +1258,7 @@ PARTITION_MANAGE_LOCK = "partition-manage" # Optional services ALL_OPTIONAL_SERVICES = [SERVICE_TYPE_CINDER, - SERVICE_TYPE_MAGNUM, SERVICE_TYPE_SWIFT, + SERVICE_TYPE_SWIFT, SERVICE_TYPE_IRONIC] # System mode diff --git a/sysinv/sysinv/sysinv/sysinv/conductor/manager.py b/sysinv/sysinv/sysinv/sysinv/conductor/manager.py index 5b3411b3e7..e072d75e2b 100644 --- a/sysinv/sysinv/sysinv/sysinv/conductor/manager.py +++ b/sysinv/sysinv/sysinv/sysinv/conductor/manager.py @@ -1518,9 +1518,6 @@ class ConductorManager(service.PeriodicService): } self._config_apply_runtime_manifest(context, config_uuid, config_dict) - def get_magnum_cluster_count(self, context): - return self._openstack.get_magnum_cluster_count() - def _configure_worker_host(self, context, host): """Configure a worker host with the supplied data. @@ -7178,11 +7175,6 @@ class ConductorManager(service.PeriodicService): # controller hosts will actively apply the manifests config_uuid = self._config_update_hosts(context, [constants.CONTROLLER]) - elif service == constants.SERVICE_TYPE_MAGNUM: - config_uuid = self._config_update_hosts(context, - [constants.CONTROLLER], - reboot=True) - elif service == constants.SERVICE_TYPE_IRONIC: config_uuid = self._config_update_hosts(context, [constants.CONTROLLER], diff --git a/sysinv/sysinv/sysinv/sysinv/conductor/openstack.py b/sysinv/sysinv/sysinv/sysinv/conductor/openstack.py index 66240f988d..98474130b6 100644 --- a/sysinv/sysinv/sysinv/sysinv/conductor/openstack.py +++ b/sysinv/sysinv/sysinv/sysinv/conductor/openstack.py @@ -25,7 +25,6 @@ from keystoneclient.v3 import client as keystone_client from keystoneclient.auth.identity import v3 from keystoneclient import session from sqlalchemy.orm import exc -from magnumclient.v1 import client as magnum_client_v1 from barbicanclient.v1 import client as barbican_client_v1 LOG = logging.getLogger(__name__) @@ -102,9 +101,6 @@ openstack_keystone_opts = [ cfg.StrOpt('nova_region_name', default='RegionOne', help=_("Nova Region Name")), - cfg.StrOpt('magnum_region_name', - default='RegionOne', - help=_("Magnum Region Name")), cfg.StrOpt('barbican_region_name', default='RegionOne', help=_("Barbican Region Name")), @@ -138,7 +134,6 @@ class OpenStackOperator(object): self.keystone_session = None self.openstack_keystone_client = None self.openstack_keystone_session = None - self.magnum_client = None self.nova_client = None self.neutron_client = None self._neutron_extension_list = [] @@ -759,27 +754,6 @@ class OpenStackOperator(object): "region: %s" % e) return ceph_present - def _get_magnumclient(self): - if not self.magnum_client: # should not cache this forever - # magnumclient doesn't yet use v3 keystone auth - # because neutron and nova client doesn't - # and I shamelessly copied them - self.magnum_client = magnum_client_v1.Client( - session=self._get_keystone_session(OPENSTACK_CONFIG), - auth_url=self._get_auth_url(OPENSTACK_CONFIG), - endpoint_type='internalURL', - direct_use=False, - region_name=cfg.CONF[OPENSTACK_CONFIG].magnum_region_name) - return self.magnum_client - - def get_magnum_cluster_count(self): - try: - clusters = self._get_magnumclient().clusters.list() - return len(clusters) - except Exception: - LOG.error("Unable to get backend list of magnum clusters") - return 0 - ################# # Barbican ################# diff --git a/sysinv/sysinv/sysinv/sysinv/conductor/rpcapi.py b/sysinv/sysinv/sysinv/sysinv/conductor/rpcapi.py index 583d2d3582..ea61e46a36 100644 --- a/sysinv/sysinv/sysinv/sysinv/conductor/rpcapi.py +++ b/sysinv/sysinv/sysinv/sysinv/conductor/rpcapi.py @@ -876,15 +876,6 @@ class ConductorAPI(sysinv.openstack.common.rpc.proxy.RpcProxy): return self.cast(context, self.make_msg('docker_registry_garbage_collect')) - def get_magnum_cluster_count(self, context): - """Synchronously, have the conductor get magnum cluster count - configuration. - - :param context: request context. - """ - return self.call(context, - self.make_msg('get_magnum_cluster_count')) - def update_lvm_cinder_config(self, context): """Synchronously, have the conductor update Cinder LVM on a controller. diff --git a/sysinv/sysinv/sysinv/sysinv/helm/horizon.py b/sysinv/sysinv/sysinv/sysinv/helm/horizon.py index f9996bd7f3..280d40a187 100644 --- a/sysinv/sysinv/sysinv/sysinv/helm/horizon.py +++ b/sysinv/sysinv/sysinv/sysinv/helm/horizon.py @@ -106,13 +106,6 @@ class HorizonHelm(openstack.OpenstackBaseHelm): 'lockout_period_sec': str(lockout_seconds.value), }) - # Optional services settings - service_config = self._get_service_config('magnum') - if service_config is not None and service_config.enabled: - local_settings_config.update({ - 'enable_magnum': 'True', - }) - return local_settings_config def _region_config(self): diff --git a/sysinv/sysinv/sysinv/sysinv/puppet/inventory.py b/sysinv/sysinv/sysinv/sysinv/puppet/inventory.py index 3dab83e3e4..b40c8d2e4a 100644 --- a/sysinv/sysinv/sysinv/sysinv/puppet/inventory.py +++ b/sysinv/sysinv/sysinv/sysinv/puppet/inventory.py @@ -48,7 +48,6 @@ class SystemInventoryPuppet(openstack.OpenstackBasePuppet): neutron_region_name = self._operator.neutron.get_region_name() cinder_region_name = self._operator.cinder.get_region_name() nova_region_name = self._operator.nova.get_region_name() - magnum_region_name = self._operator.magnum.get_region_name() barbican_region_name = self._operator.barbican.get_region_name() return { @@ -57,7 +56,6 @@ class SystemInventoryPuppet(openstack.OpenstackBasePuppet): 'sysinv::neutron_region_name': neutron_region_name, 'sysinv::cinder_region_name': cinder_region_name, 'sysinv::nova_region_name': nova_region_name, - 'sysinv::magnum_region_name': magnum_region_name, 'sysinv::barbican_region_name': barbican_region_name, 'sysinv::keystone::auth::public_url': self.get_public_url(), diff --git a/sysinv/sysinv/sysinv/sysinv/puppet/magnum.py b/sysinv/sysinv/sysinv/sysinv/puppet/magnum.py deleted file mode 100644 index afe30b2e31..0000000000 --- a/sysinv/sysinv/sysinv/sysinv/puppet/magnum.py +++ /dev/null @@ -1,105 +0,0 @@ -# -# Copyright (c) 2017 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# - -from sysinv.puppet import openstack - - -class MagnumPuppet(openstack.OpenstackBasePuppet): - """Class to encapsulate puppet operations for magnum configuration""" - - SERVICE_NAME = 'magnum' - SERVICE_PORT = 9511 - SERVICE_NAME_DOMAIN = 'magnum-domain' - - def get_static_config(self): - dbuser = self._get_database_username(self.SERVICE_NAME) - - return { - 'magnum::db::postgresql::user': dbuser, - } - - def get_secure_static_config(self): - dbpass = self._get_database_password(self.SERVICE_NAME) - kspass = self._get_service_password(self.SERVICE_NAME) - dkspass = self._get_service_password(self.SERVICE_NAME_DOMAIN) - - return { - 'magnum::db::postgresql::password': dbpass, - - 'magnum::keystone::auth::password': kspass, - 'magnum::keystone::authtoken::password': kspass, - - 'magnum::keystone::domain::domain_password': dkspass, - } - - def get_system_config(self): - ksuser = self._get_service_user_name(self.SERVICE_NAME) \ - + self._region_name() - - config = { - 'magnum::clients::region_name': - self._region_name(), - 'openstack::magnum::params::service_enabled': - self._get_service_enabled(), - } - if self._get_service_enabled(): - config.update({ - 'magnum::keystone::auth::region': - self._region_name(), - 'magnum::keystone::auth::auth_name': ksuser, - 'magnum::keystone::auth::public_url': - self.get_public_url(), - 'magnum::keystone::auth::internal_url': - self.get_internal_url(), - 'magnum::keystone::auth::admin_url': - self.get_admin_url(), - 'magnum::keystone::auth::tenant': - self._get_service_tenant_name(), - - 'magnum::keystone::authtoken::username': ksuser, - 'magnum::keystone::authtoken::project_name': - self._get_service_tenant_name(), - 'magnum::keystone::authtoken::auth_url': - self._keystone_identity_uri(), - # unlike all other services, magnum wants a /v3 at the end - # of auth uri in config, which caused a lot of grief - # at one point - 'magnum::keystone::authtoken::auth_uri': - self._keystone_auth_uri() + '/v3', - 'magnum::keystone::authtoken::region': - self._keystone_region_name(), - 'magnum::keystone::authtoken::user_domain_name': - self._get_service_user_domain_name(), - 'magnum::keystone::authtoken::project_domain_name': - self._get_service_project_domain_name(), }) - return config - - def get_secure_system_config(self): - config = { - 'magnum::db::database_connection': - self._format_database_connection(self.SERVICE_NAME), - } - - return config - - def _get_service_enabled(self): - service_config = self._get_service_config(self.SERVICE_NAME) - if service_config: - return service_config.enabled - else: - return False - - def get_public_url(self): - return self._format_public_endpoint(self.SERVICE_PORT) - - def get_internal_url(self): - return self._format_private_endpoint(self.SERVICE_PORT) - - def get_admin_url(self): - return self._format_private_endpoint(self.SERVICE_PORT) - - def get_region_name(self): - return self._get_service_region_name(self.SERVICE_NAME)