6447 Commits

Author SHA1 Message Date
Kiran Pawar
052e324e26 decorate all missing *_update methods with db_retry on deadlock
Share instance records and their relations were missing db_retry and
so added the db_retry decorator.

Co-Authored-By: Maurice Escher <maurice.escher@sap.com>
Closes-bug: #2084529
Change-Id: Iac0bee438365ab0902859df74647f1502c619270
(cherry picked from commit b64e5a35e1067976de3c92372476582b4d99a3ac)
2024-11-21 12:05:42 +05:30
Takashi Kajinami
a1706e52a1 devstack: Fix missing manila command
Ensure manila command is available in PATH when GLOBAL_VENV is True.
This is required to fix the grenade job which still used manila
commands.

Change-Id: I2445bbc3769e283aaaef76803b2b9630279def91
(cherry picked from commit 35c6ca5e208e1f5bee8aad1013c5bd401bc41aec)
2024-10-21 18:14:40 +00:00
Zuul
286ef4d041 Merge "Python 3.13: do not use removed module "pipes"" into stable/2024.2 19.0.1 2024-10-10 22:00:58 +00:00
Zuul
b0b6adadd1 Merge "Update share/snapshot instance deferred deletion" into stable/2024.2 2024-10-10 11:58:47 +00:00
Cyril Roelandt
ca727d4f48 Python 3.13: do not use removed module "pipes"
This module has been removed in Python 3.13. There is no change in
functionality:

$ python3
Python 3.12.4 (main, Jun 12 2024, 19:06:53) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import shlex, pipes
<stdin>:1: DeprecationWarning: 'pipes' is deprecated and slated for
removal in Python 3.13
>>> shlex.quote == pipes.quote
True

Change-Id: I4c364239163d481970f16947931b82a6a25b868e
(cherry picked from commit e28bb5905ea2cddbbef523d94d0ca1efb3550fbf)
2024-10-08 15:12:34 +00:00
Zuul
8262b28fff Merge "[doc] Driver updatable metadata" into stable/2024.2 2024-10-02 21:47:52 +00:00
Carlos Eduardo
bf3a83b46c Add CephFS Manage/unmanage documentation
- Updates the drivers support matrix
- Updates the CephFS drivers documentation and highlight how the
process works and what are the known limitations.

Change-Id: I2f937358e93271fc5ad63e76cc4a9c5aa0ba3017
(cherry picked from commit 4fe2b014e52d095d333e4cdb7ffb3269974bde43)
2024-10-02 21:15:01 +00:00
Kiran Pawar
fdfa6d6728 [doc] Driver updatable metadata
Updates to the end user, which allows them to specify metadata items
that should be passed to backend share drivers. Share driver may take
needed action from provided metadata if supported.

partially-implements: blueprint pass-resource-metadata-updates-to-backend-drivers
Change-Id: If595af5910706582165c11c30e73766c208f9b4e
(cherry picked from commit debec4378552fa991fccd4cc761299c70ed81f99)
2024-10-02 21:14:54 +00:00
Kiran Pawar
c78042bf99 Update share/snapshot instance deferred deletion
- Deferred deletion would be regular deletion where quota is freed
  before resource deletion by driver and deletion states are hidden
  from end-user. Also, everything will be handled by Manila or admin
  if any error occurs in deletion.
- Any error during deferred deletion will put share/snapshot in
  error_deferrer_deleting state and periodic task will handle it.
- count_share_group_snapshot_members_in_share() should not return share
  instances in deferred deletion states as those shares are hidden from
  end-user once deferred deleted. Only actual deletion (by driver) will
  make sure snapshot instance of share instance should be deleted before
  share instance deletion.

partially-implements: bp/deferred-deletion
Closes-bug: #2068043
Change-Id: Ie827619d3952d1db69559206b5dfd47efb4cf7b1
(cherry picked from commit e8f086d0f58608a2ff04958af668538e0ed5f7be)
2024-09-27 09:05:04 +05:30
Zuul
8c57c7a46f Merge "Fix "preferred" export locations in the CephFS driver" into stable/2024.2 19.0.0.0rc2 19.0.0 2024-09-26 19:51:26 +00:00
Zuul
c9098c8505 Merge "Fix export location metadata updates by drivers" into stable/2024.2 2024-09-26 19:51:24 +00:00
Goutham Pacha Ravi
620933cdb9 Fix "preferred" export locations in the CephFS driver
The CephFS driver used to set the "preferred"
export path by sending back an export location
model update; however, the "preferred" keyword
is expected in the export location's metadata,
not in the export location dict.

Change-Id: Id2214412fe75456cdb52edb5ff261d32b063655f
Closes-Bug: #2053100
(cherry picked from commit 17088aa57af3ae2dd5a16e2e8558ec471d2c1cc5)
2024-09-26 15:27:36 +00:00
Carlos Eduardo
7fd6a54e42 Remove extra policy check
This is a follow-up change to the ensure shares APIs [1]. An
additional policy check was added, but it was not needed, as it
was already being performed by the decorator, so we remove it.

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

Change-Id: Iab25d5a6a3906dfdb1cb3473188edcc5fafc80d4
(cherry picked from commit 697c9bf3d34b4eb291158c99ae859da10a0c2c59)
2024-09-19 15:12:55 +00:00
Goutham Pacha Ravi
ffa4233b9c Fix export location metadata updates by drivers
Drivers can set arbitrary key=value metadata to export
paths. The share manager now checks updates to previously
set metadata when drivers update this metadata with the
"ensure_shares" routine.

Change-Id: Ia42de608ba056d71a1deae2c59bfb43a11672ab7
Partial-Bug: #2053100
(cherry picked from commit 3e9d535be1799a2f2d590537125e3b7630dc4aee)
2024-09-13 21:03:20 +00:00
5b58f34534 Update TOX_CONSTRAINTS_FILE for stable/2024.2
Update the URL to the upper-constraints file to point to the redirect
rule on releases.openstack.org so that anyone working on this branch
will switch to the correct upper-constraints list automatically when
the requirements repository branches.

Until the requirements repository has as stable/2024.2 branch, tests will
continue to use the upper-constraints list on master.

Change-Id: Ie0440ab04538952a0d2e857520b434951e56d242
2024-09-13 11:11:27 +00:00
7fc6b8008a Update .gitreview for stable/2024.2
Change-Id: If5cfd539cd5be98fe20e86950a5fbe1a37f4c7d4
2024-09-13 11:11:26 +00:00
Zuul
8c326be9db Merge "Fix export locations update when subnet is added" 19.0.0.0rc1 2024-09-11 16:25:17 +00:00
Zuul
00453ceff5 Merge "[api-ref] fix resource lock api reference" 2024-09-11 11:02:19 +00:00
Sylvan Le Deunff
07ce64462c
Fix export locations update when subnet is added
Export locations of active share replicas was updated
but not those of the share itself.

Closes-Bug: #2017501
Change-Id: I33204657401f3eadd490fc50fedaef899dcff297
2024-09-11 11:26:41 +02:00
Zuul
1ffa0c1273 Merge "svm migration across physical networks with multiple port bindings" 2024-09-10 19:05:10 +00:00
Gireesh Awasthi
2439d95993 Fix the remaining review comments from SnapLock patch
This is follow-up patch to fix the few left over comment from
patch https://review.opendev.org/c/openstack/manila/+/926049

Closes-Bug: #2079967
Change-Id: I275a3680d3ea6b1b1ea69d78d4b7fecb4f61af03
2024-09-10 01:23:00 -04:00
Goutham Pacha Ravi
2c90e59924 [api-ref] fix resource lock api reference
"delete" was the only lock action supported when
we introduced the API; but we now support "show"
as well for the access rules resource.

Also fix an incorrect parameter in the PUT /resource-locks
method.

Change-Id: Ie276d9c984586ad5b90581e46796d390f748ce1f
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2024-09-09 15:15:09 +00:00
Zuul
84ab5df84a Merge "Metadata for Share Export Location" 2024-09-06 13:30:01 +00:00
Zuul
6f647e9923 Merge "Fix broken release note rendering" 2024-09-06 05:50:36 +00:00
Takashi Kajinami
911ee65976 Fix broken release note rendering
The line appears in the built note with heading "-|" because of too
many spaces.

Change-Id: I25b3f82164145e8198338df8b394de61fdddb475
2024-09-05 21:24:07 +00:00
Zuul
9f14833900 Merge "[NetApp] SnapLock support for NetApp driver" 2024-09-05 20:07:48 +00:00
Zuul
1ef73c3acc Merge "[NetApp] Fix FlexGroup share creation while configuring dedup/compression" 2024-09-05 16:04:26 +00:00
agireesh
0892de04f6 [NetApp] SnapLock support for NetApp driver
The NetApp ONTAP driver now supports the SnapLock feature. New
capability 'netapp_snaplock_type' has been added to the backend pool
to create and schedule shares on the required WORM-supported pool.
Extra spec, 'netapp_snaplock_type', can be used to create SnapLock
volumes. Additionally, extra specs related to the SnapLock retention
period have been introduced to set the retention period on SnapLock
volumes.

Implements: blueprint snaplock-support-for-manila-driver
Change-Id: I73c4d027852fbfbbdab59538cbe23ba1487da0de
2024-09-05 20:26:15 +05:30
Clifford
2016062027 Metadata for Share Export Location
This patch adds support for Share Export Locations in the
Metadata Controller.

Co-Authored-By: Ashley Rodriguez <ashrod98@gmail.com>
Partially-implements: bp metadata-for-share-resources
Change-Id: Icf096a5cbc650f02eca68d714c876eb854499b9b
2024-09-04 20:58:12 +00:00
Zuul
d643c2601d Merge "[NetApp] Custom storage efficiency policy support for Manila share" 2024-09-04 19:29:12 +00:00
Chuan Miao
7085a3eaf1 svm migration across physical networks with multiple port bindings
This patch provides the support for share server migrations between
different physical networks. It is achieved by creating an inactive port
binding on the target host during share server migration, and then cut
it over to target host when migration completes. The implementation is
driver agnostic, so this feature should be not limited to specific
driver, although it is only tested against NetApp driver. The feature is
enabled by a new share service option
'server_migration_extend_neutron_network'. The support for multiple
binding Manila ports is added in Neutron's 2023.1 release.

Closes-Bug: #2002019
Change-Id: I18d0dd1847a09f28989b1a2b62fc6ff8f8155def
2024-09-04 10:17:25 +02:00
Zuul
cf0fb1e747 Merge "Lock shares when creating a locked access rule" 2024-09-04 07:50:11 +00:00
Zuul
c8a893eb64 Merge "Add json and yaml formatting to manila-manage" 2024-09-04 07:21:08 +00:00
Zuul
97bf510bc0 Merge "API for ensure shares" 2024-09-03 23:49:10 +00:00
Zuul
7ec665716b Merge "Remove default override for RBAC config options" 2024-09-03 22:00:14 +00:00
jayaanand borra
43538613ee [NetApp] Custom storage efficiency policy support for Manila share
This change introduce a new extra spec netapp:efficiency_policy
where the user can specify a pre-created NetApp efficiency policy
from share located share-server. During share creation, User specified
efficiency policy can be applied to the FlexVol/FlexGroup volume that
corresponds to the Manila Share.
Blueprint: manila-netapp-efficiency-policy

Change-Id: I1ebc1b8ac6d70c4f525593d0fc75aa0cae2b22bf
2024-09-02 11:37:37 -04:00
OpenStack Proposal Bot
09a8d2a03f Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I30c8c10361e7209ed2ec5eee947316363cd96762
2024-09-02 03:37:00 +00:00
Carlos Eduardo
101becf9b4 API for ensure shares
Introduces a new API to allow OpenStack administrators to start
the share manager's ensure shares operation.

Also, introduced a new configuration option named
`update_shares_status_on_ensure`, so administrators can define
whether the shares status should be updated during the ensure
shares operation or not.

A new column was added to the services table, named `ensuring`.
Through this field, we can identify whether there is an undergoing
ensure shares operation or not.

Closes-Bug: #1996793
Partially-Implements: bp ensure-shares-api
Change-Id: If7bf059eb8581f20a3ceb7c1af93558774f4ef5e
2024-08-30 15:51:35 -03:00
silvacarloss
861a67193b Add json and yaml formatting to manila-manage
Add the possibility to specify how the data will be displayed
while issuing the manila-manage command. This can be helpful to
automations,

Change-Id: I0af426254be886e31553275feb23b9ec90ec2cc8
2024-08-30 13:41:35 -03:00
Zuul
7fff380047 Merge "Allow scheduling to disabled manila-share host" 2024-08-30 10:22:50 +00:00
Zuul
a2a6f278f3 Merge "Manage/unmanage for CephFS drivers" 2024-08-30 06:46:37 +00:00
Kiran Pawar
203a5e325f Allow scheduling to disabled manila-share host
- Only allow to admin user and with 'only_host' scheduler hint

In all other cases, scheduler will ignore disabled host. Please note,
'disabled' host is up/running(i.e. listening on RPC calls), but
disabled using share service set API.

Closes-bug: #2072552
Change-Id: Iaaa4e274d47cf2eaa0247234f268fdb5ff24461b
2024-08-30 12:11:01 +05:30
Zuul
db9bcfef2c Merge "Initialize profiler after ProcessLauncher fork" 2024-08-30 00:14:21 +00:00
Zuul
bfe28f07c0 Merge "Allow drivers to set share size after revert to snapshot" 2024-08-29 14:37:14 +00:00
Carlos Eduardo
30281a646c Manage/unmanage for CephFS drivers
Implement manage/unmanage for shares and snapshots to the CephFS
drivers.

- Instead of providing the export locations, users will need to
provide the subvolume/subvolume snapshot name in the
export/provider location parameter.

- The size of the snapshots will follow the shares' size, as we
can not currently be sure of the real size of the snapshot. This
must be fixed after the issue is addressed within the ceph
backend [1].

- We will attempt to resize subvolumes whose size are "infinite"
to the size value provided within the driver_options parameter.

- Start storing the provider location of the snapshots after
their creation, so it can be reused later.

[1] https://tracker.ceph.com/issues/67215#change-270669

Partially-Implements: bp manage-unmanage-cephfs-shares-and-snapshots
Change-Id: I5e86d09ea5ba8e61ecf04c52b25c639dfc823737
Signed-off-by: Carlos Eduardo <ces.eduardo98@gmail.com>
2024-08-29 11:12:55 -03:00
Kiran Pawar
28908d69da Allow drivers to set share size after revert to snapshot
For NetApp ONTAP driver, share revert to snapshot considers the largest
size between original share size and snapshot size after revert is done.
This is different from the users' and Manila's expectation where share
size is updated to snapshot size.

Closes-bug: #2064502
Change-Id: I6a1b87eabeb7bef80725a537acb6771c35b76afc
2024-08-29 09:30:53 +05:30
Zuul
2d987cf585 Merge "NetApp: don't check kerberos config on mgmt LIF." 2024-08-28 17:59:42 +00:00
agireesh
354831c9b2 NetApp: don't check kerberos config on mgmt LIF.
NetApp Driver- Exclude the vserver management network interface for
certain vserver account when checking the vserver Kerberos configuration
for network interfaces.

Closes-Bug: #2073766
Change-Id: I1f7a1207b8714b3fccd202526eeb92a547083537
2024-08-28 09:55:55 +00:00
Kiran Pawar
52d423f606 NetApp: Implement share metadata update method
Consider two metadata keys i.e. snapshot_policy and showmount.

Partially-implements: blueprint pass-resource-metadata-updates-to-backend-drivers
Depends-on: If4297cca3249359f72976800db2112ea9c61c06f
Change-Id: I042a2caa5884ddea09ecfa0028d01758c18af5a3
2024-08-27 08:06:48 +00:00
Zuul
4bf505404a Merge "api: Add schemas for messages" 2024-08-23 16:12:47 +00:00