From 4246c10af187857a351da9b7aaab083a716780d4 Mon Sep 17 00:00:00 2001 From: Andrey Pavlov Date: Tue, 3 Feb 2015 15:31:25 +0300 Subject: [PATCH] Make EC2 compatible with current AWS CLI. AWS CLI is a recommended Amazon's CLI and it uses botocore library instead of boto to access EC2 API: http://aws.amazon.com/cli/ Amazon's URL for AWS EC2 API is: https://ec2.amazonaws.com/ OpenStack nova's EC2 API service URL is: http://some.server.com:8773/services/Cloud AWS CLI works with the root URLs (without something trailing, like ../services/Cloud). This is so because of the following bug in botocore: https://github.com/boto/botocore/issues/420 We did supply the fix here: https://github.com/Andrey-mp/botocore/commit/162bdc22de3ff3d6243459c132ca9bd01e02533f However, we do not control botocore and cannot predict when this fix is going to be applied or guarantee that in the future nothing alike happens again (in fact, older botocore didn't have this bug). Another problem is that there is a set of Tempest tests currently used to work against stackforge/ec2-api but which is about to be employed against nova's ec2-api. These Tempest tests use botocore too. And won't work with the nova's EC2-API until either botocore or nova is fixed. So we suggest to fix the situation in nova by changing the URL to http://some.server.com:8773/. It'll provide the solution for OpenStack independent of botocore bugs and fixes in this area, and will make the service URL more alike (compatible, sort of) with the AWS EC2 API. Change-Id: If9fcddcd455090f4b76a16251f69b361d6260291 Closes-Bug: 1417555 --- etc/nova/api-paste.ini | 2 +- nova/api/ec2/cloud.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/nova/api-paste.ini b/etc/nova/api-paste.ini index 6409494db0..be00f38735 100644 --- a/etc/nova/api-paste.ini +++ b/etc/nova/api-paste.ini @@ -17,7 +17,7 @@ paste.app_factory = nova.api.metadata.handler:MetadataRequestHandler.factory [composite:ec2] use = egg:Paste#urlmap -/services/Cloud: ec2cloud +/: ec2cloud [composite:ec2cloud] use = call:nova.api.auth:pipeline_factory diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index 12f8e4b9f3..b074fae829 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -66,7 +66,7 @@ ec2_opts = [ help='The protocol to use when connecting to the EC2 API ' 'server (http, https)'), cfg.StrOpt('ec2_path', - default='/services/Cloud', + default='/', help='The path prefix used to call the ec2 API server'), cfg.ListOpt('region_list', default=[],