Drop Mesos code
The coe mesos has not been maintained for quite some time and hasn't got much attention from the community in general. As discussed in the mailing list [1] we are dropping for now. [1] http://lists.openstack.org/pipermail/openstack-discuss/2021-December/026230.html Co-Authored-By: jake.yip@ardc.edu.au Change-Id: Ie7de9a37bfad6214f52d0605409e74d62a51df47
This commit is contained in:
parent
ab9fe94d53
commit
6e8657912c
|
@ -142,7 +142,7 @@ coe:
|
|||
required: true
|
||||
description: |
|
||||
Specify the Container Orchestration Engine to use. Supported COEs
|
||||
include ``kubernetes``, ``swarm``, ``mesos``. If your environment has
|
||||
include ``kubernetes``, ``swarm``. If your environment has
|
||||
additional bay/cluster drivers installed, refer to the bay/cluster driver
|
||||
documentation for the new COE names.
|
||||
coe_version:
|
||||
|
|
|
@ -3,7 +3,7 @@ Using Proxies in magnum if running under firewall
|
|||
=================================================
|
||||
|
||||
If you are running magnum behind a firewall then you may need a proxy
|
||||
for using services like docker, kubernetes. Use these steps
|
||||
for using services like docker and kubernetes. Use these steps
|
||||
when your firewall will not allow you to use those services without a
|
||||
proxy.
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ They are loosely grouped as: mandatory, infrastructure, COE specific.
|
|||
|
||||
--coe \<coe\>
|
||||
Specify the Container Orchestration Engine to use. Supported
|
||||
COE's include 'kubernetes', 'swarm'. If your environment
|
||||
COE's include 'kubernetes' and 'swarm'. If your environment
|
||||
has additional cluster drivers installed, refer to the cluster driver
|
||||
documentation for the new COE names. This is a mandatory parameter
|
||||
and there is no default value.
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
from glanceclient import exc as glance_exception
|
||||
from novaclient import exceptions as nova_exception
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
from magnum.api import utils as api_utils
|
||||
from magnum.common import clients
|
||||
|
@ -113,64 +112,6 @@ def validate_labels(labels):
|
|||
validate_method(labels)
|
||||
|
||||
|
||||
def validate_labels_isolation(labels):
|
||||
"""Validate mesos_slave_isolation"""
|
||||
mesos_slave_isolation = labels.get('mesos_slave_isolation')
|
||||
mesos_slave_isolation_list = mesos_slave_isolation.split(',')
|
||||
unsupported_isolations = set(mesos_slave_isolation_list) - set(
|
||||
SUPPORTED_ISOLATION)
|
||||
if (len(unsupported_isolations) > 0):
|
||||
raise exception.InvalidParameterValue(_(
|
||||
'property "labels/mesos_slave_isolation" with value '
|
||||
'"%(isolation_val)s" is not supported, supported values are: '
|
||||
'%(supported_isolation)s') % {
|
||||
'isolation_val': ', '.join(list(unsupported_isolations)),
|
||||
'supported_isolation': ', '.join(
|
||||
SUPPORTED_ISOLATION + ['unspecified'])})
|
||||
|
||||
|
||||
def validate_labels_image_providers(labels):
|
||||
"""Validate mesos_slave_image_providers"""
|
||||
mesos_slave_image_providers = labels.get('mesos_slave_image_providers')
|
||||
mesos_slave_image_providers_list = mesos_slave_image_providers.split(',')
|
||||
isolation_with_valid_data = False
|
||||
for image_providers_val in mesos_slave_image_providers_list:
|
||||
image_providers_val = image_providers_val.lower()
|
||||
if image_providers_val not in SUPPORTED_IMAGE_PROVIDERS:
|
||||
raise exception.InvalidParameterValue(_(
|
||||
'property "labels/mesos_slave_image_providers" with value '
|
||||
'"%(image_providers)s" is not supported, supported values '
|
||||
'are: %(supported_image_providers)s') % {
|
||||
'image_providers': image_providers_val,
|
||||
'supported_image_providers': ', '.join(
|
||||
SUPPORTED_IMAGE_PROVIDERS + ['unspecified'])})
|
||||
|
||||
if image_providers_val == 'docker':
|
||||
mesos_slave_isolation = labels.get('mesos_slave_isolation')
|
||||
if mesos_slave_isolation is not None:
|
||||
mesos_slave_isolation_list = mesos_slave_isolation.split(',')
|
||||
for isolations_val in mesos_slave_isolation_list:
|
||||
if isolations_val == 'docker/runtime':
|
||||
isolation_with_valid_data = True
|
||||
if mesos_slave_isolation is None or not isolation_with_valid_data:
|
||||
raise exception.RequiredParameterNotProvided(_(
|
||||
"Docker runtime isolator has to be specified if 'docker' "
|
||||
"is included in 'mesos_slave_image_providers' Please add "
|
||||
"'docker/runtime' to 'mesos_slave_isolation' labels "
|
||||
"flags"))
|
||||
|
||||
|
||||
def validate_labels_executor_env_variables(labels):
|
||||
"""Validate executor_environment_variables"""
|
||||
mesos_slave_executor_env_val = labels.get(
|
||||
'mesos_slave_executor_env_variables')
|
||||
try:
|
||||
jsonutils.loads(mesos_slave_executor_env_val)
|
||||
except ValueError:
|
||||
err = (_("Json format error"))
|
||||
raise exception.InvalidParameterValue(err)
|
||||
|
||||
|
||||
def validate_labels_strategy(labels):
|
||||
"""Validate swarm_strategy"""
|
||||
swarm_strategy = list(labels.get('swarm_strategy', "").split())
|
||||
|
@ -249,9 +190,4 @@ validators = {'image_id': validate_image,
|
|||
'fixed_network': validate_fixed_network,
|
||||
'labels': validate_labels}
|
||||
|
||||
labels_validators = {'mesos_slave_isolation': validate_labels_isolation,
|
||||
'mesos_slave_image_providers':
|
||||
validate_labels_image_providers,
|
||||
'mesos_slave_executor_env_variables':
|
||||
validate_labels_executor_env_variables,
|
||||
'swarm_strategy': validate_labels_strategy}
|
||||
labels_validators = {'swarm_strategy': validate_labels_strategy}
|
||||
|
|
|
@ -341,15 +341,3 @@ class SwarmValidator(Validator):
|
|||
swarm_default_network_driver)
|
||||
|
||||
supported_volume_driver = ['rexray']
|
||||
|
||||
|
||||
class MesosValidator(Validator):
|
||||
|
||||
supported_network_drivers = ['docker']
|
||||
supported_server_types = ['vm', 'bm']
|
||||
allowed_network_drivers = (CONF.cluster_template.
|
||||
mesos_allowed_network_drivers)
|
||||
default_network_driver = (CONF.cluster_template.
|
||||
mesos_default_network_driver)
|
||||
|
||||
supported_volume_driver = ['rexray']
|
||||
|
|
|
@ -28,7 +28,7 @@ def get_scale_manager(context, osclient, cluster):
|
|||
cluster_driver = Driver.get_driver_for_cluster(context, cluster)
|
||||
manager = cluster_driver.get_scale_manager(context, osclient, cluster)
|
||||
|
||||
# NOTE: Currently only kubernetes and mesos cluster scale managers
|
||||
# NOTE: Currently only kubernetes cluster scale managers
|
||||
# are available.
|
||||
return manager
|
||||
|
||||
|
|
|
@ -43,17 +43,6 @@ cluster_template_opts = [
|
|||
help=_("Default network driver for docker swarm "
|
||||
"cluster-templates."),
|
||||
deprecated_group='baymodel'),
|
||||
cfg.ListOpt('mesos_allowed_network_drivers',
|
||||
default=['all'],
|
||||
help=_("Allowed network drivers for mesos cluster-templates. "
|
||||
"Use 'all' keyword to allow all drivers supported "
|
||||
"for mesos cluster-templates. Supported network "
|
||||
"drivers include docker."),
|
||||
deprecated_group='baymodel'),
|
||||
cfg.StrOpt('mesos_default_network_driver',
|
||||
default='docker',
|
||||
help=_("Default network driver for mesos cluster-templates."),
|
||||
deprecated_group='baymodel'),
|
||||
]
|
||||
|
||||
|
||||
|
|
|
@ -99,9 +99,9 @@ class ContainerStatus(fields.Enum):
|
|||
|
||||
class ClusterType(fields.Enum):
|
||||
ALL = (
|
||||
KUBERNETES, SWARM, MESOS, DCOS, SWARM_MODE,
|
||||
KUBERNETES, SWARM, SWARM_MODE,
|
||||
) = (
|
||||
'kubernetes', 'swarm', 'mesos', 'dcos', 'swarm-mode',
|
||||
'kubernetes', 'swarm', 'swarm-mode',
|
||||
)
|
||||
|
||||
def __init__(self):
|
||||
|
|
|
@ -41,9 +41,7 @@ if [[ -e /etc/ci/mirror_info.sh ]]; then
|
|||
source /etc/ci/mirror_info.sh
|
||||
fi
|
||||
|
||||
if [ "$coe" = "mesos" ]; then
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_GUEST_IMAGE_URL=https://fedorapeople.org/groups/magnum/ubuntu-mesos-ocata.qcow2"
|
||||
elif [ "$coe" = "k8s-coreos" ]; then
|
||||
if [ "$coe" = "k8s-coreos" ]; then
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_GUEST_IMAGE_URL=http://beta.release.core-os.net/amd64-usr/current/coreos_production_openstack_image.img.bz2"
|
||||
elif [ "${coe}${special}" = "k8s-ironic" ]; then
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_GUEST_IMAGE_URL='https://fedorapeople.org/groups/magnum/fedora-kubernetes-ironic-latest.tar.gz'"
|
||||
|
|
|
@ -29,10 +29,7 @@ function create_test_data {
|
|||
|
||||
coe=$1
|
||||
special=$2
|
||||
if [ $coe == 'mesos' ]; then
|
||||
local image_name="ubuntu.*mesos"
|
||||
local container_format="bare"
|
||||
elif [ $coe == 'k8s-coreos' ]; then
|
||||
if [ $coe == 'k8s-coreos' ]; then
|
||||
local image_name="coreos"
|
||||
local container_format="bare"
|
||||
elif [ "${coe}${special}" == 'k8s-ironic' ]; then
|
||||
|
@ -158,8 +155,7 @@ export MAGNUM_DIR="$BASE/new/magnum"
|
|||
sudo chown -R $USER:stack $MAGNUM_DIR
|
||||
|
||||
# Run functional tests
|
||||
# Currently we support functional-api, functional-k8s, will support swarm,
|
||||
# mesos later.
|
||||
# Currently we support functional-api, functional-k8s, will support swarm.
|
||||
|
||||
echo "Running magnum functional test suite for $1"
|
||||
|
||||
|
|
|
@ -382,8 +382,6 @@ extendedKeyUsage = clientAuth
|
|||
output_keys = ["swarm_primary_master",
|
||||
"swarm_secondary_masters",
|
||||
"swarm_nodes"]
|
||||
elif self.cluster_template.coe == "mesos":
|
||||
output_keys = ["mesos_master", "mesos_slaves"]
|
||||
|
||||
for output in stack_outputs:
|
||||
for key in output_keys:
|
||||
|
|
|
@ -1138,9 +1138,9 @@ class TestPost(api_base.FunctionalTest):
|
|||
|
||||
def test_create_cluster_with_disabled_driver(self):
|
||||
cfg.CONF.set_override('disabled_drivers',
|
||||
['mesos_ubuntu_v1'],
|
||||
['swarm_fedora_atomic_v1'],
|
||||
group='drivers')
|
||||
bdict = apiutils.cluster_template_post_data(coe="mesos")
|
||||
bdict = apiutils.cluster_template_post_data(coe="swarm")
|
||||
self.assertRaises(AppError, self.post_json, '/clustertemplates',
|
||||
bdict)
|
||||
|
||||
|
|
|
@ -125,76 +125,6 @@ class TestAttrValidator(base.BaseTestCase):
|
|||
fake_labels = {}
|
||||
attr_validator.validate_labels(fake_labels)
|
||||
|
||||
def test_validate_labels_main_isolation_invalid_label(self):
|
||||
fake_labels = {'mesos_slave_isolation': 'abc'}
|
||||
self.assertRaises(exception.InvalidParameterValue,
|
||||
attr_validator.validate_labels,
|
||||
fake_labels)
|
||||
|
||||
def test_validate_labels_isolation_valid(self):
|
||||
fake_labels = {'mesos_slave_isolation':
|
||||
'filesystem/posix,filesystem/linux'}
|
||||
attr_validator.validate_labels_isolation(fake_labels)
|
||||
|
||||
def test_validate_labels_main_with_valid_providers_none_isolation(self):
|
||||
fake_labels = {'mesos_slave_image_providers': 'docker'}
|
||||
self.assertRaises(exception.RequiredParameterNotProvided,
|
||||
attr_validator.validate_labels,
|
||||
fake_labels)
|
||||
|
||||
def test_validate_labels_with_valid_providers_invalid_isolation(self):
|
||||
fake_labels = {'mesos_slave_image_providers': 'docker',
|
||||
'mesos_slave_isolation': 'abc'}
|
||||
self.assertRaises(exception.RequiredParameterNotProvided,
|
||||
attr_validator.validate_labels_image_providers,
|
||||
fake_labels)
|
||||
|
||||
def test_validate_labels_with_valid_providers_invalid_providers(self):
|
||||
fake_labels = {'mesos_slave_image_providers': 'appc'}
|
||||
attr_validator.validate_labels_image_providers(fake_labels)
|
||||
|
||||
def test_validate_labels_with_invalid_providers(self):
|
||||
fake_labels = {'mesos_slave_image_providers': 'abc'}
|
||||
self.assertRaises(exception.InvalidParameterValue,
|
||||
attr_validator.validate_labels_image_providers,
|
||||
fake_labels)
|
||||
|
||||
def test_validate_labels_with_valid_providers_none_isolation(self):
|
||||
fake_labels = {'mesos_slave_image_providers': 'docker'}
|
||||
self.assertRaises(exception.RequiredParameterNotProvided,
|
||||
attr_validator.validate_labels_image_providers,
|
||||
fake_labels)
|
||||
|
||||
def test_validate_labels_with_valid_providers_valid_isolation(self):
|
||||
fake_labels = {'mesos_slave_image_providers': 'docker',
|
||||
'mesos_slave_isolation': 'docker/runtime'}
|
||||
attr_validator.validate_labels_image_providers(fake_labels)
|
||||
|
||||
def test_validate_labels_with_environment_variables_valid_json(self):
|
||||
contents = '{"step": "upgrade", "interface": "deploy"}'
|
||||
fack_labels = {'mesos_slave_executor_env_variables': contents}
|
||||
attr_validator.validate_labels_executor_env_variables(
|
||||
fack_labels)
|
||||
|
||||
def test_validate_labels_with_environment_variables_bad_json(self):
|
||||
fack_labels = {'mesos_slave_executor_env_variables': 'step'}
|
||||
self.assertRaisesRegex(
|
||||
exception.InvalidParameterValue,
|
||||
"Json format error",
|
||||
attr_validator.validate_labels_executor_env_variables,
|
||||
fack_labels)
|
||||
|
||||
def test_validate_labels_with_valid_isolation(self):
|
||||
fake_labels = {'mesos_slave_isolation':
|
||||
'filesystem/posix,filesystem/linux'}
|
||||
attr_validator.validate_labels_isolation(fake_labels)
|
||||
|
||||
def test_validate_labels_isolation_invalid(self):
|
||||
fake_labels = {'mesos_slave_isolation': 'filesystem'}
|
||||
self.assertRaises(exception.InvalidParameterValue,
|
||||
attr_validator.validate_labels_isolation,
|
||||
fake_labels)
|
||||
|
||||
def test_validate_labels_strategy_valid(self):
|
||||
fake_labels = {'swarm_strategy': 'spread'}
|
||||
attr_validator.validate_labels_strategy(fake_labels)
|
||||
|
@ -306,7 +236,7 @@ class TestAttrValidator(base.BaseTestCase):
|
|||
@mock.patch('magnum.api.attr_validator.validate_labels')
|
||||
def test_validate_os_resources_with_label(self, mock_validate_labels,
|
||||
mock_os_cli):
|
||||
mock_cluster_template = {'labels': {'mesos_slave_isolation': 'abc'}}
|
||||
mock_cluster_template = {'labels': {'swarm_strategy': 'abc'}}
|
||||
mock_context = mock.MagicMock()
|
||||
self.assertRaises(exception.InvalidParameterValue,
|
||||
attr_validator.validate_os_resources, mock_context,
|
||||
|
|
|
@ -95,8 +95,7 @@ class TestClusterType(test_fields.TestField):
|
|||
super(TestClusterType, self).setUp()
|
||||
self.field = fields.ClusterTypeField()
|
||||
self.coerce_good_values = [('kubernetes', 'kubernetes'),
|
||||
('swarm', 'swarm'),
|
||||
('mesos', 'mesos'), ]
|
||||
('swarm', 'swarm'), ]
|
||||
self.coerce_bad_values = ['invalid']
|
||||
|
||||
self.to_primitive_values = self.coerce_good_values[0:1]
|
||||
|
|
|
@ -356,7 +356,7 @@ class TestObject(test_base.TestCase, _TestObject):
|
|||
# https://docs.openstack.org/magnum/latest/contributor/objects.html
|
||||
object_data = {
|
||||
'Cluster': '1.23-dfaf9ecb65a5fcab4f6c36497a8bc866',
|
||||
'ClusterTemplate': '1.20-85469623f678e916f26e3cb5924ae664',
|
||||
'ClusterTemplate': '1.20-ea3b06c5fdbf4a3fba0db9865cd2ba4c',
|
||||
'Certificate': '1.2-64f24db0e10ad4cbd72aea21d2075a80',
|
||||
'MyObj': '1.0-34c4b1aadefd177b13f9a2f894cc23cd',
|
||||
'X509KeyPair': '1.2-d81950af36c59a71365e33ce539d24f9',
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
other:
|
||||
- |
|
||||
We are dropping mesos for the lack of support/test
|
||||
and no usage from the community.
|
Loading…
Reference in New Issue