5495 Commits

Author SHA1 Message Date
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
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
Zuul
1261576a68 Merge "PowerMax Manila - version change for Wallaby" 2021-06-24 21:13:55 +00:00
Goutham Pacha Ravi
04e06968fd Handle service client authorization errors
Authorization errors when connecting
to nova/glance/neutron/cinder can be raised as
BadConfigurationExceptions in the logs. We shouldn't
be raising exceptions derived from the service client
libraries.

Change-Id: I2d47dbb1251dfa8d529f813724fb7fd97d7d3a0b
Closes-Bug: #1921927
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-06-24 15:45:04 +00:00
Tom Barron
a4765cff1e Remove duplicate line in release note
Goutham noted in review [1] that there is a duplicate line in a recent
release note, so let's remove it.

[1] https://review.opendev.org/c/openstack/manila/+/745206/9/releasenotes/notes/remove-deprecated-options-and-auth-4d497e03ad47e872.yaml@161

Change-Id: I59908509fc6714e6f0db1fdda27171a9390c4411
2021-06-22 07:22:38 -04:00
Zuul
d26351bc0c Merge "[doc] clean up compute client options" 2021-06-22 01:47:00 +00:00
Zuul
fca72a2d23 Merge "Remove deprecated config and auth" 2021-06-22 01:46:56 +00:00
Kafilat Adeleke
4fbacf1df1 Filter shares by share type "extra_specs"
This change fixes the query being used to filter share
types. We were using an "or" clause instead of an "and" clause,
and that was causing all the extra specs to be shown instead of
the ones that the user specified. With this fix, manila users will
be able to filter shares by share type extra_specs accurately.

Closes-Bug: #1929121

Change-Id: I5cf9788dcafebdf88426617d2824f4be42dbb412
2021-06-21 16:43:07 +00:00
Dina Saparbaeva
205f3d828d fixes availability zone filter when creating a share from snapshot
Fixes bug #1915706 that was discovered in  Manila UI.
Issue is invalid input error being raised, even when
availability_zone provided is the same, as parent share's.
The reason is availability_zone is name and source_share_az
is id in the filter [1]. Now, regardless of availability_zone
provided is id or name, it will be always converted to a name.
And if availability_zone is the same as parent share's
operation will complete successfully.

[1] 2e27c71877/manila/share/api.py (L200)

Closes-Bug: #1915706
Change-Id: I5039b7adf563d926053b423a4cc6e175d3f1e5cf
2021-06-18 15:52:52 +00:00
Maurice Escher
0339802a5d init_host should be called before RPC consumer is created
This change adds a new hook to Manager class called init_host_with_rpc()
to allow services like scheduler to do something once RPC is ready.

Copied from cinder 65fa80c361
and 60c563f72d

Change-Id: Iac6507a6e395c55f0fec453650009f08c2bb6563
Closes-Bug: #1271568
2021-06-17 07:22:44 -04:00
Elod Illes
4bfea794d7 Fix PDF build
With newer sphinx the pdf build fails and gives the following error:

! Dimension too large.

This could be memory issue, that can be fixed by not generating the
sample_policy file as that can be large.

This patch also sets back the tox-docs job as voting.

Closes-Bug: #1918707
Change-Id: I4f22fe7b45394045f672d5bbd3b46c4e5e4b2fd3
2021-06-11 21:06:09 +02:00
wu.shiming
9974f047b9 Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: I21ea71b539a6ec35670152e427a7ef6d28863e2e
2021-05-31 02:00:58 +00:00
songwenping
fac7fc52eb Remove references to sys.version_info
We support Python 3.6 as a minimum now, making these checks no-ops.

Change-Id: I01cc9c8a6e3cf0244806dc739743ecd1dee3dc22
2021-05-28 15:40:54 +08:00
Goutham Pacha Ravi
865aac4ace Update IRC references
OpenStack community is moving irc servers [1][2]
by 31st May 2021. Since we refer to freenode by name
in a couple of places, we can change those to point
to OFTC, the new hub.

[1] http://lists.openstack.org/pipermail/openstack-discuss/2021-May/022718.html
[2] http://lists.openstack.org/pipermail/openstack-discuss/2021-May/022724.html

Change-Id: Ic54ab0c40deb5ac0c519f9e4e54298eee6284c32
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-05-27 09:58:46 -07:00
kpdev
df3382d960 Add documentation for per share gigabytes quotas
Update documentation to fit into the new manila quota key:
- `per_share_gigabytes`

Closes-Bug: #1918959
Change-Id: If0bbac2d153348f26f5b60cba3eb492926aa53c5
2021-05-24 09:18:31 +02:00
Goutham Pacha Ravi
3b6ea36904 [devstack] Drop manila-tempest-plugin installation
This method of installing manila-tempest-plugin
was deprecated several releases ago, but compatibility
was maintained for third party CI jobs. Since sufficient
time has passed allowing third party CI to adopt,
lets drop this from the devstack plugin

Change-Id: I59ffe6ebe4b2e80be1e6ae97872cf4db6527da62
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-05-21 10:18:56 -07:00
Zuul
94bdfc8490 Merge "Fix with_entities usage in db queries" 2021-05-21 07:30:02 +00:00
Zuul
1ebc1f9868 Merge "Replace deprecated SQLAlchemy "with_lockmode"" 2021-05-20 19:39:11 +00:00
Goutham Pacha Ravi
6ace54c260 Fix with_entities usage in db queries
In order to retrieve shares with filters
pertaining to separate tables (shares, instances, metadata,
etc), we need to perform joined loads of those
respective database tables as necessary. After the
join, the query cannot select entities due to
Github issue #6253 - The following is an error when
the pattern is used:

sqlalchemy.exc.ArgumentError: Query has only expression-based entities - can't find property named "share_metadata".

sqlalchemy 1.4 has a performance improvement that
delays query processing [2] and disallows this
pattern of usage; we can use a query.count() instead.

In another instance, we can perform joins selectively
only if asked for.

[1] https://github.com/sqlalchemy/sqlalchemy/issues/625
[2] https://docs.sqlalchemy.org/en/14/changelog/migration_14.html#many-core-and-orm-statement-objects-now-perform-much-of-their-construction-and-validation-in-the-compile-phase

Change-Id: I8aa196c171bbc224cec06f517ea22c4e91cbc06a
Closes-Bug: #1926399
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-05-20 10:32:21 +00:00
Fabio Oliveira
95d60c0d48 Fix API reference of share snapshot creation
Changes HTTP response status code from 200 to 202.

Closes-Bug: #1928055
Change-Id: Iae7787cc4f8d8306649a24e619024a9ca9bb20f7
2021-05-19 15:34:25 -03:00