Commit Graph

34 Commits

Author SHA1 Message Date
Xingjian Zhang a17f4bdcfa Add some automatic steps & Fix SQL in install scripts
Change-Id: I7e9bd8b308ddc84e95e694abe806eb7630b9919c
2022-09-27 19:41:49 +08:00
pangliye f56bbc3d3a Fix misspell word
Change-Id: Ib79143360c47655fb9dad109368cba949a3c17a3
2019-11-19 14:01:09 +08:00
Andrey Pavlov 1886d64d3e Revert "temporary disable functional tests"
This reverts commit 3d6106d99c.

Change-Id: I390634d5321d3f4210a5d378178c8d8b1e445e19
2019-10-01 06:06:46 +00:00
Vu Cong Tuan 8a3358e2d1 Replace deprecated "auth_uri" by "www_authenticate_uri"
According to [1], "auth_uri" has been deprecated.
This patch replace it by using "www_authenticate_uri" instead.

[1] https://review.openstack.org/#/c/508522

Change-Id: I3242394fd4ebfa7eda390be872372a53b5311a46
2018-05-11 09:54:02 +07:00
Andrey Pavlov 38b882d97d synchronize default vpc creation across threads
when two clients come for functions where check_default_vpc
is present then one goes to create default vpc and other fails.
it fails because vpc with is_default flag is already in DB
but children objects (like subnets) are not yet created.
For we will lock check_default_vpc function.

Another way is to rework _create_vpc. It can create VPC
without is_default flag. And at the end it can set the flag.
First thread will pass this. And second thread will fail at flag set
operation and will revert all created object. Then second thread
can check presence of default VPC again.
This way is better cause it can work across several controllers.

Change-Id: I5586fa234257b72721e328a9fa2375a56d1553c2
2018-03-24 00:49:01 +03:00
Jenkins 0b8d4c6083 Merge "Remove SCREEN_LOGDIR from devstack" 2017-10-06 07:46:18 +00:00
Vu Cong Tuan 88f094a79e Remove SCREEN_LOGDIR from devstack
SCREEN_LOGDIR has already been deprecated [1]
[1] https://review.openstack.org/#/c/499186

Change-Id: Ia27a87ef5dfc02ff888a17e5078450e7b71905d1
2017-10-06 08:24:35 +07:00
Jenkins 5faef7265b Merge "Fix add_role section in install.sh script" 2017-09-04 13:14:50 +00:00
tikitavi 1c2a14ebcc Fix add_role section in install.sh script
update OpenStackClient user role list command to role assignment list
remove check if ec2api user has any role
add service role
fix keystone_ec2_tokens_url

Change-Id: Id340fadc81102a56c7f943db0dfe47cead341ab8
2017-09-02 21:19:25 +03:00
Jenkins c4f3a1e8ed Merge "Use botocore in API instead of boto" 2017-08-11 11:31:02 +00:00
Andrey Pavlov 7af41603a5 Use botocore in API instead of boto
Change-Id: Ifeda67bf4b165c5aea20a4fe413f6a0a9ca58332
2017-08-10 14:48:49 +03:00
tikitavi 8104481c84 Remove code that used nova-cert
Change-Id: I744ca2901e2a77557ab54c2c9a37196e458a85c9
2017-07-07 11:35:22 +03:00
tikitavi 7939ce17e4 add using cache to metadata
if  configured adds the resulting metadata tree to the cache and
upon next request retrieves the data from the cache
reduces the time of the second and subsequent sequential requests
to the metadata approximately from 2.5 seconds to 0.1

Change-Id: Ia1408f6ef407eb97db1789b5b60d6b36b162ba4d
2017-06-07 15:26:53 +03:00
tikitavi 20f65fac2d fix ec2-api after deprecation of nova-network functions in novaclient
removed NovaEngine in addresses, availability_zones, instances, security_groups
removed unit tests for NovaEngine
disabled some unit tests using NovaEngine for further reworking

Closes-bug: #1691484
Change-Id: I662d5b57b9e46be80c1d2093038ada83897565eb
2017-05-24 20:00:19 +03:00
tikitavi 64187ae8aa fix keystone_ec2_tokens_url
remove path from OS_AUTH_URL to prevent wrong keystone_ec2_tokens_url

Change-Id: I84cbc33625da92ef9e5c943243c25ecda0805392
2017-04-27 12:07:58 +00:00
tikitavi 420d4b6f4c turn on disable_ec2_classic
Change-Id: Ic3a84c1454f1c21830c2d0ac7dcc7f903519278b
2017-02-28 14:37:52 +03:00
Andrey Pavlov d67adb7223 rework creating admin context - use keystoneauth1 lib
rather than own creator of session and auth_plugin from
keystoneclient library.

Change-Id: Id7f71e08de13e77586832f6d12cba1caff3772fe
2016-09-16 17:20:55 +03:00
Andrey Pavlov e25d1908e6 rework accessing keystone resources
do not use keystone_url in keystone_ec2_tokens_url definition.
configure these two urls independently.

Change-Id: I78c54c26820dfd7b52bf7cec81fa4ca0174a9eb6
2016-02-01 20:57:04 +03:00
Andrey Pavlov b6b25c7d8f remove unused variables from install.sh
Change-Id: I4c25d2838e08cef8d6cba9e2ba800ba92a30deaf
2015-10-29 17:08:19 +03:00
hayderimran7 d9d47550c2 Allow setting custom ec2api port to listen to
The README mentions that install.sh allows setting
custom port(other than 8788 default) to start ec2api
on but upon looking, there wasnt any option. This patch
adds the option to allow user to set a different port
prior to installation using install.sh script.
also the options defined in devstack plugin but
it isnt being set in ec2api.conf.

Change-Id: I440b69fafb5555a7a9f4d1e27b1f811d2a3ecc29
2015-10-21 00:08:23 -07:00
Feodor Tersin 7ad4f5796a Turn off debug output in install.sh
It was turned on for debugging and had been forgot to turn off before
commiting.

Change-Id: I5ecc21e6505d2d138dea3d7326efaeb8748f3219
2015-08-25 13:54:19 +03:00
Andrey Pavlov 160638db7d fix install.sh due to recent changes
1. sample.conf has been deleted but install.sh used it.
just create empty file instead copying sample config.

2. neutron client has been changed to openstack client
for detecting external network

3. fix options group for rabbit options

Change-Id: Ia158c03b055e8c6ff208841e58fb5c581631bb06
2015-08-19 12:10:03 +03:00
Feodor Tersin 2d366b168d Use openstack CLI instead of keystone one in install.sh
Since keystone CLI is deprecated, install script should use openstack
CLI to do not scare users by a lot of warnings.

Change-Id: I9220cbd1255e808e46b6f88c96a8016002cbfe27
2015-06-30 12:13:22 +03:00
Feodor Tersin c72d53d7ef Use pip to install the package
The installation by pip do not deeply scan requirements. For example it
allows
SQLAlchemy==1.0.5
sqlalchemy-migrate==0.9.6
for requirements
SQLAlchemy>=0.9.7,<1.1.0
sqlalchemy-migrate>=0.9.6
despite sqlalchemy-migreate v0.9.6 requires SQLAlchemy<=0.9.99.

The installation by direct call of setup.py downgrades installed
packages of DefStack installation, which may lead to problems.

Since DevStack uses pip to install packages, ec2api should install
packages by the same manner.

Change-Id: Ie2c977be69d83595f65ddb9a03fbdb6f8f3c8db8
2015-06-29 16:17:40 +03:00
Andrey Pavlov 0a767a7f72 Add instruction how to run in legacy releases.
Change-Id: I3201403d1b55ed0ea8f1c4b1ef7c561c95b44142
2015-05-28 16:25:51 +03:00
Feodor Tersin dc08136037 Copy S3 server implmenetation from Nova
Copy S3 server implmenetation and unit tests from Nova.
Add fileutils from oslo-incubator and refresh incubation modules.

Upgrade script doesn't copy buckets content because Nova S3 server
is not intended to be permanent full functionality object storage, but
has to be used temporary to CreateImage operation only.

Change-Id: I7d38b0a8e014dfff8238e7134d837d1074e4dd95
2015-04-01 16:37:46 +03:00
Andrey Pavlov 5c340ddd73 set current user as owner for LOGDIR
Change-Id: I301ba533d79c520da98db424ff9697476126a1d9
2015-03-24 11:39:48 +03:00
Feodor Tersin 8282371da4 Get rid of Nova DB access
Important features:
- Nova client with microversion support is required.
- Nova API server may not support microversion 2.3 (not tested).
- Attaching volumes are not displayed in an instance bdm. Because Cinder
volume doesn't yet contain attachment info (which contains a device
name), and Nova instance volumes_attached doesn't contain a device name
(mountpoint). But a bdm must contain it.

Other features:
- v2.3 is requested always
- RunInstance result is formatted w/o extra v2.3 info, so it doesn't
contain rootDeviceName and other such info
- if rootDeviceName property is empty it's omitted instead of
to report fake /dev/sda1 as Nova EC2 does it. This leads to omit
rootDeviceType property in this case as well.
Also the same is done for corresponding image's properties.
- deleteOnTermination volume property is omitted for volume at all, and
for instance bdm if Nova doesn't report it. Previously this volume
property contained 'False' only.
- DescribeVolumes isn't used in DescribeInstances (as opposed to
DescribeNetworkInterfaces), because both methods require actual state
of corresponding OS objects, so we prevent duplication of OS requests.
- Not merged Nova client is used
https://review.openstack.org/#/c/152569/

Also:
- fix multi-run instances for EC2 Classic mode
- safe getting of OS instance security groups
- ec2context module alias is renamed to ec2_context, as it is in other
code
- fakes.CinderVolume is renamed to local standard OSVolume
- fakes.OSInstance it transformed to be initialized from a dictionary,
as it is for other fakes.OSXxx objects
- fix code style

Depends-On: Icf2b9739aaf87b4c9af13ad64a310081a68f776e
Change-Id: Id65ea0f56ffd889286d5ca082e1daf2643205c52
2015-03-20 15:33:05 +03:00
Feodor Tersin 5480e9b850 Add get_os_admin_context function in context module
A preparation step to get rid of Nova DB usage.

Move a function of OS admin context initialization to context module to
use it in all of API.

We're going to use this function to initialize Nova client to get
instance object with an admin account (which is the only option to get
neccessary extended instance attributes).

Change-Id: I195d899ed245ea3489c7e97b56ee6aaff9a08be2
2015-03-10 20:40:05 +03:00
Andrey Pavlov 1cfaea6bed create scripts for devstack
Change-Id: Ie59b29894031ce033d68705f17edbbdb71a7fbba
2015-02-04 23:58:13 +03:00
Feodor Tersin b27f4feab5 EC2 metadata implementation
Change-Id: I7d3ba06c420e4f70cc01fd0ec64398a4c3405244
2015-01-16 01:19:26 +04:00
Feodor Tersin cc05d7afe9 Extract image manipulation methods
Change-Id: Ia261740fa168f157e62ae3b9ff45861b1bd6473c
2014-12-22 14:54:05 +04:00
Feodor Tersin e1f17fc755 Set connection_nova and external_network parameters in install.sh
Change-Id: Ib43a291b3b3061b584adad4accc473a218307b49
2014-10-03 11:50:19 +04:00
Alexandre Levine 66826e9e5b Initial EC2-API service commit.
This code introduces standalone service which proxies its calls to
existing nova EC2-API.
All the code here except for the ec2api/api/proxy.py,
ec2api/api/ec2client.py and some util functions is taken from current
nova and unused functionality is cut of it.
The proxy.py and ec2client.py files implement the new code which
proxies incoming request (on port 8788) to original EC2 API in nova
on port 8773.
The result is transparently translated back to user.

Change-Id: I4cb84f833d7d4f0e379672710ed39562811d43e0
2014-07-18 19:33:55 -07:00