26 Commits

Author SHA1 Message Date
Rodrigo Barbieri
72241d1036 Fix Share Migration tempest tests
This patch addresses issues commented on
change I64b0a3ee77b27278cc294f72702408a27888e0e9
after it was merged, according to bug below.

Closes-bug: #1494000
Change-Id: I9079ea16e0edc359b380705bebba2a7e98446d5c
2015-09-11 18:15:56 -03:00
Clinton Knight
dddc068879 Add v2 Manila API path as base for microversions
To prevent a microversioned client from managing a non-microversioned
Manila server, Manila must update its REST endpoints by adding /v2 for
all microversioned APIs.

This commit does the following:

* Add /v2 to the URL map, connected to all the same /v1 API methods
* Renumber the microversion sequence starting from 2.0
* Update the versions API to reflect v2
* Publish the new endpoint to Keystone in the DevStack plug-in
* Update relevant documentation
* Update Tempest tests for microversions
APIImpact
Co-Authored-By: Andrew Kerr <andrew.kerr@netapp.com>
Closes-Bug: 1488624
Change-Id: I56a516b5f81914557dd2465746629431cfd6deac
2015-09-10 13:58:26 +00:00
Ramy Asselin
08598b0dd4 Allow service image download to be skipped
3rd party CI tests do not use the service image, and
its download can be slow and fail resulting in an
unneceassirly slow or false-fail CI job.

Add an option to skip it.

Closes-Bug: #1477772
Change-Id: Ifc6d0287c40e14265c4866a0558bc84807bad2ec
2015-09-09 13:02:30 -04:00
Valeriy Ponomaryov
f88c2aaeea Fix keypair creation
Use novaclient for creation of keypair instead of openstack client in
devstack plugin, because the latter is not compatible with
nova microversion 2.1

Also, specify explicitly Nova API version in manila wrapper over
novaclient that is used by Generic and Windows drivers.

Also, revert back amount of tempest threads for Ci jobs to avoid job
timeout failures.

Also, fix raise of SnapshotBuildErrorException in Tempest plugin.
Tempest tries to raise exception SnapshotBuildErrorException from wrong
place. It should use "share_exceptions" instead of "exceptions".

Change-Id: Ie9ea9f6d25a13f8cd8f0ccbc73f6fa75cca35e0b
Closes-Bug: #1493008
Closes-Bug: #1493072
2015-09-07 14:52:11 -04:00
Rodrigo Barbieri
740fc64940 Add Share Migration tempest functional tests
This patch adds functional tests for Share Migration,
running on generic driver DHSS = true mode.

Implements: blueprint share-migration
Change-Id: I64b0a3ee77b27278cc294f72702408a27888e0e9
2015-09-07 00:06:23 -03:00
Jenkins
d5ffe4648e Merge "Make devstack plugin independent from default Identity API version" 2015-09-04 19:40:55 +00:00
Jenkins
a77d15222c Merge "Add possibility to setup password for generic driver" 2015-09-04 18:52:08 +00:00
Jenkins
8b935070f7 Merge "devstack plug-in to reflect new manila-ui plug-in" 2015-09-04 18:15:38 +00:00
Valeriy Ponomaryov
a56d7106f0 Make devstack plugin independent from default Identity API version
Recent update of devstack to use v3 APi of Keystone broke several
projects including Manila. It was fixed, but we should make our code
independent from default value of Identity service in Devstack.

Change-Id: I783772c2a5b6227364921a33b92e21d76a576e8b
2015-09-04 20:44:45 +03:00
Valeriy Ponomaryov
6c44bff516 Add possibility to setup password for generic driver
Make it possible to setup password for generic driver service image and
scenario tests. Also allow to just disable its usage not unsetting the password

It is useful for testing purpose when we have some problems with SSH keys
injection to Nova VMs.

Change-Id: I26dd32b1de8cceeaa6dc674092efec683df71889
Related-Bug: #1480870
2015-09-04 18:56:57 +03:00
Valeriy Ponomaryov
becb2dd9d0 Use devstack functions for registering Manila
Use devstack functions for registration of Manila to avoid
incompatibilities in service registering approach. Also, we should
reuse already defined functions that minimizes our code removing
duplication.

Change-Id: Id6e56426b212435366a36122dbeddc52910d9828
Closes-Bug: #1492133
2015-09-04 16:14:21 +03:00
Rich Hagarty
819ad9ab4e devstack plug-in to reflect new manila-ui plug-in
Change was made to manila-ui plug-in to not use "overrides.py"
file. This patch removes any references to this file from
within the manila devstack plug-in.

Change-Id: I01b435dd29d40d2d4adb70cfb448c5039fb8382f
Closes-Bug: #1491589
2015-09-02 16:16:56 -07:00
Valeriy Ponomaryov
ab05b5c465 Add retries for deadlock-vulnerable DB methods
It is very likely to get 'deadlock' updating common records such as
quotas, usages, reservations and metadata. All of these things are
API-dependent. So, add wrappers, that retries request on 'deadlock'
exceptions.
Also, set database config opt "max_pool_size" to '40' instead of having
default value - '5'. It allows to keep upto 40 SQL connection alive at
once.

Change-Id: Ia6ec09d4617191c51ad95dd6d9f053141ec1c4c4
Closes-Bug: #1483604
2015-08-12 08:48:36 +00:00
Valeriy Ponomaryov
accb273c7a Eventlet green threads not released back to pool
Presently, the wsgi server allows persist connections hence even after the
response is sent to the client, it doesn't close the client socket connection.
Because of this problem, the green thread is not released back to the pool.

In order to close the client socket connection explicitly after the
response is sent and read successfully by the client, you simply have to
set keepalive to False when you create a wsgi server.

DocImpact:
Added wsgi_keep_alive option (default=True).
In order to maintain the backward compatibility, setting wsgi_keep_alive
as True by default. Recommended is set it to False.

This is port of Cinder change - [1]

[1] Ic57b2aceb136e8626388cfe4df72b2f47cb0661c

SecurityImpact
Closes-Bug: #1361360

Change-Id: If9241e6f6ba10592a64ca312cb479e8cea929913
2015-07-28 09:31:13 +00:00
Valeriy Ponomaryov
35300fc4e6 Use all types of migrations in devstack installation
For the moment we install Manila database using only 'upgrade' migrations.
In that case we do not test Manila after using 'downgrade' migrations.
So, allow enabling of both types of migrations to verify that our downgrade
migrations do not break the world of data having functional tests running
after it.

Change-Id: If55a38692abca5e008095eb99b55adb465cad2b6
2015-07-14 09:46:46 +00:00
Valeriy Ponomaryov
503203e243 Close DB migration sessions explicitly for compatibility with PyMySQL
oslo.db lib starting with version 1.12.0 uses PyMySQL as mysql client.
We get problem with it as it does not close opened sessions by default.
And if we do some actions with migration sessions and do not close sessions,
then alembic, as db migration tool does not write to DB updated migration
version, that is final step of each migration.
It breaks further attempts to perform some migration actions in case some
migration can not be applied twice. Because of improper versions in DB,
alembic tries to execute same migrations again and again.

So, close migration sessions explicitly since PyMySQL does not do it itself.
Also, print version in devstack for getting more details in future debug of
devstack installation output.

Change-Id: I5c729f10bac23b1853e18127b50b1d9f053ab629
Closes-Bug: #1473400
2015-07-14 12:39:00 +03:00
Valeriy Ponomaryov
dbf00f2e32 Print devstack command traces before executing command
Enable printing of command traces running manila devstack plugin.
It can be useful debugging CI output with errors.

Change-Id: I65321510b175f20689cc1afbeaad482017687a4d
2015-07-10 18:25:24 +03:00
Igor Malinovskiy
d3d5d77ab6 Use new manila-service-image with public-key auth
- Update devstack plugin
- Update tempest scenario tests

Implements bp reproducible-server-image

Change-Id: I7c71ee2f20074e04021b5c95d8c18096d21b0404
Closes-Bug: #1421104
2015-06-22 16:03:13 +03:00
Igor Malinovskiy
770c272b67 Make devstack install manila-ui if horizon is enabled
For the moment, our devstack plugin can not install manila-ui plugin
to horizon. But it would be really useful thing to do.
Installing devstack with enabled manila we will have manila-ui plugin
installed into horizon by default.

Use env var "MANILA_UI_ENABLED" (default=True) to enable/disable its
installation.

Depends-On: Iaa46955d3e3cc3f96ee21fcabe2c47fd6ab22354

Change-Id: Ia64ab7b88c2c1df4d3bf4771c4ea4a9353ed8c97
2015-05-27 12:58:52 +03:00
Jenkins
98a16689c6 Merge "Use openstackclient in devstack plugin" 2015-04-21 16:35:41 +00:00
Thomas Bechtold
7fd873cd94 Use identity_uri for keystone_authtoken in devstack
auth_host, auth_port and auth_protocol are deprecated and identity_uri
should be used instead.

See
https://github.com/openstack/python-keystoneclient/commit/708886b2c6 .

Change-Id: Ib8372c12a0d11a164499b3d73eb61420306f597f
2015-04-18 08:37:26 +02:00
Thomas Bechtold
a58b22b3ed Use openstackclient in devstack plugin
keystoneclient CLI is deprecated so use openstackclient for
setting up Manila user, role, service and endpoint.

See python-keystoneclient/commit/?id=29c84cdf8b1f5982bdb at
git.openstack.org

Change-Id: I53cc2617f21cb0d927b0af4030b6ee5a0e3dc0c3
2015-04-16 12:54:59 +02:00
Thomas Bechtold
6785cad994 Enable bashate during pep8 run
bashate checks shell script syntax (similar to pep8 for python). Fix
currently available scripts and enable the check for the scripts.

Change-Id: I33dc8c44a58f40e8bca9e29cd717caf46e5cd586
2015-03-18 13:40:03 +01:00
Igor Malinovskiy
31a1be5c2a Make extra spec driver_handles_share_servers required
Currently the driver_handles_share_servers is an optional extra_spec
on each share_type that allows the scheduler to filter. We want to
make this a required extra spec, so that every share type has this
value set to true or false. It's not be possible to remove that extra
spec. Modifying the extra spec is allowed as long as the value
remains either true or false.

- Add validation checks to types_manage and types_extra_specs API
controllers
- Add required_extra_specs to data returned by API methods
types_show() and types_index()
- Add db migration, which adds required extra_spec to all existing
 share_types
- Add get_required_extra_specs(), validate_required_extra_spec(),
 get_valid_required_extra_specs()
methods to share_types module
- Add appropriate unit tests

Partially implements bp share-type-require-driver-mode

Change-Id: I60a877b05a642ea2945b15248e885cf6f7f89aa0
2015-03-06 13:19:14 +02:00
Valeriy Ponomaryov
98a6c6621b Use devstack plugin in CI hooks
We have devstack plugin stored in dir 'devstack' and now we do not need
extras.d hooks anymore, stored in dir 'contrib/devstack'.

Switch CI scripts for usage of devstack plugin and remove extras.d hooks.

Change-Id: I49008d169758710df81bf8bbc6ec9d455f162ba1
2015-02-25 23:45:52 +02:00
Valeriy Ponomaryov
b5f0ccabfa Add devstack plugin
Start using devstack's feature 'Externally Hosted Plugins' [1], that allows
to install Manila using upstream Devstack without need to put some additional
files manually.

To enable Manila with Devstack just put following in local[rc] file:
enable_plugin manila https://github.com/openstack/manila

Above satisfies following template:
enable_plugin <NAME> <GITURL> [GITREF]
where
<NAME> is an arbitrary name. (ex: manila)
<GITURL> is a valid git url that can be cloned.
[GITREF] is an optional git ref (branch / ref / tag) that will be cloned. Defaults to master.

Plugin enables all Manila services by itself, no need to enable it manually anymore.

Implements BP add-devstack-plugin
[1] http://docs.openstack.org/developer/devstack/plugins.html#externally-hosted-plugins

Change-Id: I28eff33fc65aa741d9270d8bcb263a7fccd9baa4
2015-02-20 19:57:21 +02:00