3157 Commits

Author SHA1 Message Date
Rodrigo Barbieri
6dad1666de Add share type change to Share Migration
This patch adds a 'new_share_type_id' parameter to Share Migration,
where the destination share can be provisioned under a different
share type of choice.

Host-assisted migration handles it by creating a totally new share,
as before.

Driver-assisted migration handles by creating the destination
instance model with the new share type, the driver is responsible
for making the necessary changes to satisfy the provided model.

In order to accomplish this, a database change was required,
transferring the 'share_type_id' field from the 'shares' table
to the 'share_instances' table.

APIImpact

Partially implements: blueprint newton-migration-improvements
Change-Id: I3200eaaa5b66d9b8ce1cbd16c1658db8516c70fb
2016-08-31 21:07:47 -03:00
Jenkins
8c368781f5 Merge "Change assertTrue(isinstance()) by optimal assert" 2016-08-31 19:56:52 +00:00
Jenkins
98da15991a Merge "Share migration Newton improvements" 2016-08-31 18:05:02 +00:00
Jay Mehta
0bbf54f84f HPE 3PAR driver pool support
3PAR driver so far did not support multiple pools per backend.
This patch aims to allow support for multiple pools per backend.

The configuration now accepts multiple pool entries per backend.
In manila.conf, hpe3par_fpg was used to represent one pool (FPG in
terms of 3PAR) under a backend. Now, hpe3par_fpg can be used multiple
times within a backend, each entry will represent a pool (FPG name).

Sample configuration to supply pools 'testfpg' and 'sharenetfpg':
hpe3par_fpg = sharenetfpg, 10.50.158.8
hpe3par_fpg = testfpg, 10.50.158.7

Note that the configuration now also accepts IP address of share
server. 3PAR supports up to 4 IP addresses per share server. So the
format to supply multiple share server IP addresses per pool:
hpe3par_fpg = fpgname, IPaddress1, IPaddress2, IPaddress3, IPaddress4

If the share server is already setup and configured with IP address,
it need not be passed with hpe3par_fpg.

When DHSS=True, the format remains same as above, except the IP
address of share server is silently ignored if provided.

Obsoletes: hpe3par_share_ip_address from config

Release note added.

Change-Id: Ic08452f3ddf6b7b2f2dc1ba5ee32b4ebe5ae2614
Implements: blueprint hpe3par-pool-support
2016-08-31 10:52:28 -07:00
Rodrigo Barbieri
9639e72692 Share migration Newton improvements
At Austin 2016 summit there were several improvements to
Share migration feature discussed. This patch implements
these changes.

Changes are:
- Added 'Writable' API parameter: user chooses whether share must
remain writable during migration.
- Added 'Preserve Metadata' API parameter: user chooses whether
share must preserve all file metadata on migration.
- Added 'Non-disruptive' API parameter: user chooses whether
migration of share must be performed non-disruptively.
- Removed existing 'Notify', thus removing 1-phase migration
possibility.
- Renamed existing 'Force Host Copy' parameter to 'Force
Host-assisted Migration'.
- Renamed all 'migration_info' and 'migration_get_info' entries to
'connection_info' and 'connection_get_info'.
- Updated driver interfaces with the new API parameters, drivers
must respect them.
- Changed share/api => scheduler RPCAPI back to asynchronous.
- Added optional SHA-256 validation to perform additional check if
bytes were corrupted during copying.
- Added mount options configuration to Data Service so CIFS shares
can be mounted.
- Driver may override _get_access_mapping if supports a different
access_type/protocol combination than what is defined by default.
- Added CIFS share protocol support and 'user' access type
support to Data Service.
- Reset Task State API now allows task_state to be unset using
'None' value.
- Added possibility to change share-network when migrating a share.
- Bumped microversion to 2.22.
- Removed support of all previous versions of Share Migration APIs.

APIImpact
DocImpact

Implements: blueprint newton-migration-improvements
Change-Id: Ief49a46c86ed3c22d3b31021aff86a9ce0ecbe3b
2016-08-31 12:38:14 -03:00
Peter Wang
9edb93df7e Unity: Use job for NFS share creation
This patch consolidates NFS file system creation
and share creation in one rest call.

Change-Id: I513ec9d4bd54e9c741caed4e94e115b0fe44dd0f
Closes-bug: #1618824
2016-08-31 13:46:02 +00:00
gecong1973
f11147078c Correct reraising of exception
When an exception is caught and rethrown,
it should call 'raise' without any arguments
because it shows the place where an exception
occured initially instead of place where
the exception re-raised

Change-Id: I7e11d11ee07fcc6e149d1349e4aba9f86b890c49
Closes-Bug: #1616696
2016-08-31 11:53:04 +00:00
Lucian Petrut
b831976977 Windows SMB: avoid default read share access
By default, when a Windows SMB share is created, 'Everyone' will
have read access.

This is a problem, since we call 'Set-SMBPathAcl', which will apply
the share ACE at the filesystem as well. This means that anyone
that can log in to the share server will have read access to the
share.

We'll avoid this by granting read access to the 'NULL SID' when
creating the share, avoiding the default access to 'Everyone'.

Closes-Bug: #1612746

Change-Id: I913a887f24db7f1354008aacebcd0f477887aeef
2016-08-31 09:06:11 +00:00
gecong1973
f16e389110 Change assertTrue(isinstance()) by optimal assert
Some of tests use different method of assertTrue(isinstance(A, B))
The correct way is to use assertIsInstance(A, B) provided by testtools

Change-Id: Ie21fb409edf558409aa4bf5dfe59893c5b544aa8
2016-08-31 00:26:54 +00:00
Jenkins
68f2e8e286 Merge "Fix Manila HNAS driver managing a share twice" 2016-08-30 15:40:36 +00:00
Rodrigo Barbieri
c7fe51e79b Fix Share Migration improper behavior for drivers
Tempest tests were not appropriate for driver-assisted migration,
so this was fixed.

Also, improved docstrings and fixed workflow for drivers when
implementing 2-phase migration to be accurate with tempest and
handle AZs, which were previously locked to the source share's
AZ.

Driver-assisted migration now creates an additional
share instance to better handle and support driver methods.

Updated allow_access and deny_access APIs to allow users to mount
migrating shares before issuing 'migration-complete'.

APIImpact

Closes-bug: #1594922
Change-Id: If4bfaf7e9d963b83c13a6fea241c2eda14f7f409
2016-08-30 08:30:21 -03:00
Jenkins
0ef0da0137 Merge "Implement replication support in huawei driver" 2016-08-30 04:05:31 +00:00
Alyson Rosa
12f95b1373 Fix Manila HNAS driver managing a share twice
Manila HNAS driver splits the path to manage a share by ':', so when
passing a path with two colons the last part is ignored, it causes the
possibility to manage a share twice. For example:

manila manage --name test1 --share-type hds ubuntu@hnas#Hitachi nfs
172.24.49.26:/shares/f5b21612-9841-42c8-bec4-ca32ba70a9ae

and

manila manage --name test2 --share-type hds ubuntu@hnas#Hitachi nfs
172.24.49.26:/shares/f5b21612-9841-42c8-bec4-ca32ba70a9ae:1

Changing the split to search for ':/shares/' prevents a share to be
managed twice.

Change-Id: Ie97f749d7093db69a757db7c04041f6f649c7ce9
Closes-Bug: #1613683
2016-08-29 14:27:59 -03:00
zengyingzhe
c51e8b6940 Fix test bugs for replication CI
Change-Id: I9e1986a44d915adcece41a3db8fccae8ca8045d9
2016-08-29 11:46:20 +08:00
Jenkins
027207831b Merge "Clean imports in code" 2016-08-28 19:28:01 +00:00
Jenkins
27b9ce2d81 Merge "Clarify grenade failure message" 2016-08-28 19:27:54 +00:00
Jenkins
41dfe154dc Merge "Updated from global requirements" 2016-08-27 19:54:56 +00:00
Jenkins
1b2f186582 Merge "Fix connectivity problem in Scenario job" 2016-08-27 19:54:50 +00:00
zhaohua
88898b553d Implement replication support in huawei driver
Implement the following interfaces:
  - create_replica
  - delete_replica
  - promote_replica
  - update_replica_state

DocImpact

Change-Id: I1c52c9f67daa8440050a03e7e9ead5ca32ded458
Implements: bp huawei-driver-support-replication
2016-08-27 07:47:48 +00:00
Jenkins
ce0774264c Merge "3PAR: Add update_access support" 2016-08-27 04:48:14 +00:00
Rodrigo Barbieri
088747cb77 Fix connectivity problem in Scenario job
In Scenario job, tests consist of VMs mounting shares
provided by share servers.

Admin network is used by share migration tests and is
by default used in other tests as well. Previously it
used the same network address range as tenant networks
(used by VMs) and there was no conflict.

Recently some unknown change broke connectivity between
VMs and share server in scenario job. It seems as there
is now a conflict between those network addresses ranges.
This patch changes the admin network address range,
removing the existing conflict.

Closes-bug: #1616115

Change-Id: I5bdb70cae4eab2930f3f559a621643ad732909bb
2016-08-26 20:43:12 -04:00
OpenStack Proposal Bot
e562d2145e Updated from global requirements
Change-Id: I09c7fca6f9e9e48fa85e161faf7fce2300669438
2016-08-27 00:35:25 +00:00
Jenkins
3b73777227 Merge "Add neutron driver for binding" 2016-08-27 00:07:10 +00:00
Rodrigo Barbieri
317a919fb4 [CI FIX] Fix 'ip route' matching multiple subnets
Existing 'ip route list proto kernel match <subnet>' may match
subnets different than the one specified when specific CI
nodes are selected to run CI job. This patch changes the command
to prevent unrelated subnets from being listed.

Change-Id: Ibb59a8098a1b86429651c25a3b641eda9b44c8fa
Depends-On: I62da6f14eb53c6d3c74442a626b7ea0fd37a7cad
Closes-bug: #1617417
2016-08-26 20:45:38 +00:00
Cao Xuan Hoang
84551bf346 Clean imports in code
This patch set modifies lines which are importing objects
instead of modules. As per openstack import guide lines, user should
import modules in a file not objects.

http://docs.openstack.org/developer/hacking/#imports

Change-Id: I4e5a3a2637594e95b1d9e870752bc6ca690144af
2016-08-26 16:46:07 +07:00
Alexey Ovchinnikov
0ca6707992 Clarify grenade failure message
This patch changes wording in an error message to make it
clearer.

TrivialFix

Change-Id: I15fe8f8c1c4273665ea59f93a007c5680b652458
2016-08-26 10:32:52 +03:00
Jenkins
06eabef61d Merge "Rename and move HNAS driver" 2016-08-24 20:07:47 +00:00
Jenkins
5a962af092 Merge "Updated from global requirements" 2016-08-24 18:01:23 +00:00
Jenkins
addb65225d Merge "add access_key to share_access_map" 2016-08-24 17:32:36 +00:00
OpenStack Proposal Bot
c567647a39 Updated from global requirements
Change-Id: I8a06dfe228977b0b70957e4410b8e5574b83a508
2016-08-24 01:33:05 +00:00
Cedric Zhuang
5e852325a7 Add documentation for EMC Unity Driver for Manila
Enhance the development document for EMC Unity Driver for Manila.
Details including:

* Add configuration description section to list all configuration
  options.
* Add restrictions for NFS and CIFS access control.
* Add Unity pre-configurations section.
* Add module section.

Change-Id: Ib617dfd07b8d98269677e3dca907162187cdf15d
Closes-Bug: #1608002
2016-08-23 18:19:21 -07:00
Jenkins
5a62e65c2d Merge "Get ready for os-api-ref sphinx theme change" 2016-08-23 19:33:57 +00:00
Thomas Bechtold
7578ad2df2 Remove enable_v1_api and enable_v2_api config opts
Both options are not used in the code and the help text already
mentioned that the variables will be removed.

Change-Id: I4b90080dde789b772323e1d93d5a08c4d9f342f5
2016-08-23 08:27:22 +02:00
Alex O'Rourke
5e0c233cac 3PAR: Add update_access support
This patch adds support for update_access, a required feature for
the Newton release. allow_access and deny_acess are removed as well.

Implements: blueprint hpe3par-update-access
Change-Id: Ibe908dca68e65e2bad86afe60c73b470e9ff4e44
2016-08-22 08:54:01 -07:00
Ramana Raja
0d4f2ee4e0 add access_key to share_access_map
For backends with internal authentication system,
e.g. Ceph, that return ``access_key`` (credential) for
client identities that are granted share access:

* Retrieve ``access_key`` as return value of driver's
  update_access()

* Store ``access_key`` in ShareAccessMapping model

* Expose it in access_list API

APIImpact

DocImpact

Partially implements bp auth-access-keys

Co-Authored-By: John Spray <jspray@redhat.com>

Change-Id: I486064f117cf3001dba7735ca92a7d89aee3ce5b
2016-08-22 20:41:19 +05:30
tpsilva
9814b50bad Add missing filter function in HSP driver
HSP driver merged without a filter function. Since the backend
does not support shares smaller than 128GB, this filter function
is needed so the scheduler does not choose its hosts for shares
of these sizes. This patch adds the default filter function to
the driver.

Change-Id: Ia00fb9540ac45992326e1d07c41a83a1d8a22a1e
Closes-bug: #1615616
2016-08-22 10:18:38 -03:00
Jenkins
ef9e231b19 Merge "Fix fallback share migration with empty files" 2016-08-19 22:14:55 +00:00
Graham Hayes
8210bf5310 Get ready for os-api-ref sphinx theme change
Change-Id: I1c13e4d92d0629361affb5dcd8ae793b33b33c9b
2016-08-19 16:44:03 +01:00
Rodrigo Barbieri
e4ddb090ae Fix fallback share migration with empty files
Fallback share migration fails with empty files. This patch fixes it
by performing additional checks to address this specific scenario.

Change-Id: I36d59740b4e52005e6025e5df5989bf55d6bade4
Closes-bug: #1613713
2016-08-19 12:11:20 -03:00
tpsilva
c314c3f400 Rename and move HNAS driver
Renamed HDS mentions on HNAS driver to Hitachi and moved the driver to
its own folder.

DocImpact
Change-Id: I03318a6e143e40b6f9186b58d47ef0618a6d152d
Implements: blueprint hnas-rename
2016-08-19 09:15:09 -03:00
OpenStack Proposal Bot
80330521de Updated from global requirements
Change-Id: I46dab2a829d2493f6887f1d6db55006770c1bb32
2016-08-19 09:05:01 +00:00
Jenkins
04d8ed79a1 Merge "Add dedupe report in HNAS driver" 2016-08-19 05:43:52 +00:00
Marc Koderer
78e10bc060 Add neutron driver for binding
Add new neutron plugin which enables port bind actions for network
fabrics. This driver waits until all ports are in state "active"
and sets the binding host flag. Default vNIC type is set to
"baremetal" in order to benefit from the code already in place for
Ironic. It's also possible to switch to 'normal' which assumes an
neutron agent in place.

The feature can be tested using the docker driver.

DocImpact

Co-Authored-By: Daniel Gonzalez <daniel@gonzalez-nothnagel.de>
Partially-Implements: bp manila-hpb-support

Change-Id: I3156d7468d48f84f1b46885780a2426f9b99a387
2016-08-17 15:20:11 +02:00
Jenkins
bb767e8ece Merge "Fix sample config generation for cinder, nova and neutron opts" 2016-08-17 00:04:48 +00:00
Jenkins
ee856954ed Merge "manila_tempest_tests: fix exception messages" 2016-08-16 19:50:39 +00:00
Jenkins
0a87493573 Merge "Add Hitachi HSP driver" 2016-08-16 17:15:28 +00:00
Thomas Bechtold
5c95e5cc10 Fix sample config generation for cinder, nova and neutron opts
While generating a sample config with "tox -egenconfig", some options
for the Nova, Cinder and Neutron client are not added to the [nova],
[cinder] and [neutron] section. I.e. "api_insecure" is not available for
all sections. Register the config options under the correct group while
generating the sample config.

Closes-Bug: #1613303
Change-Id: If54fd42f7a06c159bcb6df5f684dc1211a9b91e9
2016-08-16 08:45:16 -04:00
tpsilva
2a7d480d01 Add Hitachi HSP driver
This patch adds the Hitachi HSP driver.

Co-Authored-By: Marcus V R Nascimento <marcusvrn@gmail.com>

DocImpact
Implements: blueprint hsp-driver
Change-Id: Ie3028cbff56873721dc51ff4d7fccf7fb7e99611
2016-08-16 08:44:27 -03:00
Ramana Raja
641c74cf4e manila_tempest_tests: fix exception messages
TrivialFix

Change-Id: I6113e1663027535c3fe5b3b129bf270cebbad490
2016-08-16 17:09:29 +05:30
Jenkins
ea9748fa4b Merge "In-tree Install Guide" 2016-08-16 08:32:34 +00:00