5513 Commits

Author SHA1 Message Date
Nahim Alves de Souza
a745e9c7c4 [NetApp] Fixed scoped account replica delete
In the ONTAP 9.8 and older, there is a bug in the zapi call
`snapmirror-release-iter` when using the scoped account
configuration. The operation is returning success, but the release
is not occurring.

To avoid this issue, the Netapp driver was changed to release with
the `snapmirror-release` zapi call, instead of the one that has a
bug. This new zapi call requires the field `relationship-id` to be
specified and it is being retrieved from ONTAP before calling it.

A small fix, not related to the bug, was made in the zapi call to
`snapmirror-release-iter` because the `relationship-info-only`
field was in the wrong place according to the documentation.

Closes-Bug: #1934889
Change-Id: I21633d4ffe14983365b0b6239216ed5d0bbfaace
2021-08-27 18:41:36 +00:00
Zuul
de785fea87 Merge "Add missing [oslo_reports] options" 2021-08-27 10:28:41 +00:00
Zuul
1d95424dd6 Merge "Add missing oslo.service options" 2021-08-26 23:33:18 +00:00
Zuul
f11da50917 Merge "Change cifs value from string to list for Dell manila drivers" 2021-08-26 22:55:02 +00:00
Zuul
fb154955d5 Merge "Use oslo-config-generator conf to load options from libraries" 2021-08-26 18:43:36 +00:00
Zuul
6af91d4da6 Merge "[Pure Storage] Honour the share_name_template parameter" 2021-08-24 18:11:04 +00:00
Takashi Kajinami
3f97376cd0 Add missing [oslo_reports] options
The oslo.reports library provides some options under the [oslo_reports]
section. This change ensures these parameters are rendered by
the oslo-config-generator command.

Closes-Bug: #1940733
Change-Id: I5e30ef458bccb0921ce77b2d9ef875bec72d0619
2021-08-21 08:33:47 +00:00
Takashi Kajinami
c1eaf108f8 Add missing oslo.service options
Closes-Bug: #1940734
Change-Id: I42d76c7a085e3ded04b45f89469b4b66d6a426ce
2021-08-21 08:33:32 +00:00
Sam Wan
5bd44e0be3 Change cifs value from string to list for Dell manila drivers
Dell manila drivers use string as value for 'cifs' in
dhss_mandatory_security_service_association.
This fix changes it to a list.

Change-Id: I0c64e574301baf2a41a475af3b3848cbec8d495f
Closes-Bug: #1940072
2021-08-18 09:17:12 +08:00
Takashi Kajinami
7f35a177d3 Use oslo-config-generator conf to load options from libraries
... instead of importing library modules just to load options.

Change-Id: I55270b330d1fe98817df4d419e8c26c90440e3a6
2021-08-14 23:43:22 +09:00
Zuul
f56a326da8 Merge "Add generic fuzzy matching logic to the database layer" 2021-08-13 04:05:28 +00:00
Simon Dodsley
e6e4ac26b7 [Pure Storage] Honour the share_name_template parameter
No release notes required as this driver has not yet been included
in a release and all we are doing here is honouring the standard
share naming template that is documented elsewhere.

Change-Id: Id62bbfe23319f6941f37ce5eb72b511ee1bf4ebf
2021-08-12 10:29:56 -04:00
kpdev
18668d2465 Early validate for CIFS without security service.
To create a share with protocol CIFS it is mandatory to add a security
service to the share network beforehand. If this is forgotten the share
ends up in error. Validate the security service association based on
share protocol from given driver. Raise invalid request exception if
needed association between share_network and security_service is
missing for given driver e.g. ONTAP.

DocImpact

Closes-Bug: #1900752
Change-Id: Ib7e9850e6439ee5d04f826d129afb1ab06950ce7
2021-08-05 22:44:55 +02:00
Zuul
8adba915a5 Merge "Deprecate create snapshot from share group in CephFS" 2021-08-05 18:24:03 +00:00
Zuul
82cd57c413 Merge "Use tox 3.1.1 fixes" 2021-08-02 15:46:21 +00:00
Stephen Finucane
c409caae79 Use tox 3.1.1 fixes
By 3.1.1, tox had fixed:

- [1] which mishandled the basepython directive.
- ignoring PYTHONDONTWRITEBYTECODE [2]

Require this version and remove the workarounds.

See ML thread [3] for some details

[1] https://github.com/tox-dev/tox/issues/477
[2] 336f4f6bd8
[3] http://lists.openstack.org/pipermail/openstack-dev/2018-July/thread.html#132075

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Idcb204a0dcda92f2bd8cbae37d510d5993c739fe
2021-07-29 10:16:59 +01:00
haixin
e032c13bfb Add generic fuzzy matching logic to the database layer
share snap list, Fuzzy query by name or description is supported, but
the current implementation is first get all the shares, then In the API
layer, the for loop is used to achieve fuzzy matching, if the num of
shares is big,
It will seriously affect the speed of fuzzy matching.Therefore, we
should let the database do the matching to speed up the query.
Moving the pagination params (limit, offset, sorting) to the database
layer for snapshot list, to optimize query speed.

Closes-Bug:#1881865
Partial-Bug:#1831094

Change-Id: I283e78c9e7c2dd626d94cf6c1b01d4e2f9ae8097
2021-07-29 15:07:52 +08:00
Zuul
3457fc62f9 Merge "Update api-ref documentation" 2021-07-28 22:25:39 +00:00
Zuul
23aaa564a2 Merge "Add missing share-type user message" 2021-07-28 22:25:37 +00:00
Zuul
e01d327d36 Merge "Add documentation for per share gigabytes quotas" 2021-07-28 20:21:11 +00:00
Stephen Finucane
46f47a3f95 tests: Remove use of 'oslo_db.sqlalchemy.test_base'
The various test cases and mixins in 'oslo_db.sqlalchemy.test_base' have
been deprecated since oslo.db 4.34.0 (March 2018). Remove use of these.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I67eff8c9733500813435cde2dbda28a3c4a3ccf3
2021-07-28 18:07:56 +01:00
ashrod98
bf2c40e3ff Update api-ref documentation
Adds message id, expires_at, created_at parameters to user messages in
response body.

Updates share_types response body to account for extra_specs object including
snapshot_support, create_from_snapshot_support, mount_snapshot_support,
revert_to_snapshot_support, replication_type, and
driver_handles_share_servers.

Change-Id: I408dcf5fdbf2f12eb1dc0ce80232d4e710cef765
2021-07-28 14:21:20 +00:00
Zuul
a3f0b7eb18 Merge "Add Pure Storage FlashBlade to Manila Admin docs" 2021-07-27 21:08:56 +00:00
Zuul
ca9213ef40 Merge "Pass sync_backref=False to relationship call" 2021-07-23 21:12:20 +00:00
Zuul
7bbc9c2b36 Merge "Replace deprecated scheduler filter module name" 2021-07-23 20:38:16 +00:00
Takashi Kajinami
87382e1417 Replace deprecated scheduler filter module name
manila.scheduler.filter_scheduler.*Scheduler was deprecated long ago[1]
in favor of new manila.scheduler.drivers.filter.*Scheduler.

[1] 3ffb4979f328259793079a5ece6f3b79e23f5187

Change-Id: I40349cbe106f688a67043a73f8563f87f069831b
2021-07-23 21:20:00 +09:00
Takashi Kajinami
727da0ffa9 Use List for allowed_origin
... to get rid of the following warning in unit test jobs.

DEPRECATED: The `allowed_origin` keyword argument in `add_origin()`
should be a list, found String.

Change-Id: I6265fa1bea2c05d9b46f45802e8766d702ae1ff7
2021-07-23 20:43:07 +09:00
Simon Dodsley
40ed0dd1df Add Pure Storage FlashBlade to Manila Admin docs
Change-Id: I1b6544c06149138d59a8ffd16c30942d323a5d27
2021-07-22 15:39:55 -04:00
Zuul
82ea5d5680 Merge "Replace deprecated import of ABCs from collections" 2021-07-22 17:07:30 +00:00
Victoria Martinez de la Cruz
cf4af61638 Deprecate create snapshot from share group in CephFS
Deprecate the create snapshot from share group feature
in CephFS drivers (both Native and NFS Ganesha).

This needs to be done since the subvolume group snapshot
feature is no longer supported in mainline CephFS, meaning that,
if we leave the call in place, an exception will be raised
from the backend and lead to an error status for the attempted
snapshot from share group.

Existing group snapshots can still be listed and deleted, so these
operations stay the same.

Closes-Bug: #1925332
Change-Id: I49efb7042d38257416875f40c03923e974b2eb8e
2021-07-19 14:50:05 +00:00
Takashi Kajinami
c03f96ffae Replace deprecated import of ABCs from collections
ABCs in collections should be imported from collections.abc and direct
import from collections is deprecated since Python 3.3.

Closes-Bug: #1936667
Change-Id: Ie82a523b4f8ab3d44d0fc9d70cb1ca6c059cc48f
2021-07-17 12:20:17 +09:00
Zuul
1a39505039 Merge "Add Pure Storage FlashBlade driver" 2021-07-16 18:49:03 +00:00
ashrod98
657fa5b113 Add missing share-type user message
Attempting to create a share without identifying a share type results in an
error.This adds a user message informing the user that no default share type
was identified while attempting to create a share.

Closes-Bug: #1870280

Change-Id: Ib417499d4394b939eb289460ac8dbb6b22d789f4
2021-07-15 14:11:02 +00:00
Zuul
90beed8694 Merge "Replace assertDictMatch with assertDictEqual method in tests" 2021-07-14 11:06:18 +00:00
songwenping
8ee8ee15b1 Replace assertDictMatch with assertDictEqual method in tests
assertDictMatch was introduced for Python 2.6 only.
Python 2.7+ contains assertDictEqual.

Closes-Bug: #1646433
Change-Id: I41738cc0bd90656508fc6ff390072b55130cc6fc
2021-07-14 01:32:08 +00:00
Chuan Miao
e5d0c0e77a Pass sync_backref=False to relationship call
Need to bump the lower-constraint of sqlalchemy
to a version where 'sync_backref' was introduced [1]

[1] https://docs.sqlalchemy.org/en/13/orm/relationship_api.html#sqlalchemy.orm.relationship.params.sync_backref
Change-Id: I589281d8e77a160adcd48b8d3e4951441f843463
Closes-Bug: #1924806
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-07-13 17:26:39 -07:00
Zuul
6c329e1a80 Merge "Replace oslo_utils.fnmatch with fnmatch" 2021-07-07 20:19:30 +00:00
Takashi Kajinami
52f2ebe6e3 Replace oslo_utils.fnmatch with fnmatch
The oslo_utils.fnmatch module was added to solve an issue in py2.7 but
it is no longer required because py2.7 is no longer supported.
The module was deprecated since oslo.utils 4.9.1[1] and the stdlib's
fnmatch module should be used instead.

[1] 4c893c92f551c9dd2a7cfbe7ae8171ad8139df0b

Change-Id: Ie1601bfe79f744c553c25d7724cc9bf1894bc59b
2021-07-06 21:23:09 +09:00
Zuul
a2d30e215e Merge "Filter shares by share type "extra_specs"" 2021-07-06 09:06:21 +00:00
Zuul
559f7f7097 Merge "fixes availability zone filter when creating a share from snapshot" 2021-07-05 14:44:55 +00:00
Zuul
35af72a875 Merge "init_host should be called before RPC consumer is created" 2021-07-03 04:29:54 +00:00
Zuul
5c32178501 Merge "Handle service client authorization errors" 2021-07-02 14:08:29 +00:00
Zuul
b8be5f7f11 Merge "Fix ipaddress issues in the infinidat driver" 2021-07-02 00:54:34 +00:00
Goutham Pacha Ravi
1161a56a74 Fix ipaddress issues in the infinidat driver
In python3.8.11 and python3.9.6, the behavior of the
ipaddress.ip_network.hosts() method changed. Now /32
addresses are returned by that method as a single
element list. This was apparently done as a bugfix [1]

Change-Id: Iab6d96351fa21131d834ccf07ffddd70555f25a7
Closes-Bug: #1934345
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
[1] https://bugs.python.org/issue27683
2021-07-01 10:31:02 -07:00
Zuul
f580fbc533 Merge "TrivialFix: Fix the filter name in config helper" 2021-06-30 14:48:31 +00:00
paulali
daf7b3aacf Adds a clear error message to operator-set limits
When an operator sets a limit that is greater than 2147483647, an
explicit error message "Quota limit should not exceed 2147483647"
is communicated. This is better than the initial error message
which was "ERROR: The server has either erred or is
incapable of performing the requested operation. (HTTP 500)."

Closes-Bug: #1908352
Change-Id: I0d301c5f527c3e16e14021b679c85bd51833a1d6
2021-06-29 12:05:49 +00:00
Zuul
329e8528e1 Merge "Add Ceph version check" 2021-06-26 22:43:04 +00:00
Felipe Rodrigues
854b1dc958 TrivialFix: Fix the filter name in config helper
The config `use_scheduler_creating_share_from_snapshot` has the
help message with wrong name of the scheduler filter that the user must
enable with the option. The filter name is `CreateFromSnapshotFilter`,
instead of `CreateShareFromSnapshot`.

Change-Id: I3e6170f8def53aabd4bc5858fa297061e2873477
2021-06-26 13:47:50 -03:00
Simon Dodsley
9eb37eca8b Add Pure Storage FlashBlade driver
Change-Id: I8de380bca1b55d4d0ee44a5e5d052a7dced467df
2021-06-25 23:38:10 -04:00
Victoria Martinez de la Cruz
3ed02db00e Add Ceph version check
CephFS drivers in OpenStack Manila are directing
mgr commands to the mgr by specifying mon-mgr as
the target [0]. This target (mon-mgr) was added
to Ceph in Octopus [1].

We would need a version check in order to set the
correct target while we wait on the backport on Ceph
to land [2].

[0] 3ea5d50a23
[1] 4000d500c0
[2] https://tracker.ceph.com/issues/51039

Closes-Bug: #1930459
Change-Id: I1a1079df8e104c5ddba29cb614eb4e02a304082e
2021-06-25 22:10:05 +02:00