564 Commits

Author SHA1 Message Date
silvacarloss
57edcbd1da Fix pagination does not speed up queries bug
This patch modifies the database api layer to fix the pagination
slowness bug, which causes a delay while the administrator tries
to list shares using the `--limit` option.
This change was tested in a very busy environment with 800 shares.
Before the change, the operation took about 25 seconds to be
finished. Now, the operation takes about 3 seconds in the same
environment.

Change-Id: I89659452b0e033631f1318a2eabb7e120c9e5743
Closes-bug: #1795463
2019-09-25 23:59:59 -03:00
Zuul
3fec658712 Merge "Manila PowerMax - rebrand from VMAX to PowerMax" 2019-07-22 19:47:27 +00:00
Helen Walsh
6995b9f975 Manila PowerMax - rebrand from VMAX to PowerMax
Rebrand from VMAX to PowerMax includes change tags, directory structure,
file names and documentation.

Implements: blueprint powermax-rebrand-manila

Change-Id: Ie9ba5939b223d7061a3b2707ee9ef899f1fe7f66
2019-07-19 12:19:30 +01:00
Zuul
19d169e083 Merge "NeutronBindNetworkPlugin: fix multi segment mtu" 2019-07-11 22:46:06 +00:00
Zuul
da4b33344c Merge "Unmount NetApp active share after replica promote" 2019-07-06 11:16:03 +00:00
zhangbailin
d3b26f3d93 Remove the redunant table from windows' editor
In windows env, cannot deal with '\t\t\t', maybe this is mistake
result in 'git pull' faild on windows env. In linux env show that(from
table):
[root@localhost manila]# vim releasenotes/notes/bug-1818081
bug-1818081-fix-inferred-script-name-in-case-of-proxy-urls-e33466af856708b4.yaml^I^I^I

Change-Id: I83a1fbeb8cc7f40e07017541283418da65f0fc36
2019-07-03 09:50:38 +08:00
Zuul
9e96b8823f Merge "Manila share driver for Inspur InStorage series." 2019-07-02 11:32:42 +00:00
Naresh Kumar Gunjalli
8fd4dfb4de Unmount NetApp active share after replica promote
The NetApp cDOT driver is now fixed to unmount the original
active share volume after one of its replica gets promoted.

Change-Id: Iecb734b431f0b7bc9a905b0a672013869ff60fd8
Closes-Bug: #1634278
2019-07-02 01:28:52 -04:00
Zuul
7698687e85 Merge "Bump the openstackdocstheme extension to 1.20" 2019-07-01 14:03:38 +00:00
Zuul
5cadc54e6a Merge "Check NetApp SnapRestore license for pools" 2019-07-01 14:03:36 +00:00
pengyuesheng
5c1f27f69f Bump the openstackdocstheme extension to 1.20
Some options are now automatically configured by the version 1.20:
- project
- html_last_updated_fmt
- latex_engine
- latex_elements
- version
- release.

This will show other versions of the doc, too.

Change-Id: I2f8e4fec3aa48b91d6ab636504ecc90553a4b802
2019-07-01 15:30:47 +08:00
Naresh Kumar Gunjalli
f333b88e25 Check NetApp SnapRestore license for pools
Added check to validate SnapRestore license for
NetApp ONTAP pools before setting revert_to_snapshot_support
to true/false for the respective pool.
This was always set to True before.

Change-Id: I4750d28c8acfe6d68a91e129e767c6e8607e6a75
Closes-Bug: #1678524
2019-07-01 02:10:17 -04:00
wang yong
54d855877b Manila share driver for Inspur InStorage series.
Features that Inspur InStorage driver support:
share create/delete.
extend share size.
update_access.
protocol: NFS/CIFS.
ThirdPartySystem: INSPUR CI

Change-Id: I931902901668c295fb12523bf3d414a897c36275
Implements: Blueprint inspur-instorage-manila-driver
2019-06-25 14:31:21 +08:00
arthurnsantos
4fbf1a2d9d [NetApp] Fix race condition issues on vserver deletion
This patch updates the NetApp driver handling with an issue that
happens when the driver tries to delete the vserver, during a
rollback operation inside the vserver creation method.

Change-Id: I0c8468c72e15c1d27f5cdfa50cfc379a9207c5f1
Closes-bug: #1831092
2019-06-03 21:04:36 -03:00
Maurice Escher
bc87926e60 NeutronBindNetworkPlugin: fix multi segment mtu
Neutron mtu value for network allocation is taken from share network,
so the share network needs to be updated with the mtu
before the allocation is created.

This prevents the mtu being empty on the first network allocation in
a share network.

Change-Id: I89de02af7d739bbe70f1d893cc2b6ced0157d120
Closes-Bug: #1822099
2019-05-13 09:44:07 -04:00
a4a0f16a37 Update master for stable/stein
Add file to the reno documentation build to show release notes for
stable/stein.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/stein.

Change-Id: Ie9f277d54f856227d626ef298a9d867a0b3fa287
Sem-Ver: feature
2019-03-22 13:38:43 +00:00
Zuul
996e2cf960 Merge "Only allow IP access type for CephFS NFS" 2019-03-21 22:23:05 +00:00
Tom Barron
9df750fd19 Only allow IP access type for CephFS NFS
For the CephFS NFS back end only ``IP`` access type
is valid so enforce this in the driver.

Also validate access level since there is a utility
routine to check both access type and access level.

Closes-bug: #1816420
Change-Id: I6c96f861b30ef7ccac05a7c199a62f0d69044c3a
2019-03-20 18:42:01 -04:00
Zuul
15878d96f3 Merge "Check all_tenants value in share_networks api" 2019-03-20 10:14:49 +00:00
Zuul
131c19050a Merge "Check all_tenants value in security_service api" 2019-03-20 09:58:21 +00:00
Zuul
64da8edc0c Merge "NetApp cDOT assume disabled compression on empty result" 2019-03-20 02:08:33 +00:00
hulina
34356e73b9 Check all_tenants value in share_networks api
Add manila.utils.is_all_tenants to check all_tenants value.

Closes-Bug: #1777551
Change-Id: I1b66a25169cdd23a76bf76c799d04521fdf5f8e9
2019-03-19 13:45:22 -07:00
Maurice Schreiber
b1ced07ffe NetApp cDOT assume disabled compression on empty result
can happen when sis is disabled

Change-Id: Icd22838d2d77278c8d8479905ce1ea78baa862a9
Closes-Bug: #1804654
2019-03-19 17:39:39 -03:00
zhangqing
bb8859f8ac Check all_tenants value in security_service api
Add manila.utils.is_all_tenants to check all_tenants value.

Partial-Bug: #1777551
Co-Authored-By: Yu Weizhong <yuweizhong@cmss.chinamobile.com>
Change-Id: I1c8068cb0d4652f1f0349dc5a8d0a2d3af2318e0
2019-03-19 13:30:58 -07:00
Zuul
b2787fded5 Merge "Destroy type quotas when a share type is deleted" 2019-03-18 12:52:41 +00:00
Goutham Pacha Ravi
4b6cfcf690 Destroy type quotas when a share type is deleted
Upon share type deletion, we were leaving behind
share type quotas, usages and reservations. These
couldn't be cleaned up without resorting to manual
intervention.

Cleanup quotas when a share type is being destroyed,
since the resources that they pertained to are gone
too.

Closes-Bug: #1811680
Change-Id: I04b1fe88808596aa8c05429b964190d654587f9a
2019-03-15 00:10:37 -07:00
Zuul
5966d00909 Merge "Fix driver filter to not check share_backend_name" 2019-03-14 21:56:27 +00:00
snpd
86c1576110 Fix driver filter to not check share_backend_name
Fixed the bug stating: Driver filter disallows using
queries with share_backend_name. The driver filter was
checking for hard equality between the share_backend_name
specified in the share type and the name reported by the
host [1]. This defeats the purpose of the capabilities
filter giving the ability to use "<in>" (selection)
operator in the extra-spec. Thus this commit fixes it by
updating the required files according to
openstack/cinder/commit/b32011 as now the driver does not
check for shared_backend_name.

Closes-Bug: #1815700

Change-Id: If384392d0f140922bb85a1dc50b0c4494c231e2f
2019-03-14 17:27:49 +00:00
Goutham Pacha Ravi
4b0c953f7f Fix API version inferred w/ un-versioned URLs
With [1], we fixed the issue with v1 API URLs when
configuring manila with a reverse proxy, like uwsgi.
However, the version discovery can be made against a
"unversioned" URL, i.e, the "/" endpoint.

Example version discovery target when there's no reverse
proxy:

   curl -i -X GET www.openstack-overcloud.com:8786/

Example version discovery target when manila is configured
with a web proxy:

   curl -i -X GET www.openstack-overcloud.com/shared-file-system/

Currently, the API assumes that a v2 endpoint is requested
and hence sets a default API version in the request, which
results in the wrong headers communicated to the client.

Fix this issue. The release note added with [1] should
suffice for this fix.

[1] I0363d7174f3d7ddefa8ced59b182faed665e9c36
Change-Id: I50d1024ee8485b8290c24fa850e60755b518fff3
Closes-Bug: #1818081
2019-03-13 17:42:07 -07:00
Goutham Pacha Ravi
0d8310ec7a Fix version selector when for proxy-style URLs
When manila API is served behind a proxy, the
"script_name" in the request can have the proxy
component in it. So, this patch fixes the version
selection logic by looking for the version in the
script name string instead of equivalence.

In addition, this patch adds some missing unit
tests and fixes tests that invoke a mocked
wsgi app for testing request context.

Change-Id: I0363d7174f3d7ddefa8ced59b182faed665e9c36
Partial-Bug: #1815038
Closes-Bug: #1818081
2019-03-11 16:42:25 +00:00
Zuul
43028c6d60 Merge "NetApp cDOT store port IDs and addresses at share server backend details" 2019-03-08 21:39:42 +00:00
Zuul
c3d697e514 Merge "NetApp ONTAP: allow multiple DNS IPs" 2019-03-07 17:29:56 +00:00
Zuul
b0c7acf871 Merge "Add manage/unmanage implementation to Container Driver" 2019-03-07 13:32:46 +00:00
Zuul
a69f5333c4 Merge "[NetApp] Add manage/unmanage of share servers" 2019-03-07 13:32:45 +00:00
Zuul
c4ba394a87 Merge "Fix missing size value in snapshot instance" 2019-03-06 23:17:37 +00:00
Zuul
0446705a0b Merge "Add manage/unmanage of shares in DHSS=True" 2019-03-06 01:12:31 +00:00
Rodrigo Barbieri
5556bdb727 [NetApp] Add manage/unmanage of share servers
This patch implements the functionality of managing and
unmanaging of share servers to the NetApp driver,
allowing for shares and snapshots to be managed
and unmanaged in DHSS=True driver mode.

Implements: bp netapp-driver-manage-unmanage-with-share-servers
Change-Id: I6051cf038dcf9f175e0610fff0adf360230dc23c
Depends-On: I452c2a99b186f53d737cb7fbd7eabfcfd9b249d6
2019-03-05 19:18:01 +00:00
Rodrigo Barbieri
d877b61c5e Add manage/unmanage of shares in DHSS=True
This patch adds Manage/Unmanage of share servers in
Manila. It also updates the Manage Share API to accept
a "share_server_id" parameter, and updates Unmanage
of Share and Snapshots API to allow unmanaging of
shares and snapshots in DHSS=True.

Managed share servers are not deleted automatically
by manila, and if a single share is unmanaged in
DHSS=True, the respective share server will not be
deleted automatically as well.

Managing share servers require that the driver
implements 2 functions:
- get_share_server_network_info: obtain IPs from
  share server.
- manage_server: perform required operations to
  manage and return dict of backend_details.

Unmanaging share servers require that the driver
overrides unmanage_server function.

The IPs obtained from the backend are validated
by the Network plugin, so ports with the exact
IPs must exist in the subnet and admin subnet
associated with the share network specified
when managing the share server (unless
StandaloneNetworkPlugin is used).

It is recommended to rename the backend resource
if possible when managing the share server, to
prevent issues with re-managing a share server
that has already been managed.

This patch bumps the API microversion to 2.49.

APIImpact
DocImpact

Depends-On: I17c74b2aa242918188eeff368232c762a4b31093
Partially-implements: bp manage-unmanage-with-share-servers
Change-Id: I108961e7436ba13550ef2b8f02079c6e599a6166
2019-03-05 16:03:29 -03:00
silvacarloss
785aa8369c Fix missing size value in snapshot instance
This patch fixes the size value not being present in share
snapshot instances, which causes drivers to not being able to access
this property unless they read the size from the snapshot model.

Closes-bug: #1815587
Change-Id: I730629ea460c316a02f8dffb4a55eea04ad619c9
2019-03-05 11:29:49 -03:00
Zuul
a1fbdbc4a5 Merge "Extend remove_version_from_href support" 2019-03-05 10:33:03 +00:00
Rodrigo Barbieri
edf227ee27 Add manage/unmanage implementation to Container Driver
This patch implements managing and unmanaging of share
servers and shares functionality to the Container driver.

Depends-On: I452c2a99b186f53d737cb7fbd7eabfcfd9b249d6
Implements: bp container-driver-manage-unmanage-with-share-servers
Change-Id: I623c88dd1155740f0a444d2063236d91efd3bd1e
2019-03-04 18:35:06 +00:00
Zuul
fdac239d7e Merge "[NetApp] Fix race condition issue in NetApp driver" 2019-02-25 18:51:51 +00:00
Victoria Martinez de la Cruz
6d970b7375 Extend remove_version_from_href support
Improve remove_version_from_href so that it supports URLs for which
the version does not directly trail the hostname

Given: 'http://manila.example.com/share/v1.1/123'
Returns: 'http://manila.example.com/share/123'

Based on I8ccc449116ff164aacc0aefca3a0ec2ac8f73aa8

Change-Id: I13010d3ee0a83a67204145837503abe7126263cd
Closes-Bug: #1815038
2019-02-24 18:40:53 +00:00
silvacarloss
96d6869dd6 [NetApp] Fix race condition issue in NetApp driver
This patch fixes the concurrency in the NetApp driver between the
method setup_server and teardown_server by doing the
teardown_server method lock the needed resources correctly.

Closes-bug: #1816640
Change-Id: I7d56384e77b7e18b3c95f182c0a01af82e5fa5a5
2019-02-22 11:45:36 -03:00
Zuul
4d63fa73cd Merge "Return request-id to APIs that don't respond with a body" 2019-02-21 03:37:20 +00:00
Goutham Pacha Ravi
2289cdd9e7 Add policy to create/update public shares
Public shares are visible across all keystone
projects and are "accessible" by all projects
within a multi-tenant cloud. More often than not,
only privileged users can create and manage shares
that EVERYONE on the cloud can really mount and use.

Manila deployers want a way to disable
unprivileged users from create public shares. Feedback
from deployers has been that public shares created on one
private tenant network (DHSS=True scenario) cannot
be used within another private tenant network belonging
to a different project. So, if users unintentionally create
public shares, they end up pollute the dashboards of users
in other projects. So, we need to make public share
creation a "privileged" feature. This can be achieved by
introducing a manila API policy that defaults to
only allowing the "admin" role. So, this commit will:
- Introduce two new policies:
    - share:create_public_share and
    - share:set_public_share
- Set the default check string for these policies
  to rule:admin_api. They will accept the default
  rule temporarily, and log a deprecation warning
  message.
- Remove some redundant policy checks in code
  and move the policy check up in the API so we
  can fail unauthorized requests faster.

When making an API change that potentially changes
the return code from being "successful" (HTTP 2xx)
to returning failure (in this case: HTTP 403,
NotAuthorized), we typically maintain API backwards
compatibility by failing the requests ONLY with newer
API microversions. Following this pattern for API
policy changes will introduce a security hole, i.e.,
users can always create public shares with previous
versions even when an administrator explicitly
sets up policy to disable the action. This is why
this change will not maintain API backwards
compatibility.

APIImpact
Closes-Bug: #1801763
Change-Id: Ib4fc9a82b6a3e5f8e50f0bc8a89d0445eecab028
2019-02-18 12:56:12 -08:00
Zuul
3017c3239e Merge "Allow configuring availability_zones in share types" 2019-02-18 20:38:20 +00:00
Zuul
6b3650245e Merge "[Unity] Shrink share in Unity driver." 2019-02-15 23:12:00 +00:00
Goutham Pacha Ravi
52db0754fe Return request-id to APIs that don't respond with a body
Request-IDs help track actions initiated via the API.
With this patch, we can supply the request ID in the
following APIs:
- POST {resource}/action APIs for actions such as
  'reset-state', 'force-delete', 'shrink',
  'extend', 'manage', 'deny_access', 'addProjectAccess',
  'removeProjectAccess', 'promote', 'resync', 'unmanage',
  'revert', 'migration_start', 'migration_complete',
  'migration_cancel'
- POST /share_unmanage/{id}
- DELETE /{resource}/{id} APIs for
  shares, share networks, share groups, share replicas,
  security services, share servers, share snapshots,
  extra specs, messages, quota sets, share-group-snapshots,
  group specs, share-group-types, share types

Change-Id: I64ed14b5a44d6e1b37cfc9321b25bdf4e0aabea5
Closes-Bug: #1815532
2019-02-15 14:16:34 -08:00
dingd
a6e1746a2f [Unity] Shrink share in Unity driver.
Change-Id: Iaa29088456e4dd46039511a2bf8bbf789ddd6e7f
2019-02-14 05:07:05 +00:00