5457 Commits

Author SHA1 Message Date
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
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
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
Goutham Pacha Ravi
cadfe04b1f Replace deprecated SQLAlchemy "with_lockmode"
This method was deprecated in sqlalchemy 0.9 [1][2]
and finally removed in version 1.4, which we'll
be adopting very soon [3]. No end-user impact is
expected, we're using a rudimentary form of the
new "with_for_update" method.

[1] https://docs.sqlalchemy.org/en/13/changelog/migration_09.html?highlight=with_lockmode#new-for-update-support-on-select-query
[2] https://docs.sqlalchemy.org/en/13/orm/query.html#sqlalchemy.orm.query.Query.with_lockmode
[3] http://lists.openstack.org/pipermail/openstack-discuss/2021-April/022094.html

Change-Id: I0a3a89bd0741f6f91c39baaa68149551d8f4ce54
Partial-Bug: #1926399
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-05-18 18:58:16 -07:00
Zuul
37c43a1201 Merge "Fix api error message for snapshot creation failure" 2021-05-13 19:55:54 +00:00
Tom Barron
be29805859 Fix api error message for snapshot creation failure
when the source share has ``snapshot_support`` False.

The message said that the back end lacks snapshot support but this
is not necessarily the case.

Closes-bug: #1925342
Change-Id: I09a83b63528c0988f3601dfd07ad6972165cb855
2021-05-12 12:24:13 +00:00
Zuul
80460424e0 Merge "optimize share size check" 2021-05-11 00:53:15 +00:00
Zuul
ef07f7f271 Merge "Drop support for SQLite < 3.7" 2021-05-05 15:36:49 +00:00
dengzhaosen
6185e66056 Drop support for SQLite < 3.7
Both Ubuntu 18.04 [1] and CentOS 8 [2] provide sufficiently new versions
of SQLite that make this check unnecessary now.

[1] https://packages.ubuntu.com/bionic/sqlite3
[2] http://mirror.centos.org/centos/7/os/x86_64/Packages/

Change-Id: I49fec5b9521f292df38c54bf5ddcb993d2e13d5c
2021-05-05 01:44:05 +00:00
Zuul
780fe0e6de Merge "setup.cfg: Replace dashes with underscores" 2021-05-05 01:12:55 +00:00
haixin
2cdcc5cf2b optimize share size check
Change-Id: I1685e92a2e1baccbbefde31a4b28046768846eec
2021-05-05 00:03:48 +00: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
haixin
59842d6a24 setup.cfg: Replace dashes with underscores
Resolves warnings like the following:

  UserWarning: Usage of dash-separated 'description-file' will not be
  supported in future versions. Please use the underscore name
  'description_file' instead

Change-Id: Ia9d7069b46b0a2569665a70223e015428b978381
2021-04-27 14:09:19 +08:00
Tom Barron
5af3b8e68b Remove deprecated config and auth
Remove manila configuration options
and auth classes that were deprecated
before the Ussuri release.

Change-Id: I148225926cd249a0dd8d1f8c02b22ed06487f405
2021-04-26 11:53:58 -04: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