5434 Commits

Author SHA1 Message Date
Simon Dodsley
9eb37eca8b Add Pure Storage FlashBlade driver
Change-Id: I8de380bca1b55d4d0ee44a5e5d052a7dced467df
2021-06-25 23:38:10 -04:00
Zuul
faf44b54dc Merge "Updates CephFS drivers docs" 2021-04-28 11:46:16 +00:00
Victoria Martinez de la Cruz
992ec82575 Updates CephFS drivers docs
As part of our work on updating CephFS drivers
to use the ceph-mgr interface, the related docs
on the admin guide need to be updated

- Updates ceph caps for manila to include mgr caps,
remove mds caps, and constrain mon caps
- Add the new cephfs_filesystem_name param to the
config
- Add upgrade to Wallaby considerations (minimum Ceph
version required)

Partially-Implement: bp update-cephfs-drivers
Change-Id: I113639cc9989bbaf224d19969993870d30b81c29
2021-04-28 09:23:58 +00:00
LinPeiWen
63e255248b [Glusterfs] Fix create share from snapshot failed
1、After performing a snapshot clone of the glusterfs vol,
  the status of the vol is'Created', and the parameter
  "gluster volume set nfs.rpc-auth-reject'*'" is required for
  the vol in the'Started' state.
2、The cloned volume needs to activate the snapshot,
  if the snapshot is already activated, you need to skip the activation step

Closes-Bug: #1922075
Change-Id: I304bf59b3f8c0d5b847078a5752bac8ac4f21690
2021-04-27 09:23:13 +00:00
Zuul
7b521675ef Merge "Direct mgr commands to the mgr daemon" 2021-04-19 19:25:03 +00:00
Maurice Escher
29a943fde7
Reuse _set_instances_share_data for replicas.
Replicas are just special instances after all, no need for
duplicate code and missing on improvements like exception handling
on NotFound error.

Change-Id: I31fabebc6a60814a4cfc04ae0deb49dcb66cab0f
Closes-Bug: #1923566
2021-04-16 10:32:58 +02:00
Victoria Martinez de la Cruz
3ea5d50a23 Direct mgr commands to the mgr daemon
Commands in the Ceph driver are directed at the mon
daemon instead of at the mgr daemon.

The driver's rados_command() calls json_command() and,
by default, json_command() calls the python
rados client's mon_command() instead of mgr_command().

By passing the target as mon-mgr, the python rados
client's mgr_command() is called as desired, and we
avoid the need of extra MON write caps.

Closes-Bug: #1923181

Co-Authored-By: Victoria Martinez de la Cruz <victoria@redhat.com>
Co-Authored-By: Ramana Raja <rraja@redhat.com>
Co-Authored-By: Tom Barron <tpb@dyncloud.net>
Change-Id: I5bca68070ca1eb539d53dd31cb92588840e925e8
2021-04-13 20:10:48 +00:00
Zuul
ad4315eb36 Merge "Add api reference for share server migration" 2021-04-07 11:33:44 +00:00
Takashi Kajinami
dede92d734 Document policy rule using the description parameter
The RuleDefault class provides the description parameter so that
description of a rule is also implemented in code. This allows us
to render these descriptions by the oslopolicy-sample-generator
command.

Change-Id: Ie6d16c925640351b74a4ed67bf649f844d347b1e
2021-04-06 22:56:52 +09:00
Zuul
a3aaea9149 Merge "Add Python3 xena unit tests" 2021-03-30 22:33:49 +00:00
Zuul
1cab2e00a3 Merge "Update master for stable/wallaby" 2021-03-30 21:49:07 +00:00
haixin
41192047aa [doc] Annotate max api microversion in Wallaby
Change-Id: I24baaea02b7efc37b4eb9cbe75b7dfa11ac330d2
2021-03-29 10:08:14 +08:00
f5fae7df2a Add Python3 xena unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for xena.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I28cedd09fbdd7dcd879f62f9563b5b7340c4df59
2021-03-26 18:56:33 +00:00
1522add3aa Update master for stable/wallaby
Add file to the reno documentation build to show release notes for
stable/wallaby.

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

Sem-Ver: feature
Change-Id: I49803f627c4c580b41e7408b2b7e0452f3758831
2021-03-26 18:56:26 +00:00
Zuul
4c7d4ba726 Merge "Set "context_is_admin" to system scope admin roles" 2021-03-26 18:01:33 +00:00
Zuul
0c8e92e54a Merge "Add release note for secure rbac work" 2021-03-26 16:19:40 +00:00
Goutham Pacha Ravi
7a99c6a181 Add release note for secure rbac work
Call out the feature and its impact.

Change-Id: I3062950e7b9c5b7d93a8332b65881f83226cda4e
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-03-26 15:21:34 +00:00
Goutham Pacha Ravi
02cc5c6760 Set "context_is_admin" to system scope admin roles
This policy governs manila APIs that are meant to
be cross tenant - so it should default to system
scope in the new secure rbac system.

Also reformat the policy.py file so that we are
consistent with using "rules" as we were doing in
the older releases. Rules abstract keystone
concepts such as roles and scopes.

Change-Id: I31b8eb5232a5cd286db18c2b14833c0682574958
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-03-26 06:57:37 -07:00
Zuul
333b18da72 Merge "Disable some policy warnings" 2021-03-26 13:05:23 +00:00
Zuul
7d2a4e1219 Merge "Bump RPC version for the scheduler rpc call" 2021-03-26 12:24:24 +00:00
Zuul
8a51e5e907 Merge "Filter storage protocol in the scheduler" 2021-03-26 10:52:04 +00:00
Zuul
bcab0515fa Merge "[NetApp] Follow up fixes for update security service" 2021-03-26 10:51:07 +00:00
Goutham Pacha Ravi
3e3e791126 Bump RPC version for the scheduler rpc call
https://review.opendev.org/768137 fixed
bug #1908963 by adding a timestamp field to
the "update_service_capabilities" rpc API
call to the scheduler service.

It's possible that during an upgrade, the
share service is upgraded before a given
scheduler service, and an updated client
could start sending messages with this
extra data that wasn't expected. Lets
bump the version so that the client
messages are just waiting for an updated
scheduler to show up and consume the
messages rather than raise syntax
errors.

Partial-Bug: #1908963
Change-Id: I0d9fc311ffd296bd6153b7190f8f5c42f494a39d
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-03-25 23:24:02 -07:00
Zuul
36672dcec6 Merge "Add exception for insufficient privileges when using security services" 2021-03-26 01:25:19 +00:00
Zuul
a556e640eb Merge "Remove unused model properties and increase unit test coverage" 2021-03-26 01:03:42 +00:00
Zuul
a411f521d4 Merge "Support host assisted share migration for Zadara manila driver" 2021-03-26 00:04:11 +00:00
Zuul
fdc57ba91f Merge "Move params from DocumentedRule to DeprecatedRule" 2021-03-25 22:56:20 +00:00
Zuul
4617e20e7b Merge "Fix wrong totalcount returned by share listing query" 2021-03-25 21:36:36 +00:00
Douglas Viroel
7f0737b75e [NetApp] Follow up fixes for update security service
This patch is a follow up of [1] to address some comments
added in the review process. It also adds more unit tests to
validate the new code added.

[1] https://review.opendev.org/c/openstack/manila/+/775032

Change-Id: If7b8628fa05200363a129eb19d9dc80fb7e3bc36
Signed-off-by: Douglas Viroel <viroel@gmail.com>
2021-03-25 17:50:24 -03:00
Zuul
0c577864fb Merge "[NetApp] Implement cached status pool" 2021-03-25 20:09:54 +00:00
Zuul
33d8603b13 Merge "Add create share from snapshot in CephFS" 2021-03-25 19:52:04 +00:00
Zuul
24d41e8887 Merge "scheduler should ignore earlier time service capabilities" 2021-03-25 15:51:03 +00:00
Ratnakaram Rajesh
643083eefa Support host assisted share migration for Zadara manila driver
Closes-Bug: #1917980

Change-Id: I66371e6a8a1650ffebe5ffe482cde52660ccc000
2021-03-25 17:17:34 +02:00
Eduardo Santos
3d65f46d3e Add exception for insufficient privileges when using security services
When trying to create a share using a security
service while having insufficient privileges or
providing wrong credentials, manila raises a
generic user message that provides little
information to the end user on what exactly went
wrong.
Added a driver-agnostic exception for when this
happens, accompanied with a user message to
provide more useful information to end users.

Partial-Bug: #1900755
Change-Id: I2b0bc5c0715c225cd5b38b55fb3967ff7fc86fa8
2021-03-25 14:45:53 +00:00
maaoyu
268686c448 Fix wrong totalcount returned by share listing query
This bugfix [1] modified the totalcount returned by pagination
query when the argument 'limit' was specified. It caused
manila to do not return precise count of shares in a query that
satisfied the conditions.

This bug has been fixed and now manila is returning the precise
values of shares matched in a given query. Also, manila is now
performing filtering actions in the database to have more
performatic results.

[1] https://review.opendev.org/#/c/688542/

Closes-Bug: #1860061

Co-Authored-By: Carlos Eduardo <ces.eduardo98@gmail.com>

Change-Id: I6ddd919bbd5180593cc52bf986912f65a2dab3a7
2021-03-25 08:47:22 -03:00
Zuul
4f41f86ad1 Merge "fix unmange share with manage_error status will lead to quota error" 2021-03-25 03:04:59 +00:00
Victoria Martinez de la Cruz
5c81264346 Add create share from snapshot in CephFS
Adds create share from snapshot functionality to
CephFS drivers.

Depends-On: https://review.opendev.org/c/openstack/manila-tempest-plugin/+/778188

Co-Authored-By: Victoria Martinez de la Cruz <victoria@redhat.com>
Co-Authored-By: Ramana Raja <rraja@redhat.com>
Co-Authored-By: Tom Barron <tpb@dyncloud.net>

DocImpact
Partially-Implements: blueprint create-share-from-snapshot-cephfs

Change-Id: I825ab15af934cb37dfda48ea26ec1af9de8dd293
2021-03-24 22:24:30 +00:00
Victoria Martinez de la Cruz
a830710939 Update cephfs drivers to use ceph-mgr client
Use python rados client to talk to the ceph-mgr service.

A python rados client is created by the driver that lasts
during the driver's lifecycle.

The drivers can now work with multiple filesystem clusters.
The filesystem to be used by manila can be specified by the
driver option 'cephfs_filesystem_name'.

The removal of a share will be quicker for the manila user.
The ceph-mgr volumes module moves the share's content to
a trash folder and purges the trash's contents
(`rm -rf` of the backend CephFS subvolume/subtree) aysnchronously,
whereas the ceph_volume_client library moves the share's content
and purges the content synchronously.

Implements: bp update-cephfs-drivers

Co-Authored-By: Victoria Martinez de la Cruz <victoria@redhat.com>
Co-Authored-By: Ramana Raja <rraja@redhat.com>
Co-Authored-By: Tom Barron <tpb@dyncloud.net>

DocImpact

Change-Id: I1f81db1ba7724c0784d87f9cb92bb696f6778806
2021-03-24 10:50:05 -04:00
Goutham Pacha Ravi
6f68d7e60f Move params from DocumentedRule to DeprecatedRule
Oslo policy moved "deprecated_*" parameters to the
DeprecatedRule object in [1] and deprecated it in
DocumentedRuleDefault object. Also bump oslo_policy
to the 3.7.0.

Similar change in neutron: https://review.opendev.org/781561
[1] https://review.opendev.org/766628

Change-Id: I14b215cdcd6458d67622360e4c910b3da1ae9848
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-03-23 16:56:48 -07:00
Zuul
7f6aa6dbd3 Merge "Fix generic share resize with 0.0.0.0/24 access" 2021-03-23 22:37:59 +00:00
Douglas Viroel
75acc51489 Remove unused model properties and increase unit test coverage
This is a follow up patch for [1] which removes some unused model
properties and add more unit tests to increase coverage.

[1] https://review.opendev.org/c/openstack/manila/+/774728

Change-Id: I10af132203cb07cea62839014925c7e4c99499e4
Signed-off-by: Douglas Viroel <viroel@gmail.com>
2021-03-23 09:27:48 -03:00
Zuul
50401393c7 Merge "[api-ref] Fix incorrect parameters" 2021-03-23 01:34:21 +00:00
Zuul
3ce8d978ad Merge "Put ensure_share into thread pool to speed up the startup of share service" 2021-03-22 12:33:04 +00:00
haixin
a8e25b858d Put ensure_share into thread pool to speed up the startup of share service
when we need to start or restart manila share service, will call
init_host().
and call ensure_driver_resources() in init_host(),
will call self.driver.ensure_shares or self.driver.ensure_share to
update all share instances in that host. Currently, only NetApp and LVM
implement self.driver.ensure_shares, Other manufacturers are using
self.driver.ensure_share.
   in large-scale environment, there are lot of share instances in one
host. this will lead to take much time to ensure_share.
   so we can put this operation into the thread pool to speed up the
startup of the service.

Closes-Bug: #1909847
Change-Id: I295d0de0958ebfedd89441f1a2c1b447b74693a0
2021-03-20 11:49:23 +00:00
haixin
73d0a74f3b fix unmange share with manage_error status will lead to quota error
if we failed to manage a share, we don't need to commit the quota usages. so
we should skip quota usages cuts when delete or unmange the share with
status of "error_manage". and the size of error_manage share should be
zero.

Closes-Bug:#1883506

Change-Id: I5c81dd6780890c55c8c6a92491c3f4f507531fdb
2021-03-20 10:45:23 +08:00
Goutham Pacha Ravi
163bda5fbe Disable some policy warnings
Recently, we updated the default check strings
for all API RBAC policies in manila. These policy
changes cause a lot of deprecation warnings in
the logs. In case a deployer never modified their
defaults and accepted service defaults, these
warnings aren't really helpful. If the deployer
did modify the default, these warnings are not
emitted. So we're in a bit of a pickle whether
these are helpful.

Other services [1][2][3] have made the decision
that these deprecated default check string
warnings aren't really helpful and actionable.

Further, any kind of oslo_policy deprecation
warnings aren't helpful during unit tests.
They fill up the logs and cause unnecessary
noise.

[1] openstack/nova: Iaa6baf6877890babb6205bdb3ee2e1a2b28ebd9c
[2] openstack/neutron: Iab3966bad81b469eccf1050f0e0e48b9e2573750
[3] openstack/placement: I2853c7bd7c0afdeeed89ef412fc8830f04381d7b

Change-Id: I08de69312016389f2b4c88f2adbd749dbe4d3261
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-03-19 17:53:49 -07:00
Elias Wimmer
2586252606 Fix generic share resize with 0.0.0.0/24 access
Add missing quotes to exportfs command to protect <world> being
interpreted as file redirect

Closes-Bug: #1911695
Change-Id: Ie95a476e9a81c58df998c3f44da137b023b53cc6
2021-03-19 13:18:38 +01:00
Zuul
398c849acc Merge "Fix inconsistent ordering caused by low datetime precision." 2021-03-18 17:41:36 +00:00
Goutham Pacha Ravi
f24fff9522 Filter storage protocol in the scheduler
The share protocol requested was being
ignored by the scheduler and this would
cause shares to get scheduled to hosts
that don't support the specified protocol.

Change-Id: I2e87264865b645781c481383c039fecbfd7c6eb1
Closes-Bug: #1783736
2021-03-17 18:18:56 -07:00
Felipe Rodrigues
b2e1797889 [NetApp] Implement cached status pool
In order to optimize the NetApp ONTAP driver, this patch is caching
the status of driver pools and reusing for the each share server,
given that the pool is not separated by share server.

The option `netapp_cached_aggregates_status_lifetime` is added
for controlling the time that the cached values is considered
valid.

Closes-Bug: #1900469
Change-Id: I14a059615fc29c7c173c035bb51d39e0bbb8b70a
2021-03-17 19:09:00 -03:00