Commit Graph

38 Commits

Author SHA1 Message Date
Andrey Pavlov f9e75281b4 fix UT for cinderclient
- bump version from 2 to 3 for cinderclient
- update aws ec2 interface for create_colume and
  create_network_interface. add cilent_token param
- fix describe network interface - something was
  changed in neutron ports output
- set metadata port for OVN conf file also

Change-Id: Ie3e5a5930d5a8159050ecc0900239935558dddd7
2021-09-28 19:24:15 +00:00
Zuul 1fa62312fe Merge "Revert "temporary disable functional tests"" 2019-10-01 08:37:13 +00:00
Andrey Pavlov 1886d64d3e Revert "temporary disable functional tests"
This reverts commit 3d6106d99c.

Change-Id: I390634d5321d3f4210a5d378178c8d8b1e445e19
2019-10-01 06:06:46 +00:00
caoyuan b1f4ce5593 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I1289490d8adb6910eb03d152fa4c88bd4682e4af
2019-09-13 02:03:40 +00: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
Andrey Pavlov 417b02df65 fix DB migration for MySQL
current version of migration API doesn't allow to
pass several commands to one execute

Depends-On: I9f1f39b30d43dc16a474febcf6549cf1901732ec
Change-Id: I0a74c87c4c782a7a26aa0e67fada994cb3e31434
2018-01-10 05:25:43 +00:00
Andrey Pavlov 7af41603a5 Use botocore in API instead of boto
Change-Id: Ifeda67bf4b165c5aea20a4fe413f6a0a9ca58332
2017-08-10 14:48:49 +03:00
tikitavi 11b76a8812 fix register_image function
replacement of functions performed earlier with nova-cert service
function decrypt_text copied from novaclient to image api
certificates in devstack for uploading image to s3 are created by openssl

Change-Id: Ibf7b90ea29085656005317c4aa0fd96f3313da0c
2017-07-05 15:56:38 +03:00
tikitavi 907de91b55 turn on disable_ec2_classic in devstack installation
fix problem with incorrect creation of default vpc from metadata

Change-Id: If84c4cc1b7ec5664ff194cecb64b8f85ba4ca844
2017-06-15 14:58:52 +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 420d4b6f4c turn on disable_ec2_classic
Change-Id: Ic3a84c1454f1c21830c2d0ac7dcc7f903519278b
2017-02-28 14:37:52 +03:00
Andrey Pavlov 69fcc7dab0 try to fix stages problem of devstack
Change-Id: I43b7cd09a7804d07f5b5ca28e371f1950d5d51c8
2016-12-01 18:47:40 +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 08a9ff7543 update devstack plugin script
remove KEYSTONE_CATALOG_BACKEND because it was removed
from devstack.

Change-Id: Iea4784f95ba2fb3a8f8fc345c429b1639331e4d1
2016-02-11 21:03:15 +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 4289a6f730 Fix 'unstack' script
Change-Id: Ib1c8d355dca2007a546de1b8b7de191a76253399
2015-12-21 18:38:48 +03:00
Andrey Pavlov 5001ee17bc Update run method of devstack services
Change-Id: Ic1d6cf454f2368cfe4fea1d3f0971db39345c427
2015-12-17 17:24:37 +03:00
Andrey Pavlov e22e6a1bc0 fix working with cinder API v2
add cinder_service_type to config
and fix code to be compatible with cinderclient v2

Change-Id: Ia7eec95e19c5472d741fc9759ef4f8929ac516f7
2015-12-15 09:23:54 +03:00
Andrey Pavlov 1bcfbe453c move config creation to devstack plugin script
It will be need for run functional tests as tempest plugin

Change-Id: Ic8a42801ac5bee5639c99b298cd13ac987e7e02f
2015-11-17 22:10:06 +03:00
Andrey Pavlov bd2625eeb9 fix installing ec2api in devstack with USE_SSL=True
Change-Id: Id64c63fdbb20338cf92495fb394c45a989217397
2015-11-09 15:40:57 +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 cb93689b9b Fix devstack plugin script
Specify auth version for delete endpoint and service operations.

Also remove v2.0 from keystone url to allow discovery of auth method in Nova CLI.

Change-Id: Ibfab462b89bc45f9acf9337be54d92d9be48e846
2015-09-05 13:01:39 +00:00
Jenkins 458233d61b Merge "Honour API_WORKERS setting in devstack plugin" 2015-09-04 20:14:06 +00:00
Andrey Pavlov 5f7c25ec6d fix devstack plugin script
plugin used 'openstack' to recreate ec2 endpoint
now devstack uses keystone v3 and 'endpoint list' shows
three lines. but script accepted only one.

Change-Id: I6819069a7bb0559dd34c923824695866a7edf956
2015-09-04 13:30:37 +03:00
Feodor Tersin f7595283c1 Honour API_WORKERS setting in devstack plugin
DevStack has API_WORKERS variable which mean a count of worker threads
for services. This variable allows to be set in local.conf. Otherwise it
is evaluated in stackrc script. DevStack's nova script uses it to set
workers count for ec2 and metadata services. Thus ec2-api have to do the
same.

Change-Id: I67a991be239588beb8086b7c462e559cd08da055
2015-09-03 09:38:41 +03:00
Andrey Pavlov 2f967d5ed4 add code for config generation
Change-Id: Ib86b949bb43ca6b5c386b7032a255f06b0f2eab9
2015-08-28 20:15:50 +03:00
Andrey Pavlov c2a7043a9d remove installation of euca2ools
because tool is installed by devstack

Change-Id: I164ffc4c674469b6f534f5309ced511944be7f6b
2015-08-27 16:34:53 +03:00
Andrey Pavlov b3ff5046dd cleanup configs
Change-Id: I1eebc28d5965a7ce4ad817bdec280ef9f17be1fd
2015-08-10 13:32:58 +03:00
Andrey Pavlov 6a8ee565ce fix EC2_STATE_PATH initialization
Change-Id: Iae936b573fa6b50105054ac67be8038139515292
2015-08-08 09:42:34 +03:00
Jenkins 5cb43aed0d Merge "change s3 endpoint from nova to ec2-api for devstack" 2015-04-08 04:59:40 +00:00
Andrey Pavlov 3ffe7ce736 change s3 endpoint from nova to ec2-api for devstack
fix register_image function -
code can access outer variable but "set operation" will create
a new name in the current scope, which cover the outer one.

Change-Id: Ica2750fbf05e0d3c68ed199996afd8c6e7662229
2015-04-07 22:33:41 +03:00
Andrey Pavlov bc331632ae temporary install euca2ools
Change-Id: Ib4f10281e1c5aea4239fc2926e68627ed79ac902
2015-04-03 09:51:18 +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
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 0964e3dcee Add metadata service to devstack installation script.
Change-Id: Icef63143c9050b7621479055919d2a70c38b84e2
2015-02-12 23:28:49 +03:00
Sean Dague 91fb27b217 convert devstack support to external plugin
This uses the defined external plugin interface for devstack to run
the ec2-api service.

Change-Id: I1d7507c904dc0df452049433ceac34793595176f
2015-02-05 11:40:53 -05:00