Commit Graph

3870 Commits

Author SHA1 Message Date
Zuul 242dc78ee5 Merge "Adds nosec comment to ZFSSA driver" 2024-05-01 00:55:07 +00:00
Zuul 57ca67ab76 Merge "Ensure password values are not logged" 2024-04-30 08:01:44 +00:00
Zuul 7250b84839 Merge "Adds usedforsecurity=False to HPE 3PAR driver" 2024-04-29 21:34:22 +00:00
Zuul 0b4673e81f Merge "Adds timeouts to Quobyte driver file" 2024-04-29 20:53:45 +00:00
Zuul 6478105f0d Merge "Replaces Huawei driver XML with defusedxml" 2024-04-29 20:53:43 +00:00
Zuul 68d3bf75fc Merge "Adds "usedforsecurity=False" to veritas drivers" 2024-04-29 20:53:41 +00:00
Zuul 2c95d47b97 Merge "Check share network for share groups before deletion" 2024-04-24 01:25:30 +00:00
Takashi Kajinami f8a53c037a Ensure password values are not logged
Make sure that all password options is defined with secret=True so that
the given values do not appear in debug logs.

Also remove the redundant default=None .

Change-Id: I989e825ef160a65a5a72c58d6fd4e8099044bcd5
2024-04-22 15:36:26 +09:00
Elvis Acheampong 674c9c9e19 Adds "usedforsecurity=False" to veritas drivers
The purpose of md5 was not specified.
Veritas drivers use mds hashes which pop on bandit as security issues
Putting "usedforsecurity=False" properly shows the hash function
is not use for security.

Change-Id: I78a5b708cd970dcb60f480d8e6a201d0768645fc
2024-04-18 14:38:27 +00:00
Ubuntu 32ac176053 Adds timeouts to Quobyte driver file
To appease Bandit, timeouts have to be
everywhere. So here are some timeouts
so Bandit stops crying.

Change-Id: I2a913f3b87e16554b1bd68543fcf254cc4226031
2024-04-15 22:27:20 +00:00
Ubuntu e47c6c2611 Adds usedforsecurity=False to HPE 3PAR driver
To appease Bandit since SHA1 angers
the beast, usedforsecurity=False will be
bolted to the hash function

Change-Id: I33bbb7070ada5509ca05c90d7a38077d38f54a1f
2024-04-11 20:04:58 +00:00
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 56db40e344 Merge "db: rename_table is not a batch operation" 2024-04-09 18:49:54 +00:00
Zuul 221d4d940d Merge "Add delete CLI helper to ShareCommands" 2024-04-09 17:09:35 +00:00
Ubuntu 2da6258ddf Adds nosec comment to ZFSSA driver
Bandit yelled at this use of urlopen
but the security issue it's worried about
does not apply in this case

Change-Id: Id71c0ee4138b695ff19085a284ccced6b1a9dbba
2024-04-09 04:22:13 +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
Stephen Finucane 825ee37432 db: rename_table is not a batch operation
This is reported upstream [1] but I suspect the root cause is that we
were relying on a bug in Alembic: renaming tables doesn't really make
sense as a batch operation, which by definition works by recreating
tables with an updated schema (to support SQLite and its lack of full
'ALTER' support).

[1] https://github.com/sqlalchemy/alembic/issues/1453

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I1da6d117778bbbad64b2df2dfd2f8aeef8a7084c
2024-04-05 13:00:28 +01:00
Stephen Finucane 9c94a9adfc db: Don't use strings to indicate relationship names
Resolve the following RemovedIn20Warning warning:

  Using strings to indicate relationship names in Query.join() is
  deprecated and will be removed in SQLAlchemy 2.0.  Please use the
  class-bound attribute directly.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I155b4ce4b605720c8335d465124fd32cc973a737
2024-04-04 13:30:27 +01:00
Stephen Finucane 96274a077a db: Remove unnecessary warning filter
Change Ie8831c04b7b4515deea27b1ceb472d07cda91ca0 replace the only users
of 'autoload' with 'autoload_with'.

Change-Id: I37bbe45d6d9ce41a3c238e33d4469f9a362491ad
2024-04-04 13:30:24 +01:00
Ubuntu cb31307adf Replaces Huawei driver XML with defusedxml
Replaces Huawei driver's use of Python's
native XML library methods with defusedxml's
methods instead. The native library is vulnerable
to XML attacks while defusedxml isn't. This also
makes Bandit 3 issues happier.

Change-Id: I27d1204ec7dafd3b578d1261c3fd2e371ae405fb
2024-04-04 03:06:59 +00:00
Mike Bayer 505719a50a db: turn off autocommit
after testing using an assert for DML without a transaction,
we can now turn autocommit off.   enginefacade should be used
completely now

Change-Id: I2ee07c7e41ea43c2ab24a4a095550dd0b5fe47dd
2024-04-03 19:33:24 -04: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 cae5ac7be1 db: Remove final use of legacy facade
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I1251a5c0b2f073604ae61f378992fea7df51c07d
2024-04-03 16:23:12 +01:00
Stephen Finucane 98ef4c7755 db: Post-migration cleanup
Now that we have migrated all of our DB APIs to enginefacade, we can
clean up the outstanding TODOs.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Iee198a16f030f1205d38b7c232d4e3a42642c756
2024-04-03 16:23:12 +01: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 d74c804121 db: Migrate "share" APIs to enginefacade
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ie5035546c3d640e3558446ad082510c249d0ce65
2024-04-02 15:40:18 +01:00
Stephen Finucane f3805e2a13 db: Migrate "share snapshot metadata" APIs to enginefacade
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I3fa8e4e1e526d75051cb323702e3532d99008313
2024-04-02 15:40:18 +01:00
Stephen Finucane a55cafae8e db: Migrate "share snapshot export location" APIs to enginefacade
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I3d29b5426c5a633b5590367b56d00847215d8201
2024-04-02 15:40:07 +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
Stephen Finucane 3be71e3e07 db: Unwind unnecessary independent transactions
We need to maintain these on quotas (for now) but not on other
operations.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I991d6127c14b5f06ca9ca8e6caccbc392e639b42
2024-03-25 11:32:49 +00: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 25d923925a Merge "is_valid_ip_address: Catch non-string values early" 2024-02-20 21:57:34 +00:00
Zuul 8ce69b1951 Merge "Conditional Import for FIPS Compliance" 2024-02-20 16:42:50 +00:00
Takashi Kajinami c3b8afc47a is_valid_ip_address: Catch non-string values early
The is_valid_ipvN methods from oslo.utils raises an exception for
non-string values, because of the change in netaddr 1.0.0. This adds
a wrapper logic to retain the previous behavior, which is preferred by
manila.

Change-Id: If1297e4d54fd645969ca79690a1c558c9efdbc8d
2024-02-20 05:33:37 +00:00
Zuul 84d10cf225 Merge "Deprecate GlusterFS (Native) Driver" 2024-02-17 06:04:10 +00:00
Zuul fbae564132 Merge "Dell EMC: Deprecate VNX driver" 2024-02-17 01:40:05 +00:00
Zuul e3aaac5bb9 Merge "Deprecate untested Tegile share driver" 2024-02-16 19:22:44 +00:00
Zuul 179a1e7a4d Merge "Dell EMC: Drop "vmax" alias" 2024-02-16 17:17:30 +00:00
Zuul 05a231e370 Merge "db: Fix charset updates in migrations" 2024-02-16 10:46:31 +00:00