Remove magnum from baremetal.
Magnum is no longer packaged on bare metal. The sysinv and upgrades code related to magnum has been removed. The helm configuration for magnum remains, although it is not currently supported in containers either. The magnum-ui is not installed in platform or containerized horizon so the code to enable it is removed. Some upgrade code remains, due to the fact that that utility is in the process of being re-written. Story: 2004764 Task: 34333 Change-Id: I56873b4e04aac2e7d0cd57909beea00ecc2c1b9a Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This commit is contained in:
parent
34e72c2f5f
commit
609d84d846
|
@ -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 ' +
|
||||
|
|
|
@ -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: |
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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']:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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],
|
||||
|
|
|
@ -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
|
||||
#################
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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)
|
Loading…
Reference in New Issue