Commit Graph

42 Commits

Author SHA1 Message Date
jayaanand.borra@netapp.com ea1ac5f448 Human readable export location core implementation
Export locations are usually too difficult to memo
rize.Currently, there is no way to determine the
export location before the share is created, so
users wait until the share creation request gets
completed, and then they check the export
locations to mount the share. The generated
export locations are often not human readable
 and it is hard to memorize and control them.

Implements: bp/human-readable-export-locations
Change-Id: I72ac7e24ddd4330d76cafd5e7f78bac2b0174883
2024-03-07 17:20:30 -05:00
Manish Honap 6431b86f19 Add config option reserved_share_extend_percentage
'reserved_share_extend_percentage' backend config option allows Manila
to consider different reservation percentage for share extend
operation. With this option, under existing limit of
'reserved_share_percentage', we do not want user to create new share if
limit is hit, but allow user to extend existing share.

DocImpact

Closes-Bug: #1961087
Change-Id: I000a7f530569ff80495b1df62a91981dc5865023
2022-06-14 23:08:31 +05:30
Felipe Rodrigues 2b57d15c64 Add multiple subnets per AZ support
Manila can now configure a share network with multiple subnets
in an availability zone. Also, it can add a new subnet for an
availability that has share servers, which will triger an update
share server allocations.

Changes:
- API:
  - Bump version to 2.70.
  - setup share network with multiple subents per az.
  - Block manage server with multiple subnets.
  - Allow add subnet for in-use share servers.
  - `share_network_subnet_id` is dropped from ShareServer view
  - `share_network_subnet_ids` is added in ShareServer view
  - `network_allocation_update_support` is added to ShareServer and
    ShareNetwork views.
  - Add a check operation for share network subnet create.

- DB:
  - Remove `share_network_subnet_id` from share_servers.
  - Create mapping table `share_server_share_network_subnet_mappings`.
  - Fix queries with new db design.
  - Add migration downgrade and upgrade alembic.
  - Add `share_network_subnet_id` to the NetworkAllocations.

- Scheduler:
  - Change `AvailabilityZoneFilter` to take in account if the
    host supports the allocation required by the setup request.

- Manager:
  - Bump RPC API version.
  - `_setup_server` allocating multiple subnets.
  - Modify signature of driver `_setup_server` interface, passing a
    list of `network_info` for each subnet.
  - Share server DB creation to inform a list of subnets and
    create with `network_allocation_update_support`.
  - Implement `check_update_share_server_network_allocations` and
    `update_share_server_network_allocations`.

- Drivers:
  - For legacy compatibility, all drivers implementing `_setup_server`
    consume the first element of the `network_ino`.
  - Dummy Driver:
    - Implement `_setup_server` with new signature as multiple subnet.
    - Modify the `backend_details` to save allocations for all subnets.
    - Report update allocation and share server multiple subnet support.
    - Implement `check_update_share_server_network_allocations` and
      `update_share_server_network_allocations` interfaces.

Signed-off-by: Felipe Rodrigues <felipefuty01@gmail.com>
Co-Authored-By: Andre Beltrami <debeltrami@gmail.com>
Co-Authored-By: Fábio Oliveira <fabioaurelio1269@gmail.com>
Co-Authored-By: Nahim Alves de Souza <nahimsouza@outlook.com>
Co-Authored-By: Caique Mello <caique_mellosbo@hotmail.com>

DocImpact
APIImpact
Partially-Implements: blueprint multiple-share-network-subnets

Change-Id: I7de9de4ae509182e9494bba604979cce03acceec
2022-03-03 02:31:11 +00:00
haixin a73b299374 Remove usage of six lib for third party/vendors drivers.
Python2 is no longer supported, so in this patch
set we remove the usage of the six (py2 and py3
compatibility library) in favor of py3 syntax.

Change-Id: I3ddfad568a1b578bee23a6d1a96de9551e336bb4
2022-01-29 03:01:17 +00:00
kpdev 6ca10003a9 Add config option reserved_share_from_snapshot_percentage.
This config option allows different value for reservation percentage,
mostly useful on the platforms, where shares can only be created from
the snapshot on the host where snapshot was taken. The lower value of
this config option against existing (reserved_share_percentage) allows
to create shares from the snapshot on the same host up to a higher
threshold even though non-snapshot/regular share create fails.
In case this config option is not set, the shares created from snapshot
will use reservation percentage value set in 'reserved_share_percentage'.
This will be useful for users who want to keep same reservation percentage
for both non-snapshot/regular and snapshot shares.

DocImpact

Closes-Bug: #1938060
Change-Id: I390da933fe92875e3c7ee40709eacacc030278dc
2021-08-27 19:10:36 +02:00
debeltrami 2bc27c5678 Add security service update for in-use share networks
This patch implements the update of security service's association
with in-use share networks. The following changes were added:

 - New share network APIs: `share_network_security_service_update`
 and `share_network_reset_state`.

 - A new `status` attribute was added to share network model to
 identify when it's in a modification state, called 'network_change'.
 Other supported status that were added: 'active' and 'error'.

 - New 'security_service_update_support' property was added to both
 share server and share network models, to identify when this resources
 are able to process security service update for in-use share networks.

 - New driver interface was added to support update of security service's
 configuration of a given share server.

DocImpact
APIImpact
Partially Implements: bp add-security-service-in-use-share-networks

Co-Authored-By: Carlos Eduardo <ces.eduardo98@gmail.com>
Co-Authored-By: Douglas Viroel <viroel@gmail.com>
Co-Authored-By: Andre Beltrami <debeltrami@gmail.com>

Change-Id: I129a794dfd2d179fa2b9a2fed050459d6f00b0de
2021-03-12 18:37:45 -03:00
Zuul e83517b662 Merge "Add share server limits" 2021-03-12 02:59:45 +00:00
silvacarloss 2fb871cb89 Add share server limits
Add two new capabilities to manila. It is possible to set limits
to share server size and share instances in a share server by
setting `max_share_server_size` and `max_shares_per_share_server`
in a backend stanza.

Change-Id: I3170478d3aa2d09cb2adc32233dc57bc59029a56
Partially-Implements: bp new-share-server-limits
DocImpact
2021-03-08 21:35:06 -03:00
Goutham Pacha Ravi e3fea14788 Retry unmount operation on the ZFSOnLinux driver
When a share is mounted on the same host as the manila-share
process, zfs prevents us from destroying the underlying
dataset until the share has been cleanly unmounted from
the host. Kernel mounts can take a few seconds to get
unmounted fully especially when there are a lot of
linux namespaces that the mountpoint has been shared to.

Add a retry on these operations to harden the deletion
process and prevent spurious failures.

Change-Id: I4aba76b72df274d0a8cb90fe0ab8799523c260ef
Closes-Bug: #1903773
Related-Bug: #1896672
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2020-11-10 13:35:21 -08:00
Goutham Pacha Ravi 598223985a Use unittest.mock instead of third party lib
mock was adopted into standard python
in version 3.3 [1]. Since manila no longer
supports python2.7, we can use the inbuilt
mock package rather than the third party
lib.

Fix some issues with imports that weren't
following our import conventions of grouping
imports [3]

Add a hacking test to ensure we don't regress
on this.

[1] https://docs.python.org/3/library/unittest.mock.html
[2] http://lists.openstack.org/pipermail/openstack-discuss/2020-March/013281.html
[3] https://docs.openstack.org/hacking/latest/user/hacking.html#imports

Co-Authored-By: Sean McGinnis <sean.mcginnis@gmail.com>
Change-Id: If857a49fbf526983e712282a25d7e8bef5093533
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2020-04-17 16:24:27 -07:00
andrebeltrami 8f8ddfd670 [ZFSonLinux] Create share from snapshot in different backends
This patch improves the operation of create share from snapshot
to support different backends/hosts for the zfsonlinux driver

Partially-implements: bp create-share-from-snapshot-in-another-pool-or-backend

Depends-On: Iab13a0961eb4a387a502246e5d4b79bc9046e04b

Change-Id: I124803734c81d3630c5147f5f3bb75724489c929
2020-04-09 21:16:06 +00:00
Goutham Pacha Ravi 3bd1e5054a [pylint] Fix/ignore pylint errors in test modules
- Add ignores to pylint false positives in the
  test modules.
- Remove unnecessary fake data
- Fix wrong mock methods used in tests

Change-Id: I64ffff15cc546c67e7e545b1da7ec0efa002bdc5
2019-02-28 08:36:11 -08:00
Goutham Pacha Ravi d7c01efb44 [ZFSOnLinux] Retry unmounting old datasets during manage
Add a retry loop to ensure the dataset being renamed
is cleanly unmounted before the rename operation.

Change-Id: Ie506f237010c415ee9f0d64abbefd5854f776a5f
Closes-Bug: #1785180
2018-08-09 16:31:00 +00:00
Goutham Pacha Ravi fd23a6387c Use class name in invocation of super
Fix pylint E103 warning raised by usage of
self.__class__ to refer to the derived class
in super() methods.

self.__class__ is a reasonable first argument
to super() in any method of a class, as long
as the method is not going to be invoked in
derived classes.

Python3 removes this ambiguity by not requiring
arguments for the super() method.

[1] https://docs.pylint.org/en/1.6.0/features.html#id33

Change-Id: I6071b6cfd8cff2be3853d739f71b94da990cda97
2018-06-06 17:47:18 -07:00
zhongjun2 2b40e5618f Enable IPv6 in manila(network plugins and drivers)
Please read spec for design detail [1].

Support IPv6 in IP drivers, networks and share
type extra specs.

Co-Authored-By: TommyLikeHu(tommylikehu@gmail.com)
Co-Authored-By: Ben Swartzlander <ben@swartzlander.org>

[1] f7202a6cfe32a057f752a4e393f848f8a0211c36

DocImpact

Partial-Implements: blueprint support-ipv6-access
Change-Id: I96d3389262e9829b8b4344870cdf5c76abd22828
2017-07-27 18:28:15 +08:00
Valeriy Ponomaryov 21699451f1 [Share groups] Add scheduler filter ConsistentSnapshotFilter
That will be used for scheduling share groups based on their possibility
to create consistent snapshots.

Also apply following tempest plugin changes:
- Add new 'capability_sg_consistent_snapshot_support' tempest config
option, that will be used for creation of new share group types and used
to prove that scheduling works as expected.
- Fix some share group test attributes from 'only API involved' to
  'API and Backend are involved', because it is so indeed.

Change-Id: I05553c308ae40c4ddc2c6469ff1c1a3da36a87da
Partially-Implements BP manila-share-groups
2017-06-02 17:48:05 +03: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
Alex Meade d25f101ab4 Manila Share Groups
Remove the experimental consistency group APIs and
replace them with the experimental Share Group APIs.

DocImpact
APIImpact
Partially-implements-blueprint: manila-share-groups

Change-Id: I79a80a62ae4e0015d6161edc2b93fd1f9ba69537
2017-01-23 21:29:12 +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
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
Clinton Knight d4a379d083 Implement share revert to snapshot
This commit adds the ability for Manila to revert a
share to the latest available snapshot.

The feature is implemented in the LVM driver, for
testing purposes.

APIImpact
DocImpact
Co-Authored-By: Ben Swartzlander <ben@swartzlander.org>
Co-Authored-By: Andrew Kerr <andrew.kerr@netapp.com>
Implements: blueprint manila-share-revert-to-snapshot
Change-Id: Id497e13070e0003db2db951526a52de6c2182cca
2017-01-17 15:06:01 -05:00
Clinton Knight 0d6db3588c Add create_share_from_snapshot_support extra spec
The snapshot_support extra spec has always meant two
things: a driver can take snapshots and create shares
from snapshots. As we add alternate snapshot semantics,
it is likely that some drivers will want to support
snapshots and some of the new semantics while being
unable to create new shares from snapshots.

This work adds a new extra spec,
create_share_from_snapshot_support, that removes the
overloading on snapshot_support. It also makes the
existing snapshot_support extra spec optional,
allowing admins to create types without setting
snapshot_support; shares created with such types
will not support snapshots.

APIImpact
DocImpact

Co-Authored-By: Goutham Pacha Ravi <gouthamr@netapp.com>
Implements: blueprint add-create-share-from-snapshot-extra-spec
Change-Id: Ib0ad5fbfdf6297665c208149b08c8d21b3c232be
2016-12-21 09:57:08 -05:00
Valeriy Ponomaryov 656dc81906 [ZFSonLinux] Stop inheriting options creating share from snapshot
Because, it leads to inheritance of access rules too. That is a bug.
All other expected options are generated on-fly already.

Change-Id: Ibe744c9fd001156a8184aa8f955c424cebfb8664
Closes-Bug: #1645746
2016-12-06 14:57:35 +03:00
Pan eeef132269 TrivialFix: Remove Duplicate Keys
Removing duplicate keys from the tests

Change-Id: I299b9cf4a7b860ce16de6617dd5b4b551c3d985e
2016-11-28 12:48:36 -05:00
Valeriy Ponomaryov eaf153d1ad [ZFSonLinux] Fix share migration using remote host
For the moment, share migration works only when manila-share and
ZFS storage are located on the same host. So, fix it adding SSH
command to migration command.

Change-Id: I25f211de6a278c6f303ef3f33ff30f504146a0fa
Closes-Bug: #1623379
2016-09-14 15:31:11 +03:00
vponomaryov e24e6e7504 [ZFSonLinux] Add test coverage for share migration
Big part of share migration feature in ZFSonLinux share driver
is not covered with unit tests. So add it.
Also, add reno releasenote saying that driver now supports share
migration.

Change-Id: I558d4c6a0802b6a0156416b3c9b481181a55298c
Closes-Bug: #1621068
2016-09-13 10:48:36 +03:00
Valeriy Ponomaryov a5c2297ded [ZFSonLinux] Fix share migration support
Current implementation of share migration works only if we use
local shell executor. So, refactor approach for it to make work
with both shell executors - local and remote (SSH).

Change-Id: Ibe31bf52006040ea26badfa7236ed67559f7aded
Closes-Bug: #1620502
2016-09-07 18:36:55 +03:00
Valeriy Ponomaryov 976e2d58cb [ZFSonLinux] Add share migration support
Add support of share migration feature to ZFsonLinux driver.

Implements BP zfsonlinux-share-migration

Change-Id: If9e1fec9a6d4f96d2bb5c176c6249fafc7e3e891
2016-09-01 05:45:18 +00:00
Valeriy Ponomaryov 839ba23018 [ZFSonLinux] Fix replicated snapshot deletion error
Commit [1] implemented bug when deletion of replicated snapshots
may fail if active replica deleted not as last among all snapshot
replicas. It was caused by deletion of private data of snapshot,
only by active replica.
So, make that data be deleted only in the end of driver method
that deletes replicated snapshots.

[1] If240ecde5676c334d39faaccd5703e93544aaa06

Change-Id: Ic2b7b7daf0ba5db8eb7166969413b590b27effb5
Closes-Bug: #1607765
2016-08-01 18:48:57 +03:00
Valeriy Ponomaryov d953baefcb [ZFSonLinux] Add 'manage snapshot' feature support
Implement 'manage snapshot' feature in ZFSonLinux share driver.

Prerequisites:
- snapshot being managed should exist.

Details:
- snapshot being managed will be renamed by share driver based on
  taken ID.
- size for managed snapshot will be taken either from
  REST API (--driver_options size=5) or
  from its "used" attribute.

Implements BP zfsonlinux-manage-snapshot
DocImpact

Change-Id: If240ecde5676c334d39faaccd5703e93544aaa06
Depends-On: Ifc762a882a78159adacfe168a4edbe824178301a
2016-07-27 10:51:31 +03:00
Jenkins 71a720e466 Merge "[ZFSonLinux] Add 'manage share' feature support" 2016-07-26 20:08:29 +00:00
tpsilva f10776d832 Add DriverFilter and GoodnessWeigher to manila
This patch ports cinder's DriverFilter and GoodnessWeigher to manila.
These can use two new properties provided by backends,
'filter_function' and 'goodness_function', which can be used to filter
and weigh qualified backends, respectively.

Reference for cinder spec: I59b607a88953a346aa35e67e785a0417a7ce8cc9
Reference for cinder commit: I38408ab49b6ed869c1faae746ee64a3bae86be58

DocImpact
Change-Id: I873f4152e16efdeb30ceae26335a7974dc9b4b69
Implements: blueprint driver-filter-goodness-weigher
2016-07-18 17:28:40 -03:00
Valeriy Ponomaryov f284db4e07 [ZFSonLinux] Add 'manage share' feature support
Implement 'manage share' feature in ZFSonLinux share driver.

Prerequisites:
- share being managed should exist.
- share being managed should not be part of any replication relations.
- share being managed should not have redefined mountpoint.

Details:
- share being managed will be renamed by share driver based on taken ID.
- share being managed will get "quota" attribute set based on provided
  value in API (--driver_options size=5) or it will set quota
  to nearest bigger rounded integer of already
  used space (2,4 -> 3, 3.6 -> 4).

Implements blueprint zfsonlinux-manage-share
DocImpact

Change-Id: I03eab5e02835fe660dde0020601c02c0136bddeb
2016-07-04 13:26:57 +03:00
Jenkins bf24cdbae8 Merge "Make ZFSonLinux driver handle snapshots of replicated shares properly" 2016-03-19 13:54:55 +00:00
Goutham Pacha Ravi 94e04c8de2 Data Replication: Ensure Snapshots across replicas
When taking a snapshot of a replicated share,  users would
expect the snapshot to be available across the replicas.
Currently, Manila assumes that drivers will take snapshots
along with the share data.

Different backends implement replication differently. Many
of them assume that replicas are 'in_sync' with the primary
if they have been synchronized within a particular window
of time (sometimes referred to as 'recovery point objective').
Since snapshots are point in time actions on a share, drivers
must ensure that the replication of a snapshot begins as soon
as it is available on the primary/'active' instance.

To ensure that snapshots are indeed available across replicas:
1) Track snapshots across replicas as different
    snapshot instances.
2) Make an 'aggregate_status' property to convey the
    availability of a snapshot across all the active/in_sync
    replicas of a share.
3) Provide all the information necessary for drivers to:
    - Create a snapshot on the primary and send it across
       to all replicas
    - Delete a snapshot on the primary and ensure that it is
       deleted on the replicas as well.
4) Set snapshot instance to 'error' if it was in any transitional
    state when its replica was 'promoted' to become an 'active'
    instance.
5) Pass down snapshot instances during create, delete and update
replica driver calls.
6) Update replica interfaces to pass in snapshot instance data. Always
include 'available' snapshots in the update_replica call to ensure
that drivers confirm their presence on the replica in order to report
that the replica is 'in_sync'.

Also, grab the share_type afresh from parent share/snapshot
to allow 'replication_key' to be copied to the share model during
share creation.

Rename SnapshotNotFound to SnapshotResourceNotFound to
signify a missing snapshot object on backends.

APIImpact
The 'status' attribute of the snapshot is now the 'aggregate_status'
of the instances of the snapshot. No key changes have been made
in the JSON response. However, API actions will be gated against
'aggregate_status' of the snapshot instances when more than one
instance exists.

Closes-Bug: #1546303
Closes-Bug: #1551064

Change-Id: I63203df00904d209e9e92eda7c79206e5ef8d611
2016-03-18 20:29:11 -04:00
Valeriy Ponomaryov b161889e32 Make ZFSonLinux driver handle snapshots of replicated shares properly
With this fix it is now possible to
- replicate share created from snapshot.
- create share from snapshot after "promote replica" action.

Change-Id: Id318a4adc0faf64a4bef57252aa2f0d9083b82b1
Depends-On: I63203df00904d209e9e92eda7c79206e5ef8d611
Closes-Bug: #1557283
Related-Bug: #1546303
2016-03-18 16:44:21 +02:00
Valeriy Ponomaryov c8bce995e8 Fix report of ZFSonLinux driver capabilities
ZFSonLinux share driver supports dedupe and compression
but does not report such capabilities to scheduler.

So, make driver do following things:
- Report 'dedupe' and 'compression' capabilities
  based on values of its config option 'zfs_dataset_creation_options'.
  Both can be either enabled or disabled.
- Report proper value of 'thin_provisioning' as [True],
  because ZFSonLinux driver does not support space reservation for
  shares and uses only quotas for managing used size.
- Make driver expect type of compression as
  qualified extra spec 'zfsonlinux:compression'.

Change-Id: I4028b3fae4e39d0303e7ead5eba6a49b7ca9d977
Closes-Bug: #1557031
2016-03-17 13:43:52 +02:00
Valeriy Ponomaryov 42eccd28c9 Fix update of access rules in ZFSonLinux driver
Recently merged commit [1] removed default values for "update_access"
interface of all drivers, but didn't fix usage of that
interface for ZFSonLinux driver that led to TypeError exception.

So, provide "add_rules" and "delete_rules" args always as
they are required now.

Driver methods that were broken and being fixed are following:
- Create replica
- Update replica
- Promote replica

[1] I86f4ccc9d496ec6183bd0fa5be9a77c3451378d5

Change-Id: Ic34f8e51436b45e4129aac597fb22428d21f2bae
Closes-Bug: #1557885
2016-03-16 09:45:08 +02:00
Jenkins e3b4639edb Merge "Remove nsenter dependency" 2016-03-10 04:28:31 +00:00
Ben Swartzlander fad7709ed2 Remove nsenter dependency
Rather complex logic was added to ZFS driver to cope with
mount-namespace-related problems caused by neutron. A better
solution is to ensure mounts (and unmount) propagate to
namespaces.

Closes-Bug: 1552552
Change-Id: Id952cb110c0187021a46ed5de02308b10ddf1239
2016-03-09 10:37:50 -05:00
Valeriy Ponomaryov f3b8026117 Fix ZFSonLinux driver share replica SSHing
ZFSonLinux share driver uses username and service IP address
for replication actions. And if we change those values in config
and restart manila-share services driver still will use old values
in "promote" and "update/resync" operations.
So, update that info in each "ensure_share" call that is performed
on start of service.

Change-Id: I565d9e41ff788331af5f30d0edcc7f33d05b806b
Closes-Bug: #1552320
2016-03-09 16:05:15 +02:00
Valeriy Ponomaryov 312cd3321a Add ZFSonLinux share driver
Add support for ZFS (on Linux) filesystem.

Following features are supported:
- Create/delete share
- Create/delete snapshot
- Create share from snapshot
- Extend/shrink share
- Update NFS IP-based access rules using new interface.
(SMB support planned for future).
- create/delete/update/promote share replica

ZFS-related notes:
- Any amount of ZFS zpools can be used by share driver.
- Allowed to configure default options for ZFS datasets that are used
for share creation.
- Any amount of nested datasets is allowed to be used.
- All share replicas are read-only.
- All share replicas are synched periodically, not continuously.
So, status 'in_sync' means latest sync was successful.
Time range between syncs equals to value of
config global opt 'replica_state_update_interval'.

Driver-related notes:
- Able to use remote ZFSonLinux storage as well as local.

Other made changes:
- updated driver private data DB methods removing filtering by host
  as redundant operation. Replication requires some common metadata
  storage and filtering by host breaks it. It is safe to do so, because
  if driver gets some ID of entity then it is allowed to read its info
  too.

Implements bp zfsonlinux-driver
DocImpact
Change-Id: I3ddd3767184e4843037de0ac75ff18dce709b6dc
2016-03-01 13:34:18 +02:00