Nuke EC2 API from api-paste and remove wsgi support

Tempest has already removed the EC2 API tests in:
Ib5e24e19bcba9808a9f49fe7f328668df77fe4f9

We have a review in devstack below that removes EC2
API service by default.

In this review, we are removing support for the really
old EC2 API support in Nova. Anyone who needs EC2 support
should use the new EC2-API project:
http://git.openstack.org/cgit/openstack/ec2-api/

The necessary changes in Tempest and DevStack are
already merged.  In a follow on review, will remove
the EC2 specific options, code and tests from Nova.

DocImpact

Change-Id: Id7936be290b6febd18deb4c2db8ea4d678d4d9b1
This commit is contained in:
Davanum Srinivas
2015-10-07 21:50:24 -07:00
parent 3c786f2099
commit eec7a55319
6 changed files with 9 additions and 139 deletions

View File

@@ -6,53 +6,11 @@ use = egg:Paste#urlmap
/: meta
[pipeline:meta]
pipeline = cors ec2faultwrap logrequest metaapp
pipeline = cors metaapp
[app:metaapp]
paste.app_factory = nova.api.metadata.handler:MetadataRequestHandler.factory
#######
# EC2 #
#######
# NOTE: this is now deprecated in favor of https://github.com/openstack/ec2-api
[composite:ec2]
use = egg:Paste#urlmap
/: ec2cloud
[composite:ec2cloud]
use = call:nova.api.auth:pipeline_factory
noauth2 = cors ec2faultwrap logrequest ec2noauth cloudrequest validator ec2executor
keystone = cors ec2faultwrap logrequest ec2keystoneauth cloudrequest validator ec2executor
[filter:ec2faultwrap]
paste.filter_factory = nova.api.ec2:FaultWrapper.factory
[filter:logrequest]
paste.filter_factory = nova.api.ec2:RequestLogging.factory
[filter:ec2lockout]
paste.filter_factory = nova.api.ec2:Lockout.factory
[filter:ec2keystoneauth]
paste.filter_factory = nova.api.ec2:EC2KeystoneAuth.factory
[filter:ec2noauth]
paste.filter_factory = nova.api.ec2:NoAuth.factory
[filter:cloudrequest]
controller = nova.api.ec2.cloud.CloudController
paste.filter_factory = nova.api.ec2:Requestify.factory
[filter:authorizer]
paste.filter_factory = nova.api.ec2:Authorizer.factory
[filter:validator]
paste.filter_factory = nova.api.ec2:Validator.factory
[app:ec2executor]
paste.app_factory = nova.api.ec2:Executor.factory
#############
# OpenStack #
#############

View File

@@ -1,48 +0,0 @@
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Starter script for Nova EC2 API."""
import sys
from oslo_config import cfg
from oslo_log import log as logging
from oslo_reports import guru_meditation_report as gmr
from nova import config
from nova import objects
from nova import service
from nova import utils
from nova import version
CONF = cfg.CONF
CONF.import_opt('enabled_ssl_apis', 'nova.service')
def main():
config.parse_args(sys.argv)
logging.setup(CONF, "nova")
utils.monkey_patch()
objects.register_all()
gmr.TextGuruMeditation.setup_autorun(version)
should_use_ssl = 'ec2' in CONF.enabled_ssl_apis
server = service.WSGIService('ec2', use_ssl=should_use_ssl,
max_url_len=16384)
service.serve(server, workers=server.workers)
service.wait()

View File

@@ -58,7 +58,7 @@ service_opts = [
' periodic task scheduler to reduce stampeding.'
' (Disable by setting to 0)'),
cfg.ListOpt('enabled_apis',
default=['ec2', 'osapi_compute', 'metadata'],
default=['osapi_compute', 'metadata'],
help='A list of APIs to enable by default'),
cfg.ListOpt('enabled_ssl_apis',
default=[],

View File

@@ -1,46 +0,0 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""WSGI script for Nova EC2 API
EXPERIMENTAL support script for running Nova EC2 API under Apache2 etc.
"""
import eventlet
from oslo_config import cfg
from oslo_log import log as logging
from paste import deploy
from nova import config
from nova import objects
from nova import service # noqa
from nova import utils
CONF = cfg.CONF
config_files = ['/etc/nova/api-paste.ini', '/etc/nova/nova.conf']
config.parse_args([], default_config_files=config_files)
LOG = logging.getLogger(__name__)
logging.setup(CONF, "nova")
utils.monkey_patch()
objects.register_all()
conf = config_files[0]
eventlet.monkey_patch(os=False, thread=False)
name = "ec2"
options = deploy.appconfig('config:%s' % conf, name=name)
application = deploy.loadapp('config:%s' % conf, name=name)

View File

@@ -0,0 +1,7 @@
---
other:
- Nova's EC2 API support which was deprecated in Kilo
(https://wiki.openstack.org/wiki/ReleaseNotes/Kilo#Upgrade_Notes_2) is
removed from Mitaka. This has been replaced by the new ec2-api project
(http://git.openstack.org/cgit/openstack/ec2-api/).

View File

@@ -45,7 +45,6 @@ nova.image.download.modules =
console_scripts =
nova-all = nova.cmd.all:main
nova-api = nova.cmd.api:main
nova-api-ec2 = nova.cmd.api_ec2:main
nova-api-metadata = nova.cmd.api_metadata:main
nova-api-os-compute = nova.cmd.api_os_compute:main
nova-cells = nova.cmd.cells:main