242 Commits

Author SHA1 Message Date
69c317138b Update reno for stable/ocata
Change-Id: I4fdd651bec8da790b2d6e40e4c98ab08097e836c
2017-02-07 19:56:51 +00:00
Jenkins
7579549c31 Merge "Add 'consistent_snapshot_support' attr to 'share_groups' DB model" 2017-02-07 19:28:11 +00:00
Jenkins
3726c89f20 Merge "Pass access rules to driver on snapshot revert" 2017-02-07 18:31:42 +00:00
Valeriy Ponomaryov
1684b59eed Add 'consistent_snapshot_support' attr to 'share_groups' DB model
It will be required for support of 'consistent share group snapshots'
feature. It is added in Ocata to ease future possible backports.
Make it be 'Enum' with possible values 'pool', 'host' allowing to be
nullable.

Change-Id: I2e5984bc2fc4a487793ad8254c5dbfb0d6e33f26
Partial-Bug: #1661266
Partial-Bug: #1661268
2017-02-07 17:14:42 +00:00
Ben Swartzlander
a7d8363d32 Pass access rules to driver on snapshot revert
In order to revert to a snapshot in the LVM driver (and
very likely other drivers) the list of access rules is
needed, so this change modifies the driver interface to
provide this extra information.

This change requires preventing a revert to snapshot
operation while access rules on the affected share are
out of sync.

Closes bug: 1658133

Change-Id: Ia6678bb0e484f9c8f8b05d90e514801ae9baa94b
2017-02-07 11:15:27 -05:00
Valeriy Ponomaryov
64649b97e7 Fix default approach for share group snapshot creation
Default approach uses common driver interface of single snapshot
creation. So, emulate it correctly providing all required keys.
Also add 'provider_location' attribute to share group snapshot
members DB model, because it is required for some drivers and
was absent.

Change-Id: If120d85ef3dd3ba90e2dc12a5b81b69feecb31ea
Closes-Bug: #1660321
2017-02-07 15:04:36 +00:00
Valeriy Ponomaryov
8ac4f0a913 Disable share groups APIs by default
as of Ocata because feature has not been completed.
Revert this change back in Pike.

Change-Id: Ibe2f7fba436e298b720a492594579d64b2e81a47
Closes-Bug: #1661639
2017-02-06 14:11:27 +02:00
Jenkins
c54367035d Merge "Fix migration of mountable snapshots" 2017-02-03 22:56:50 +00:00
Rodrigo Barbieri
6197a9108e Fix migration of mountable snapshots
Fixed snapshot export locations present in model
updates returned by driver during driver-assisted
migration_complete being passed to the DB without
any handling.

This patch checks if mount_snapshot_support is
present in destination share instance share type
and handle it accordingly.

Change-Id: I3b6635a3abc0751b30bd069426726243b6f49ef8
Closes-bug: #1661381
2017-02-03 14:38:13 -02:00
Alyson Rosa
e824e8ba8d HNAS: Fix syntax to make shares read-only in snapshot create
Fixing driver syntax to make NFS shares read-only while snapshots
are being taken. Read/Write permission in HNAS can be added in 3
ways: rw, readwrite and read_write, all of them should be handled
by the driver.

Change-Id: Ib9ba3c1717c8000a5393ea7b8d731d66f7237b2e
Closes-Bug: #1661271
2017-02-02 17:24:08 -02:00
Jenkins
6b4171bff2 Merge "HNAS: Fix managed snapshots not being mounted" 2017-02-02 19:14:29 +00:00
Jenkins
668b14f73c Merge "Blocked migration of shares within share groups" 2017-02-02 18:46:42 +00:00
Jenkins
88c4b96aaf Merge "Fix snapshot export locations incorrectly handled" 2017-02-02 17:17:45 +00:00
Jenkins
16e2debf69 Merge "HNAS: avoid mismatch access level for managed shares" 2017-02-02 17:17:38 +00:00
Jenkins
d32cb3eb50 Merge "HNAS: Fix concurrency error when managing snapshots" 2017-02-02 17:17:31 +00:00
Rodrigo Barbieri
26c803ea95 Blocked migration of shares within share groups
In Ocata, coordination between share migration and share groups
features was not implemented. So, restrict its usage for now.

APIImpact

Change-Id: Id15453590685aa9c7788e79a33ca98b4dcc8a3ea
Closes-bug: #1660336
Closes-bug: #1660319
2017-02-02 13:38:36 -02:00
Miriam Yumi
4cb13a0066 HNAS: Fix managed snapshots not being mounted
When managing snapshots, the driver is not checking if the export
exists on backend.

This patch fixes this issue by checking the export on backend. A new
export is created if required.

Change-Id: I2da32016ef99bb307a9e075de0472d56a4817e3c
Depends-On: Ie0ce3c4f2e7e29bf82f5c09a80a3fb132b0481a8
Closes-bug: #1660415
2017-02-02 10:29:10 -02:00
Jenkins
a4659dd3bd Merge "Fix multiple export locations during migration" 2017-02-01 21:59:51 +00:00
Rodrigo Barbieri
53b91e513e Fix multiple export locations during migration
During a migration, the destination share instance export location
was being shown, thus the user could get confused as to which
export location to choose when mounting his share, since only
the source could be mounted.

This patch addresses this by filtering the destination
export location out.

APIImpact

Change-Id: I20cf1a76399693d751fa87fc4df375162e7c5f1d
Closes-bug: #1660726
2017-02-01 16:59:54 -02:00
Rodrigo Barbieri
4b6f1bf449 Fix snapshot export locations incorrectly handled
Snapshot export locations should only be created for shares
with property mount_snapshot_support=True. Otherwise, they
should not be created, even if returned by drivers.

Change-Id: Ie0ce3c4f2e7e29bf82f5c09a80a3fb132b0481a8
Closes-bug: #1660686
2017-02-01 10:57:37 -02:00
Alyson Rosa
f1a6b1ca7a HNAS: avoid mismatch access level for managed shares
A CIFS managed share can contain some rules added in backend, and when
we try to add an already existent rule through manila, but with
different access level, the driver will return success with message
"user already allowed". So, manila will show an access level for this
rule that is different from the one in backend. This behaviour does
not apply to NFS shares.

In this case, it will call an update access rule for CIFS shares to
assure that rules in backend and in manila are always with same access
level.

Change-Id: I3c97ff7a5fee241685d54ac4cf7269ed55f1f602
Closes-bug: #1660401
2017-02-01 09:32:48 -02:00
Rodrigo Barbieri
4f330330d5 Fix error'ed access rules being sent to driver
Error'ed snapshot access rules should not be sent down to drivers,
as drivers that only look at 'access_rules' parameter will always
try to apply them, causing every subsequent call to result in
error. They should only be sent to drivers when being removed.

Change-Id: Icf7e87d82eb0d51d441cd813da146cc0965fa334
Closes-bug: #1660425
2017-01-31 19:17:05 +00:00
Alyson Rosa
2295151784 HNAS: Fix concurrency error when managing snapshots
During manage snapshot operation, if HNAS is already running a command
'path-to-object-number' it may cause concurrency issues, since HNAS
can run only one 'path-to-object-number' command at a time.

Fixing it by adding a retry when this message is returned.

Change-Id: If0f0b2d6f7e4ba3203d10c549181a3d31113624e
Closes-bug: #1660288
2017-01-31 09:45:09 -02:00
Goutham Pacha Ravi
6ba74918d5 Mark 'v1' API deprecated in the versions response
We announced the deprecation of the v1 API on
the mailing list during the mitaka release. While we
continue to support it in code and run CI tests on it,
we should allow the consumers of the versions API to
acknowledge this change.

This patch does not remove the API. It only marks the
version as "DEPRECATED".

[1] http://lists.openstack.org/pipermail/openstack-dev/2016-June/096517.html

Change-Id: If80bddb68a5b92b604ef582fe07eef72c47d6f2f
2017-01-27 14:12:39 +00:00
tpsilva
1f1932eb92 Add mountable snapshots support to HNAS driver
This patch adds Mountable Snapshots support in HNAS driver. Also,
updates feature table in share_back_ends_feature_support_mapping.rst
adding mountable snapshot column.

Implements: bp hnas-mountable-snapshots
Change-Id: I5e2294d218595a7ef28261333ab34d8bcde94ff1
2017-01-25 15:19:34 -02:00
Jenkins
eeeb648cc3 Merge "Add mountable snapshots support" 2017-01-25 00:07:49 +00:00
Jenkins
5ee192df6d Merge "NetApp: Support share revert to snapshot" 2017-01-24 20:43:27 +00:00
tpsilva
8d71932c69 Add mountable snapshots support
This new feature gives the user the ability to allow and
deny access to the snapshots, so that they could be mounted in
read-only mode to retrieve files.

APIImpact
DocImpact

Co-Authored-By: Rodrigo Barbieri <rodrigo.barbieri@fit-tecnologia.org.br>
Co-Authored-By: Alyson Rosa <alyson.rosa@fit-tecnologia.org.br>
Co-Authored-By: Miriam Yumi <miriam.peixoto@fit-tecnologia.org.br>

Partially-implements: blueprint manila-mountable-snapshots
Change-Id: I65f398a05f82eef31ec317d70dfa101483b44b30
2017-01-24 17:26:45 -02:00
Jenkins
83b8f19851 Merge "VMAX manila plugin - Support for VMAX in Manila" 2017-01-24 18:08:38 +00:00
xing-yang
1b0042f052 VMAX manila plugin - Support for VMAX in Manila
VMAX plugin is the plugin which manages the VMAX to
provide shared filesystems using the Dell EMC manila
driver framework.

DocImpact
Change-Id: I0b69f013443217f2053bbbfdec36dff226664b34
Implements: blueprint vmax-manila-support
2017-01-24 13:34:00 +00:00
Clinton Knight
794e9a74fc NetApp: Support share revert to snapshot
This commit adds support for the revert-to-snapshot feature to
the NetApp cDOT drivers for both normal and replicated shares.

Implements: blueprint netapp-cdot-share-revert-to-snapshot
Change-Id: Ia939eba03b3db9cbba0cc6c16184578e8c8893d1
2017-01-23 21:49:23 +00:00
Jenkins
c1fc70b85c Merge "Removes unnecessary utf-8 coding" 2017-01-23 17:53:47 +00:00
Jenkins
f4aed13f86 Merge "Implement Revert-to-snapshot in HNAS Driver" 2017-01-23 12:04:24 +00:00
Jenkins
2fe4fd35ca Merge "NetApp cDOT: Add Intra-Vserver migration support" 2017-01-22 17:11:18 +00:00
ji-xuepeng
2eefafe5b4 Removes unnecessary utf-8 coding
TrivialFix

Change-Id: I672c1bae22dd066c80c6ef449e31cde664d0be1a
2017-01-22 21:20:55 +08:00
Jenkins
cc63568e76 Merge "Add QNAP Manila Driver" 2017-01-21 20:07:04 +00:00
Goutham Pacha Ravi
20e89b9691 NetApp cDOT: Add Intra-Vserver migration support
Add migration support in the cDOT driver.

Change-Id: I72e045b1c978b752f38cc3018cb2a7084e3f3e36
Implements: blueprint netapp-cdot-driver-optimized-migration
2017-01-21 13:06:30 -05:00
Pony Chou
cf182947b7 Add QNAP Manila Driver
This driver supports below features:
 - Create NFS Share
 - Delete NFS Share
 - Allow NFS Share access (IP access type)
 - Deny NFS Share access
 - Create snapshot
 - Delete snapshot
 - Create share from snapshot
 - Extend share
 - Manage share
 - Unmanage share
 - Manage snapshot
 - Unmanage snapshot

DocImpact
Implements: blueprint qnap-manila-driver

Change-Id: I4e4278a870af7be1c026385b85ea309b2d1773a9
2017-01-21 21:46:15 +08:00
Goutham Pacha Ravi
0970eb6e3a Add cast_rules_to_readonly to share instances
- Add Database migration to introduce the column on the
  share instances model.
- Set the field to True if creating read-only secondary
  replicas, unset while promoting them.
- Set the field to True if drivers don't support writable access
  to migrating shares, or if using host assisted migration.
  Unset if migration fails, or is canceled.
- Expose the field via share-instances and share-replicas
  APIs to administrators.

Supporting read only-access rules is part of the minimum
driver requirements in manila.

APIImpact
DocImpact

Implements: bp fix-and-improve-access-rules

Co-Authored-By: Rodrigo Barbieri <rodrigo.barbieri@fit-tecnologia.org.br>

Change-Id: Ie8425f36f02cbcede0aaa9f3fe1f5f3cf23df8b8
2017-01-20 22:49:56 +00:00
Rodrigo Barbieri
cf9a5efbef Implement Revert-to-snapshot in HNAS Driver
This change adds revert-to-snapshot functionality to the
HNAS driver.

Implements: blueprint hnas-revert-to-snapshot
Change-Id: I3f54edfbd272333b70a27becf469cd09f36e8371
2017-01-20 16:30:26 -02:00
Rodrigo Barbieri
53539c0e1d Share Migration Ocata Improvements
Implemented several improvements to share migration
according to spec [1].

Summary of changes:
- Snapshot restriction in API has been changed to return error only
when parameter force-host-assisted-migration is True
- Added preserve_snapshot to API and migration_check_compatibility
driver interface
- Changed all driver-assisted API parameters to be mandatory
- Added validation to prevent 'force_host_assisted_migration' to be
used alongside driver-assisted parameters
- Changed "same host" validation to reject only if the combination
of "host", "new_share_network" and "new_share_type" is the same as
the source
- Updated migration driver interfaces to support snapshots
- Updated zfsonlinux driver, defaulting preserve_snapshots to False
- Updated dummy driver to support preserve_snapshots

Spec update with latest changes since [1] merged
can be found in [2].

APIImpact
DocImpact

[1] I5717e902373d79ed0d55372afdedfaa98134c24e
[2] If02180ec3b5ae05c9ff18c9f5a054c33f13edcdf

Change-Id: I764b389816319ed0ac5178cadbf809cb632035b4
Partially-implements: blueprint ocata-migration-improvements
2017-01-20 09:45:14 -02:00
Jenkins
7a340efc69 Merge "Refactor Access Rules APIs" 2017-01-20 11:11:28 +00:00
Jenkins
c8ee9fba72 Merge "Tooz integration" 2017-01-20 00:04:56 +00:00
Goutham Pacha Ravi
64a73b1419 Refactor Access Rules APIs
- Pull up policy check to beginning of the APIs.
- Avoid making access rules changes when one or
  more instances of the share are in an invalid state.
- Add back the per rule share instance access status.
  This restoration provides better visibility for which
  rules were applied successfully.
- Remove 'updating' and 'updating_multiple' as valid
  states for the share instance access rules status.
- Deprecate the access rule state 'new' in favor of
  'queued_to_apply' and the share instance access rules
  status 'out_of_sync' in favor of 'syncing'.

In a new API micro-version:
- Allow access rule changes irrespective of the share's
   access_rules_status.
- Expose new access rule states and share's
  access_rules_status values.

Access rules for each share instance now transition
from 'queued_to_apply' to 'applying' to 'active' or 'error';
and from 'active', 'queued_to_apply', 'applying' or 'error'
to 'queued_to_deny' to 'denying' to 'deleted'.

APIImpact
DocImpact

Partially-implements: bp fix-and-improve-access-rules
Co-Authored-By: Mike Rooney <rooneym@netapp.com>
Change-Id: Ic25e63215b5ba723cbc8cab7c51789c698e76f28
2017-01-19 15:02:58 -05:00
Goutham Pacha Ravi
02ab18c5df Tooz integration
Manila currently uses file locks from oslo_concurrency to
coordinate operations racing with each other to perform a
particular action. In many situations, deployers may need a
distributed lock to a local file lock (or even a file lock living on
a shared file system). This need is accentuated if they were running
Manila services in HA or if they were using Share Replication across
AZs where manila-share services were running off different controllers
that would not be able to share a common oslo_concurrency
file lock or be protected against service/lock management failures.

Integrate Tooz library with helper methods to create a locking
coordinator and allow deployers to make the choice between file
and distributed locks.

Start the manila share service with Tooz backed coordination.

Replace the locks used for Share Replication work-flows in the
share manager to use Tooz based locks.

Co-Authored-By: Goutham Pacha Ravi <gouthampravi@gmail.com>
Co-Authored-By: Szymon Wroblewski <szymon.wroblewski@intel.com>
Co-Authored-By: Tom Barron <tpb@dyncloud.net>

Related-Bug: #1585241
Partially-implements: bp distributed-locking-with-tooz
Change-Id: I710e86bd42034fa3b93b87ff77fa48ada8661168
2017-01-19 14:29:31 -05:00
Jenkins
ff6a54f157 Merge "[Unity driver] VLAN enhancement" 2017-01-19 00:07:45 +00:00
Jenkins
1a931b46af Merge "Fix `exportfs -u` usage in generic driver." 2017-01-18 15:12:11 +00:00
wlhc
7a7c182e35 Fix `exportfs -u` usage in generic driver.
When the generic driver extends or shrinks a share it disables access
to the share by removing its export.  Currently it uses the command
``exportfs -u local_path`` to do so, but this fails with current nfs
packages.

Fix the error by calling ``exportfs -u host:local_path`` instead.

Change-Id: Ic489a1607bf82964bf2859e89b3da1f572436d17
Closes-Bug: #1649782
2017-01-17 22:42:40 -05:00
zhongjun
beed2f210c Add manila-manage db purge command
Cloud admins delete lots of DB records manually that were
"soft-deleted" in Manila. They do it to reduce size of DB
and increase response speed. Therefore, add "manila-manage
db purge" command that will make cloud admins life easier
allowing them to purge such DB records in one click.

Examples of usage:
$ manila-manage db purge 5

Partially-implements: blueprint clean-deleted-row-in-db
Depends-on: 0ec71e29b2f0b817fe7c4fcdcf1918c2eff811a0
Change-Id: I4fd83d44f4a1b6b7633a60249ba775f6d86d1cdc
2017-01-18 11:06:55 +08:00
Tina Tang
c90515d64e [Unity driver] VLAN enhancement
The enhancement includes:
1. Creates tenant for each vlan on the unity system. So that the nas
server in different vlan will have isolated IP address space.
2. Select the appropriate port on the system to create interface based
on MTU.
3. Remove the option unity_server_container (the old
emc_nas_server_container option) to enable the storage processors load
balance and the auto-selection of ports (by mtu).

DocImpact
Change-Id: Ic1140112f8cfbed7c89d5f66e6bee0c22d64b3ed
Closes-Bug: 1649458
2017-01-18 02:06:38 +00:00