Commit Graph

2712 Commits

Author SHA1 Message Date
Zuul d8987589ae Merge "Add job to test with SQLAlchemy master (2.x)" 2024-04-11 18:54:01 +00:00
Stephen Finucane 2a9ac87cc4 Add job to test with SQLAlchemy master (2.x)
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ib67538ebd0f8ebbea5a700343f52655b0f7fecd4
2024-04-10 16:41:55 -04:00
Zuul 28bb87ff77 Merge "tests: Don't (always) auto-create snapshot instances" 2024-04-09 18:56:41 +00:00
Zuul 221d4d940d Merge "Add delete CLI helper to ShareCommands" 2024-04-09 17:09:35 +00:00
Stephen Finucane 16b02bc706 tests: Don't (always) auto-create snapshot instances
If we are manually creating these things, we don't want any
automatically created. This is a latent issue that was being exposed by
SQLAlchemy 2.0's tweaked session management.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I9d760ebbfcca176a39b44f20fb92e16eaf6284c5
2024-04-06 09:51:36 +01:00
Okeke Christian 23de7b4b0c Add delete CLI helper to ShareCommands
This patch adds a delete cli command to ShareCommands
The helper CLI command checks if service if up. If service
is down, it deletes the share instance

Closes-Bug: #1867030
Change-Id: I6a0575c1ed86213010e50fe1b7a733cdf7fa1736
2024-04-05 16:08:55 +01:00
Mike Bayer 0ce2857d0f db: update migrations to use SQLA 2.0 patterns
All tests in test_migration.py pass with either SQLAlchemy 1.4
or SQLAlchemy 2.0 installed.

Change-Id: Ie8831c04b7b4515deea27b1ceb472d07cda91ca0
2024-04-03 19:26:23 -04:00
Stephen Finucane 1330a5e34a db: Remove 'get_session'
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I2a1a8b8eb933fc750ff8b3fc9d7ff1c7686625e6
2024-04-03 16:22:19 +01:00
Stephen Finucane d581714351 db: Remove session arguments from AZ methods
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I38ae324d5edb3705b559c3706d6888f08473a633
2024-04-03 11:29:58 +01:00
Stephen Finucane b8f5d6199d db: Migrate "share * access" APIs to enginefacade
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I590f4c7f78851b20a339294b820d0c223e298f3d
2024-04-02 14:12:34 +01:00
Stephen Finucane 685acf6013 db: Migrate "share snapshot", "share snapshot instance" APIs to enginefacade
Thankfully the APIs being migrated here were _mostly_ sharing sessions
already, so we can simply migrate from public (decorated) methods to
private methods with minimal fuss.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Id1b555e48106662d15e8c50567a5f3acecf6a8f1
2024-04-02 14:11:07 +01:00
Zuul f4c77bfe71 Merge "Add cephfs filesystem to shares metadata" 2024-03-01 07:52:13 +00:00
Zuul 7b685d9dda Merge "Add a new config option to specify admin metadata" 2024-02-29 17:06:48 +00:00
Zuul 618576ff31 Merge "Add disabled reason field to service." 2024-02-28 21:27:48 +00:00
silvacarloss 7e585a3bb5 Add cephfs filesystem to shares metadata
Make use of the `get_optional_share_creation_data` driver interface
to metadata in shares' created using the cephfs protocol.

Closes-Bug: #2050010
Change-Id: I91b51f974840f593334f2dcddfcfd45adfe87780
2024-02-27 18:09:31 -03:00
haixin 12ef157c3b Add disabled reason field to service.
update micversion to 2.83
user can set disabled reason for service.

Closes-Bug: #2037700

Change-Id: I3d7c46945366ac9e1d305c2f6de2233859259bf7
2024-02-27 14:27:37 +08:00
Takashi Kajinami 696f9ea8a2 Drop reference to WalkVersionsMixin from oslo.db
The WalkVersionsMixin class was already removed from oslo.db, because
of removal of sqlalchemy-migrate support.

Change-Id: I952e0aed8705fd4fc0b89f6ee34f31da1b30c656
2024-02-26 18:50:27 +09:00
silvacarloss 3429717601 Add a new config option to specify admin metadata
- A new config option named ``admin_metadata_keys`` was introduced
and we expect it to be set in the DEFAULT section of the manila
configuration file. It is expected that administrators will provide
a list of metadata keys that can only be updated by administrators
through this configuration option.

- Drivers will be able to set metadata while creating shares
through the `get_optional_share_creation_data` driver interface.

Closes-Bug: #2050010
Change-Id: I6412710c7db89747d23033e1a5a6be9de5886b0b
2024-02-22 14:31:44 -03:00
Zuul 8ce69b1951 Merge "Conditional Import for FIPS Compliance" 2024-02-20 16:42:50 +00:00
Zuul 179a1e7a4d Merge "Dell EMC: Drop "vmax" alias" 2024-02-16 17:17:30 +00:00
Zuul a7ffbf7bd0 Merge "tests: has_calls -> assert_has_calls" 2024-02-08 23:37:52 +00:00
James Page 51f78b8e8e
tests: has_calls -> assert_has_calls
Ensure that an assert method is actually used when validating calls
in unit tests.

This also revealed an issue with the expected calls; query updated
to reflect the use of to domain attribute in the security context.

Change-Id: I7f71437330a23a2b5f178cf1980ba23260ea4a9b
2024-02-08 09:40:12 +00:00
ashrod98 47e7c78f37 Conditional Import for FIPS Compliance
Conditionally Import Parakimo
Separate SSH functions into ssh_utils.py for safe conditional import.

Change-Id: Ia1a3ee69bef76b52e4e6df1e73488c018ac0f3c9
2024-02-06 20:30:39 +00:00
Kiran Pawar 09c51d2978 Retry on connection error to neutron
In case of keystoneauth1 ConnectError, manila will retry the neutron
API call. For create_port(), it will make sure no duplicate ports
are created.

Closes-bug: #2049507
Change-Id: I12fece58671e9fb3705e22090187c42d9c3a74d9
2024-02-06 13:58:09 +00:00
Zuul a83a4b1165 Merge "api: Dump config options when deployed as a wsgi app" 2024-02-05 17:20:02 +00:00
Takashi Kajinami aabbd02598 Dell EMC: Drop "vmax" alias
This removes support for using "vmax" backends, which was translated
to "powermax" backends. This behavior was expected to be removed during
Wallaby cycle.

Also replace the remaining reference to EMC VMAX.

Change-Id: Id1187a9a99d87abefe3549e70df768f41494145f
2024-02-01 02:27:34 +00:00
Zuul 677437d394 Merge "Change misleading user message when user services are down" 2024-01-31 13:00:22 +00:00
Takashi Kajinami 2aa2ed5119 api: Dump config options when deployed as a wsgi app
This ensures api service dumps config options to debug logs when being
deployed as a wsgi app, so that users can review the effective values
and find misconfiguration more easily.

Closes-Bug: #2031480
Change-Id: I622fbae7fb273e7405a305cc3e33ac89c0564fdc
2024-01-31 10:47:28 +09:00
melakualehegn ecda09a14d Change misleading user message when user
services are down

enhance the user message when all of the share
manager services are down or are still
initializing
removed a duplicate test: test_create_share_non_admin

Closes-Bug: #1886690
Change-Id: I168564a5b054d17762ad668ebbe4f5e7b562197b
2024-01-30 20:41:58 +00:00
Takashi Kajinami b488f42332 Bump hacking
hacking 3.1.x is too old.

Change-Id: Ic5131276ac1d1a1a959d0a5b16398ae12fae0c18
2024-01-27 23:57:00 +09:00
Thomas Goirand eb12c770cc Python 3.12: use assertAlmostEqual
The old failUnlessAlmostEqual is removed from Python 3.12. Let's
use assertAlmostEqual instead.

Change-Id: I25c4d43c580d9b101be5ed3e0e23fead704b09f0
2023-12-17 22:23:50 +01:00
Zuul 357f62cf97 Merge "NetApp Derive vserver name from share server identifier" 2023-12-13 20:14:14 +00:00
Zuul 4486cb2f3f Merge "[Pure Storage] Add support for multiple data VIPs" 2023-12-05 20:08:00 +00:00
Kiran Pawar 54c4f91aa1 NetApp: Stop clone split while deleting child share.
If share created from snapshot is deleted immediately after creation
and if clone split operation is in progress, then delete call fails.
Fix this issue by first stopping the clone split job and then continue
with deletion.

Closes-bug: #1960239
Change-Id: If9844b3da70cec427c6260ee239c8c6131ed77ed
2023-11-22 12:48:12 +00:00
Zuul 48f1c1c83e Merge "TrivialFix: Fix arguments on a mock of __init__" 2023-11-17 19:24:17 +00:00
Simon Dodsley ecf6823369 [Pure Storage] Add support for multiple data VIPs
Minor change to allow multiple data VIP addresses
to be specified in the `flashblade_data_vip` parameter.

Each data VIP will be used to define the file system
export address for shares created. The first address in
the list will be clasified as the Preferred export
address, but this is not enforced.

Change-Id: Ia3bfdd5ce1bfd31d10193d1f222bf27b38c8ef43
2023-11-10 17:01:09 -05:00
Zuul 72280df44c Merge "Don't fail remove-export in NFS-Ganesha" 2023-11-09 17:55:39 +00:00
Goutham Pacha Ravi 5946f72b76 TrivialFix: Fix arguments on a mock of __init__
"self" needs to be the first parameter; or pylint
complains.

Change-Id: I23b5c2c3f53c66e120fc852f50ad13e9c889c98c
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2023-11-08 15:23:07 -08:00
Stephen Finucane 36549c8b97 db: Migrate "share instance", "share replica" APIs to enginefacade
We migrate both of these at the same time since a share replica is
effectively a share instance with only the 'replica_state' field set. As
such, they share many common DB APIs.

These are mostly trivial to migrate. Just a lot of refactoring to create
private methods, avoiding nested transactions.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I267e2e0fac0b4130f8836de276082788fbd8d454
2023-10-31 11:41:49 +00:00
Zuul adf48763db Merge "Add more tests for share/snapshot deferred deletion" 2024-03-13 19:56:47 +00:00
Zuul 0ca91f11b6 Merge "Human readable export location NetApp driver changes" 2024-03-13 18:04:30 +00:00
Zuul bd3b074aa5 Merge "Forbid resetting state of active replicas" 2024-03-13 14:08:49 +00:00
Kiran Pawar a0bcf312f3 Add more tests for share/snapshot deferred deletion
Partially-implements: bp/deferred-deletion
Change-Id: I49c7916d4823c691f3fffe6797a779b086589188
2024-03-13 12:35:28 +00:00
jayaanand.borra@netapp.com 4f36847de9 Human readable export location NetApp driver changes
NetApp driver changes to accommodate human readable
share location. Export path is updated with
human frendly value if present else use share-id.

partially-implements: bp human-readable-export-locations
Depends-On: I72ac7e24ddd4330d76cafd5e7f78bac2b0174883
Change-Id: I2f5bfdbc9d0458c7b9198a3eb94b3b095d5b5e04
2024-03-13 01:34:21 -04:00
Zuul 42cf099bb4 Merge "Implement the share backup for NetApp driver" 2024-03-12 22:03:34 +00:00
Zuul b6010bb746 Merge "Add support for share/snapshot deferred deletion" 2024-03-12 21:51:10 +00:00
Kiran Pawar 558288e00a Add support for share/snapshot deferred deletion
Implements: bp/deferred-deletion
Change-Id: I9e55e1706fc0c3d9f65f73e13ba2a20f355c74f4
2024-03-12 14:22:25 +00:00
agireesh 6909a7c213 Share backups enhancement
Added new column named 'backup_type' in 'share_backups' table
and changes the share common api libs to support the dhss_true
configuration for share backup creation

Partially-implements: bp/share-backup
Change-Id: Ifb88ec096674ea8bc010c1c3f6dea1b51be3beaa
2024-03-12 15:56:38 +05:30
agireesh dfbf51bafd Implement the share backup for NetApp driver
Implement the share backup feature for NetApp driver.
NetApp SnapVault technology is used to create and restore
the backup for NetApp ONTAP share. backup delete workflow
just delete the transferred snapshot from destination
backup volume.

Depends-On: Ifb88ec096674ea8bc010c1c3f6dea1b51be3beaa
Change-Id: I5a4edbf547e7886fb4fa9c1bed90110a33f9bf3b
2024-03-12 10:12:25 +05:30
Gray Lutalo b7a1b5b2cf Forbid resetting state of active replicas
In a replication setup, users encountered a critical
issue where they unintentionally reset the replica_state
of an active replica while attempting to resolve errors
on a non-active replica. This led to a situation with no
active replica, causing data loss. Users expected
server-side validation to prevent such actions.

This commit implements the necessary validation in the
codebase to ensure that the reset_replica_state action
cannot be applied to active replicas, addressing the
reported issue and improving data integrity in
replication setups.

Co-Authored-By: Solly <solobarine@gmail.com>
Closes-Bug: #2015328
Change-Id: I629669476e585a834673b8c8b49ad4b0270b877f
2024-03-09 07:40:42 +01:00